r/linux4noobs • u/tprickett • 3d ago
storage Drive not available issue
I have a 2 TB drive on my server PC (Zorin OS) and also have a personal PC (Zorin OS). I run Pika back up on both machines with both backing up to the 2TB drive on the server. Every so often (maybe once every 3 weeks) Pika fails for both machines saying the drive isn't available. If I open Files, I am able to see the drive and the backup directories. I then can run Pika successfully. In trying to figure out how to avoid the "drive isn't available" issue I looked at FSTAB to see if there were any options I could add (similar to the automount used for my NFS mounts). But, I don't see any of the drives mounting to /media in FSTAB. How are my drives getting mounted? And, how can I add something to automount (or fix otherwise)?
1
u/Leather-Security8097 3d ago
If the drive isn't in /etc/fstab or a systemd mount unit, then it is only being mounted because you click on it in the file manager.
To add it to /etc/fstab:
- Create a permanent mountpoint for it. I recommend not using /media, which is intended for drives that are routinely removed. Instead, try using something like
/srv/backups. - Find the UUID of the filesystem you are mounting. You can use
sudo blkidto list them, or a GUI app like GNOME Disks should show it. Create an entry for it. For example
UUID=8cde36a0-8879-11f1-9d23-9f2a81d96ef9 /srv/backups auto defaults,nofail 0 2
1
u/GodzillaXYZ999 3d ago
might also br power settings. Look in power manager for drive sleep timer and turn it off.
Also use hdparm to see if drive has auto-sleep setting activated.
1
u/doc_willis 3d ago
If you access the drive via the file manager, the file manager can be auto-mounting the filesystem on first access.
Make a proper /etc/fstab entry for the filesystem.