View previous topic :: View next topic |
Author |
Message |
commonloon Tux's lil' helper
Joined: 13 Apr 2004 Posts: 133 Location: Marin, CA
|
Posted: Fri Oct 22, 2004 6:47 am Post subject: LVM SCSI dev "Dance" |
|
|
I've got a couple of usb external drives that I am trying to use with LVM. My problem is that I also have 2 raid arrays on this same machine. In old school terms I have /dev/sda,b,c,d,.... When I unplug a drive and then plug it back in the kernel assigns it the next device (say /dev/sde). This is compounded by the fact that if the machine should be rebooted that the devices names are all different again.
I found out the hard way the LVM has issue with devfs, i.e., the open issue with too many symlinks.
My question is there a way to trick the kernel/fs into using the same scsi device names somehow, for lack of a better way of describing it. LVM seems ok with the dev names changing, so I guess I could write a little bash script to figure out what drive is plugged in where, but it just doesn't seem like a good solution.
Any suggestions greatly appreciated. |
|
Back to top |
|
|
garlicbread Apprentice
Joined: 06 Mar 2004 Posts: 182
|
Posted: Fri Oct 22, 2004 12:07 pm Post subject: |
|
|
One solution would be to look into using udev
instead of devfs (which has to be disabled for udev to work)
the new 2.6 kernel now creates a block device within several different places within the /sys directory (virtual filesystem similar to /proc)
the idea is, is that when something is removed or added, the device node is created within /sys and a userspace tool called udev is called to create a symlink from /sys to /dev automaticaly
the advantage of this is that you can specify in the udev config file how you want it to respond to devices appearing within /sys
since the device appears in several different places within /sys it's possible for udev to look it up in different ways
One example of this is that /sys can give a unique ID for the device just connected based on the chipset and other features of the hardware
If udev recognises this unique ID in it's config file, it can create a symlink with a specific name
Disadvantages are
It can be difficult to setup at the moment
not all hardware is supported to appear under /sys yet
I think you'll need to unmask some of the more experimental ebuilds relating to the startup scripts for udev to work
see here http://www.linuxjournal.com/article.php?sid=7316
in order to turn off devfs for udev to work
I believe there is a kernel parameter you can pass at boot time
something like devfs=nomount or something (check the Kernel Documentation)
Also one thing to be aware of, I think when emerging udev
it will automaticly look at all the device nodes located within /dev that have been setup by devfs that your using at the moment
it'l then copy these device nodes into a compressed archive as a backup
and upon bootup extract the archive into /dev (the same as using mknod)
I think this is just a temporary fix to the problem of udev not supporting all the hardware yet |
|
Back to top |
|
|
commonloon Tux's lil' helper
Joined: 13 Apr 2004 Posts: 133 Location: Marin, CA
|
Posted: Fri Oct 22, 2004 6:28 pm Post subject: Looks promising. |
|
|
Thanks I'll check it out. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|