Koozali.org: home of the SME Server

Howto mount an USB harddrive to an Ibay (works after boot)

Offline milaweb

  • **
  • 25
  • +0/-0
    • http://www.milasupport.dk
Howto mount an USB harddrive to an Ibay (works after boot)
« on: July 19, 2007, 09:09:04 AM »
Hi

I mount an USB Harddisk with this command
Code: [Select]
#mount /dev/sda1 /home/e-smith/files/ibays/filserver/files
and that works very good, but how do i set this up in eg fstab, so that it will work after reboot?
I have searched the forum, and i have tried this:
Code: [Select]
/dev/sda1               /home/e-smith/files/ibays/filserver/files auto auto,defaults 0 0


What am i doing wrong here?

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Howto mount an USB harddrive to an Ibay (works after boot)
« Reply #1 on: July 19, 2007, 11:14:53 AM »
I have added 'mount /dev/sda1' to /etc/rc.d/rc.local, and my drive seems to remount whenever I reboot.

[edit]
after labelling my external disk and editing fstab to say LABEL=blah in the device column, I had to change /etc/rc.d/rc.local to say mount LABEL=blah instead of 'mount /dev/sda1'
[/edit]

I *think* I saw a note once that fstab is processed before the usb subsystem is active (?)

Offline SoftDux

  • *****
  • 240
  • +0/-0
    • http://www.SoftDux.com
Re: Howto mount an USB harddrive to an Ibay (works after boot)
« Reply #2 on: September 07, 2007, 10:15:21 AM »
Using the LABEL option is a much safer way of doing this. The reason being, that if you had 2 / 3 USB drives, it could change the devices, so by using LABEL, it will always mount the same HDD in the same place :)