On Fri, Feb 20, 2009 at 11:15 AM, Denis Alessandro Altoe Falqueto <denisfalqueto@xxxxxxxxx> wrote: > On Fri, Feb 20, 2009 at 11:05 AM, <hollunder@xxxxxx> wrote: >> On Thu, 19 Feb 2009 09:33:01 +0100 >> <hollunder@xxxxxx> wrote: >> >>> On Wed, 18 Feb 2009 14:31:13 -0300 >>> Denis Alessandro Altoe Falqueto <denisfalqueto@xxxxxxxxx> wrote: >>> >>> > On Wed, Feb 18, 2009 at 2:22 PM, Sergey Manucharian >>> > <sergeym@xxxxxxxxx> wrote: >>> > > On Wed, 18 Feb 2009 11:03:08 +0100 >>> > > <hollunder@xxxxxx> 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 >> >> >> I tried some more. This time I specified one of the usb harddrives by >> UUID. I can mount is, so it works, but at boottime this method doesn't >> work either. >> >> I get: >> special device UUID=number not found >> >> same as I got: >> special device /dev/usbdisk400 not found >> >> So to me this looks like udev is not the problem this time. >> So what is it, are usb devices not initialised yet when 'mount -a' is >> run? >> I added the usb_storage module to the modules array in rc.conf but this >> didn't change a thing. If I read rc.sysinit correctly the modules are >> loaded before 'mount -a'. >> >> Help is appreciated. >> >> Philipp >> > > Well, I don't have an external hd, just pendrives, so to me they work > fine because I insert/remove often and when the system is already > running. But one aproach I would take is to make a script and put it > in /etc/rc.d, so you can put it in your DAEMONS array in rc.conf. This > way, i think the system will be up and running fine when the script is > run and it may mount your drive correctly. You can > > -- > ------------------------------------------- > Denis A. Altoe Falqueto > ------------------------------------------- > George Burns - "I would go out with women my age, but there are no > women my age." > Sorry, sent before I ended the message... >_< I was saying that you could check to see if your device is plugged before mounting. I was trying to find a reliable way to do that, but I don't have the time right now. I will try to replay with something usefull as soo as I can. Hope that helps. -- ------------------------------------------- Denis A. Altoe Falqueto ------------------------------------------- Emo Philips - "I was the kid next door's imaginary friend."