[arch-general] how to mount external hdd

hollunder at gmx.at hollunder at gmx.at
Thu Feb 19 03:33:01 EST 2009


On Wed, 18 Feb 2009 14:31:13 -0300
Denis Alessandro Altoe Falqueto <denisfalqueto at gmail.com> wrote:

> On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian
> <sergeym at rmico.com> wrote:
> > On Wed, 18 Feb 2009 11:03:08 +0100
> > <hollunder at gmx.at> wrote:
> >
> > ..........
> >
> >> An external drive can be rather reliably identified and always
> >> mounted at the same place using udev.
> >>
> >> This is somewhat problematic on arch linux tough.
> >> For some reason the devices seem not to be created before
> >> mount runs although udev runs before it.
> >> This means that external drives do not get mounted along with all
> >> the other drives specified in fstab.
> >>
> >> I personally wonder what the problem is since this method has
> >> worked on other distributions.
> >>
> >> My workaround is simply another 'mount -a' in rc.local, at this
> >> point in boottime the devices are created.
> >>
> >> Still this doesn't work reliably with one of my drives but this is
> >> a separate problem (slowness).
> >>
> >> Philipp
> >>
> >
> > Folks, you are discussing how to deal with "noob questions" etc.,
> > but nobody paid attention to the more "deep" meaning of the initial
> > question arisen by Philipp.
> >
> > I confirm the problem. So, how to mount an external HDD during the
> > system start-up?
> >
> > Cheers,
> > Sergey
> >
> >
> 
> 
> If it is always connected, I would put a line on /etc/fstab so it is
> mounted as any other ordinary partition.
> 
> If it is not always connected, I would make a script and put it in
> /etc/rc.d. The script would be responsible to look if the disk is
> attached and mount it. It would be good to use some udev rules to make
> a fixed symlink for the disk, so the script has a fixed target to
> find.
> 

I already do a combination of udev and fstab which doesn't work.

Old rules that worked on my previous system:
BUS=="usb", KERNEL=="sd?1", SYSFS{idProduct}=="(somenumber)",
SYMLINK+="usbdisk200"

BUS=="usb", KERNEL=="sd?1", SYSFS{serial}=="(somenumber)",
SYMLINK+="usbdisk400"

New rules with newer udev syntax:
BUS=="usb", ATTRS{serial}=="(somenumber)", KERNEL=="sd?1",
NAME="%k", SYMLINK+="usbdisk400", GROUP="storage"

BUS=="usb", ATTRS{idProduct}=="(somenumber)", KERNEL=="sd?1", NAME="%k",
SYMLINK+="usbdisk200", GROUP="storage"

fstab:
/dev/usbdisk400 /media/disk400  ext3
rw,nodev,noexec,auto,noatime,async,users        0       0

/dev/usbdisk200 /media/disk200  ext3
rw,nodev,noexec,auto,noatime,async,users        0       0


What happens is that when 'mount -a' is run at boottime it says
that /dev/usbdisk400 and /dev/usbdisk200 doesn't exist, consequently
they don't get mounted.
When rc.local with another 'mount -a' is executed it works (except that
the /dev/usbdisk400 is too slow sometimes).

I'm looking forward to your ideas about what's happening.

Best regards,
	Philipp


More information about the arch-general mailing list