![](https://seccdn.libravatar.org/avatar/14e1cd3a82514b8c4d9df4527d9996e2.jpg?s=120&d=mm&r=g)
i am working on cloning some systems and i have run into a specific problem. it occurs when i clone systems with two different scsi adapters, adding lvm, and figuring out how to get the scsi module loaded so that vgscan can find the scsi devices. normally, scsi modules are not needed to be loaded via initrd unless the root filesystem is mounted on a scsi device. however, in my situation i have found it necessary to have the scsi module loaded in the initrd through linuxrc in order to create the devices that will have filesystems with lvm logical volumes. my master machine has a scsi adapter but is not being used at all (scsi_hostadapter off in /etc/modules.conf). my cloned system will have /opt and /home on lvm logical volumes with / on physical partition of an ide drive. the problem i run into is that without the scsi modules loaded from the linuxrc in the initrd, when vgscan is run there is a failure because the scsi devices that contain lvm are not loaded. this is normally not a problem because my logical volumes are not part of the root filesystem. however, even when i add them to modules.conf they never get loaded. i guess my questions are: why does it appear that suse requires ALL scsi modules loaded through initrd even if they are not used for root filesystem? why when i change scsi_hostadapter entry in /etc/modules.conf to my scsi module does it not get loaded before vgscan is run?
![](https://seccdn.libravatar.org/avatar/72ee3b9e0735cf98a1e936a90fc087ed.jpg?s=120&d=mm&r=g)
On Mon, 2003-04-14 at 20:29, Rich Turner wrote:
i guess my questions are: why does it appear that suse requires ALL scsi modules loaded through initrd even if they are not used for root filesystem?
Probably because your modules.conf isn't properly configured. In your modules.conf you have a line alias char-major-109 lvm-mod After this line you could put pre-install lvm-mod /sbin/modprobe "-k" "your scsi driver module"
![](https://seccdn.libravatar.org/avatar/14e1cd3a82514b8c4d9df4527d9996e2.jpg?s=120&d=mm&r=g)
ok, i agree that will take care of the problem. however, even when i clone a system without lvm it will not load my scsi_hostadapter. also, perhaps lvm is built into the kernel and there would not be a use for "pre-install" for lvm-mod. what is strange is that after the system boots i am able to do a modprobe of my scsi_hostadapter and then mount my filesystems. why was the module not loaded on boot from the modules listed in modules.conf? what part of the boot process actually loads the "scsi_hostadapter" module line in the modules.conf? On Mon, 2003-04-14 at 11:58, Anders Johansson wrote:
On Mon, 2003-04-14 at 20:29, Rich Turner wrote:
i guess my questions are: why does it appear that suse requires ALL scsi modules loaded through initrd even if they are not used for root filesystem?
Probably because your modules.conf isn't properly configured.
In your modules.conf you have a line
alias char-major-109 lvm-mod
After this line you could put
pre-install lvm-mod /sbin/modprobe "-k" "your scsi driver module"
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
-- Rich Turner Storix Software (619)702-6500 phone (619)702-6501 fax http://www.storix.com
![](https://seccdn.libravatar.org/avatar/72ee3b9e0735cf98a1e936a90fc087ed.jpg?s=120&d=mm&r=g)
On Mon, 2003-04-14 at 21:15, Rich Turner wrote:
ok, i agree that will take care of the problem. however, even when i clone a system without lvm it will not load my scsi_hostadapter. also, perhaps lvm is built into the kernel and there would not be a use for "pre-install" for lvm-mod.
what is strange is that after the system boots i am able to do a modprobe of my scsi_hostadapter and then mount my filesystems.
Is this even for non-lvm systems? You should be able to do mount /dev/sda1 /mnt/foo for example, and have scsi_hostadapter loaded automatically. In fact, a line with sd-something in fstab should also trigger scsi_hostadapter to be loaded, except for the root fs.
why was the module not loaded on boot from the modules listed in modules.conf? what part of the boot process actually loads the "scsi_hostadapter" module line in the modules.conf?
modules.conf is a config file for the kerneld module loader. As soon as a scsi device in /dev is opened, it should trigger scsi_hostadapter to be loaded, assuming the root file system is mounted, naturally. It's possible that vgscan tries to be clever and not go through all devices in /dev, and only look at those in /proc/scsi/scsi or something, which won't trigger kerneld.
![](https://seccdn.libravatar.org/avatar/14e1cd3a82514b8c4d9df4527d9996e2.jpg?s=120&d=mm&r=g)
On Mon, 2003-04-14 at 15:21, Anders Johansson wrote:
On Mon, 2003-04-14 at 21:15, Rich Turner wrote:
ok, i agree that will take care of the problem. however, even when i clone a system without lvm it will not load my scsi_hostadapter. also, perhaps lvm is built into the kernel and there would not be a use for "pre-install" for lvm-mod.
what is strange is that after the system boots i am able to do a modprobe of my scsi_hostadapter and then mount my filesystems.
Is this even for non-lvm systems? You should be able to do
mount /dev/sda1 /mnt/foo
for example, and have scsi_hostadapter loaded automatically. In fact, a line with sd-something in fstab should also trigger scsi_hostadapter to be loaded, except for the root fs.
i will have to take another close look at my /etc/modules.conf because as you indicate any access to /dev/sda should prompt kerneld to load scsi_hostadapter. on my first investigation it appeared that ANY scsi support necessary had to be included in the initrd (whether or not it was needed for the root filesystem). is there anywhere else i need to check to make sure my scsi_hostadapter gets loaded on boot besides /etc/modules.conf? it was set to "off" before. how does the system know to load sd_mod? anytime a sd device is accessed?
why was the module not loaded on boot from the modules listed in modules.conf? what part of the boot process actually loads the "scsi_hostadapter" module line in the modules.conf?
modules.conf is a config file for the kerneld module loader. As soon as a scsi device in /dev is opened, it should trigger scsi_hostadapter to be loaded, assuming the root file system is mounted, naturally.
It's possible that vgscan tries to be clever and not go through all devices in /dev, and only look at those in /proc/scsi/scsi or something, which won't trigger kerneld.
vgscan runs but cant find any devices related to its volume groups because the scsi modules havent loaded. the first thing i need to do is get my scsi modules to load on boot. which i havent been successful in doing yet
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
-- Rich Turner Storix Software (619)702-6500 phone (619)702-6501 fax http://www.storix.com
participants (2)
-
Anders Johansson
-
Rich Turner