Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a 3TB USB 3.0 External HDD (Seagate) that I would like my Debian machine to pick up on boot so that I can use rsync to backup to it using cron.

If i unplug the drive and plug it back in then it shows up when I do:

/dev/disk/by-uuid -lah

Then I can mount it (the UUID is in fstab already) by doing:

sudo mount -a

Unfortunately when I reboot the drive is not detected. This is a headless Linux box.

The drive is NTFS formatted.

Help would be appreciated!

Thanks,

share|improve this question
1  
Is it the /dev/disk/by-uuid/ link that is not present, or the actual device? –  Paul Aug 7 '12 at 5:34
    
The actual device. If I unplug the USB and plug it back in then the device shows up. –  Omar Mir Aug 7 '12 at 16:10
    
After rebooting does the device show up when you run lsusb? This is before the /dev shows up but while the device is plugged in –  Mark McDonald Aug 10 '12 at 0:19
    
It could be power stabilization time. 3TB USB 3.0 HDD is huge. It might not be ready by when udevadm runs. What do you see in your kernel log file when you plug it in? What do you see when you cold-boot with the HDD pluged in? Does anything change if you hot reboot? –  Yasushi Shoji Aug 14 '12 at 15:51
    
Have you tried simply using gvfs? That should pick it up ok. –  terdon Aug 16 '12 at 14:41
show 6 more comments

1 Answer

up vote 1 down vote accepted

Mounting external hard drive on boot can be very tricky, troublesome operation. First, it adds delay to the boot sequence, then the drive has to be recognized and mounted. Imagine, if for some reason, the OS can't find the drive. It will get stuck at its boot sequence, waiting for the user to tell it to continue or not. You don't want this to happen.

What you need is autofs. Just apt-get install autofs and configure automounts -> create an entry for this drive in /etc/auto.master.

Example: /mnt /etc/auto.mnt --timeout=120 --ghost; Then in /etc/auto.mnt put: `backup -fstype=ntfs,rw UUID=<your drive UUID. Reload the autofs service and you would be ready to access /mnt/backup.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.