Re: [gentoo-user] fstab question
Colleen Beamer writes: I have a usb external hard drive attached to my computer. It's an Iomega and has a power switch. In fstab it is /dev/sdc1 and /dev/sdc2 because I've configured it to have two ext3 partitions. If the drive is not powered on when I boot and then, I turn it on, I have to reboot to get fstab to recognize it. That has always sort of irked me, but I dealt with it because the drive holds only my music files. What I do is to build SCSI as modules into the kernel. When I turn on a SCSI device, I remove the module and modprobe it again. For my adaptec controller: modprobe -r aic7xxx modprobe aic7xxx However, this works only if removing the module is possible. If you have a mounted file system on a SCSI drive, this will not work. If there is an easier solution, I'd be interested to hear about it. The wrinkle is that my son bought me a usbstick. I can mount it just fine. However, if my usb external hard drive is not powered on on boot, the stick is recognized at sdc1. If the usb drive is powered on then, the stick is recognized as sdd1. So, this means that if I want to use one or the other or both, I keep having to change fstab. Is there a way I can set the device to always be the same - i.e. I always want the usb external drive to be sdc1 and sdc2 and the usb stick to be sdd1. I let udev manage this, so I get a /dev/stick and /dev/externhd. Or I just use KDE which opens a window with the contens of the drive/stick. But others already wrote more about that in detail. I know! I only want the world. If there isn't a way that this can be done, then I'll live with the situation. It's not earth shattering! Oh yes it is! Wonko -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] fstab question
On 16 Aug 2007, at 03:49, Colleen Beamer wrote: ... In fstab it is /dev/sdc1 and /dev/sdc2 because I've configured it to have two ext3 partitions. If the drive is not powered on when I boot and then, I turn it on, I have to reboot to get fstab to recognize it. No, you don't have to. `sudo mount -va` As others have suggested, use udev. You can use this not only for the thumb drive but also for the Iomega one - remove that from fstab. Stroller. -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] fstab question
On (15/08/07 22:49) Colleen Beamer wrote: Hi, I have a situation that, before, kind of bugged me but I was able to deal with it. However, now I've added another wrinkle to the situation. I have a usb external hard drive attached to my computer. It's an Iomega and has a power switch. In fstab it is /dev/sdc1 and /dev/sdc2 because I've configured it to have two ext3 partitions. If the drive is not powered on when I boot and then, I turn it on, I have to reboot to get fstab to recognize it. That has always sort of irked me, but I dealt with it because the drive holds only my music files. The wrinkle is that my son bought me a usbstick. I can mount it just fine. However, if my usb external hard drive is not powered on on boot, the stick is recognized at sdc1. If the usb drive is powered on then, the stick is recognized as sdd1. So, this means that if I want to use one or the other or both, I keep having to change fstab. Is there a way I can set the device to always be the same - i.e. I always want the usb external drive to be sdc1 and sdc2 and the usb stick to be sdd1. I know! I only want the world. If there isn't a way that this can be done, then I'll live with the situation. It's not earth shattering! Thanks in advance. Regards, Colleen -- Registered Linux User #411143 with the Linux Counter, http://counter.li.org -- [EMAIL PROTECTED] mailing list Hi, Put ,noauto after defaults in the line (in fstab) where are mount your external drive. Thus fstab will not try to automount it on boot. But will reserve it (sda1 etc.) to be available later, so usbstick will not take it. Check man mount. HTH. Rumen -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] fstab question
Colleen Beamer wrote: Hi, I have a situation that, before, kind of bugged me but I was able to deal with it. However, now I've added another wrinkle to the situation. I have a usb external hard drive attached to my computer. It's an Iomega and has a power switch. In fstab it is /dev/sdc1 and /dev/sdc2 because I've configured it to have two ext3 partitions. If the drive is not powered on when I boot and then, I turn it on, I have to reboot to get fstab to recognize it. That has always sort of irked me, but I dealt with it because the drive holds only my music files. The wrinkle is that my son bought me a usbstick. I can mount it just fine. However, if my usb external hard drive is not powered on on boot, the stick is recognized at sdc1. If the usb drive is powered on then, the stick is recognized as sdd1. So, this means that if I want to use one or the other or both, I keep having to change fstab. Is there a way I can set the device to always be the same - i.e. I always want the usb external drive to be sdc1 and sdc2 and the usb stick to be sdd1. I know! I only want the world. If there isn't a way that this can be done, then I'll live with the situation. It's not earth shattering! Thanks in advance. Regards, Colleen This is actually semi-easy. What you need is udev rules for each of the devices, so what you need first is some info. Do an 'emerge usbutils' then run 'lsusb -v'. This will output a bunch of info about the currently connected USB devices. Then, look for the Vendor and Model strings, and put them into a udev rule in /etc/udev/rules.d/. For example, my udev rules include an entry like this for my iPod: BUS==scsi, SYSFS{vendor}==Apple*, SYSFS{model}==iPod*, \ KERNEL==sd?2, NAME=%k, SYMLINK+=ipod This tells udev that it should look for a device on a SCSI bus (which covers USB as well) with a vendor string starting with Apple and a model string starting with iPod, that would normally have a device name of /dev/sd{something}2. It then tells udev to create a symlink to this device at /dev/ipod (the SYMLINK+= part). After that, just change your /etc/fstab to reflect the device symlinks that you created, and voila! You still have to mount them manually, though, unless something new's come along I'm not aware of. This is a really simplified explanation of udev, so for a more advanced guide, Gentoo provides some excellent documentation at: http://gentoo-wiki.com/UDEV Good luck! And remember: either hotplug your devices or run 'udevstart' to test your rules! -- [EMAIL PROTECTED] mailing list
Re: [gentoo-user] fstab question
Colleen Beamer wrote: The wrinkle is that my son bought me a usbstick. I can mount it just fine. However, if my usb external hard drive is not powered on on boot, the stick is recognized at sdc1. If the usb drive is powered on then, the stick is recognized as sdd1. So, this means that if I want to use one or the other or both, I keep having to change fstab. Is there a way I can set the device to always be the same - i.e. I always want the usb external drive to be sdc1 and sdc2 and the usb stick to be sdd1. ACtually, as per suggestion from others, why don't you try out the combination of HAL and gnome-volume-manager (if you use gnome) and udev? Nowadays, everything will just be plug and play. No need to fiddle with fstab.. just plug it in, HAL will see there a new device, hotplug/coldplug will call out the necessary daemons and mount it automatically for you. Heck, gnome-2.18 seems like you can even specify specific mount points for it.. -- [EMAIL PROTECTED] mailing list