You are not logged in.
Hello!
I recently set up TimeShift, a backup tool, and I have it set to store the snapshots onto an external HDD. I would like the program to make a snapshot once daily and to do this I would have to mount the external manually.
So I looked up instructions on how to add an external HDD to my fstab. It worked, I got the harddrive to mount at boot, however it then disabled my belkin usb-hub (which has my mouse and keyboard plugged into it). I ran the following commands to add the external to my fstab...
sudo mkdir /run/media/disco/backupand then I had to find the path to external by running
mountfound the line I was looking for which was
/dev/sdb1 on /run/media/disco/fcf1f0b0-d756-41d6-a7c8-2ab7d009be2e type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)So I edited my fstab to the following
#
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda1 UUID=a2ba860f-a990-4c75-879b-1138d941857d
/dev/sda1 / ext4 rw,relatime,data=ordered 0 1
# /dev/sda2 UUID=43fab9a6-904a-4c2e-8362-d2205ef6bbe2
/dev/sda2 none swap defaults 0 0
/dev/sdb1 /run/media/disco/backup auto auto,user,rw,exec 0 0I reverted back to the fstab that doesn't have the last line, and my belkin usb-hub works again. I'm just curious if I'm doing something wrong, or if I need additional steps that I am missing.
Any help is appreciated, please and thank you! (:
Last edited by Disco Dave (2015-04-02 02:27:42)
Offline
Have you tried mounting it somewhere else, not in /run?
Offline
Have you tried mounting it somewhere else, not in /run?
This worked! thank you very much!
Offline
proper directory for persistent mount points is
/mnt/The /run directory is used by runtime applications as, say, a temporary working directory usually meant to be accessed by other applications as a way of IPC (unlike /tmp which is used as general dump for mostly private volatile data, temporary caches, etc.) The /run directory is usually a tmpfs meaning it only exists in memory and gets deleted on reboot. This is most likely the reason it didn't work for you.
Also, you may want to change the /dev/sdb1 dev node in fstab to a UUID entry so that there is no confusion in case of different block device node gets assigned to the drive (such as if it gets connected after some other storage drive, being it another USB drive, an SD card, or anything else).
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
A couple of things: first, fstab is generally not recommended for handling removable devices, but if this drive is always going to be connected, I guess it will be ok.
Second, and this is of course optional, but you could uses systemd's automount feature to mount the device whenever it is accessed, instead of having it mounted all the time.
Offline
Second, and this is of course optional, but you could uses systemd's automount feature to mount the device whenever it is accessed, instead of having it mounted all the time.
This sounds great, and I would like try this systemd's automount since this fstab method is giving me trouble on startup sometimes. I've tried googling systemd automount with not much luck. If you could post a link on systemd's automount, that would be fantastic. Thank you ![]()
Offline
man systemd.automountOffline
man systemd.automount
So from understanding, I still have to edit the fstab
/dev/sdb1 /mnt/backup ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,hard,intr,noatime 0 0Would this be the correct usage? I have scheduled backups that should run at midnight, will this service mount the drive for me then?
Offline