Slackware 12 won't mount lvm2 vols if shutdown with a snapshot vol.
This is very easy to duplicate:
1. Install slackware 12. 2. Create a group: Code:
# vgcreate grp_home /dev/sda7 Code:
# lvcreate -L1500 -n vol_home grp_home Code:
# mke2fs -j /dev/grp_home/vol_home Code:
# mount /dev/grp_home/vol_home /home Code:
# lvcreate -L500 -s -n snp_home /dev/grp_home/vol_home Code:
root@server01:/# lvdisplay It doesn't create the /dev/grp_home devices and it reports the following errors: Code:
device-mapper: table: 253:1: snapshot-origin: unknown target type The second I delete the snapshot everything works fine: Code:
# lvremove /dev/grp_home/snp_home Code:
root@server01:~# mount /home Any thoughts would be very helpful. schu |
Report it upstream, anyway.
|
Ok, figured it out:
In slackware 12 there is a bug where the dm-snapshot kernel module is not loaded when LVM2 volumes are brought up. This causes any volume that has a snapshot to fail to mount with the error: device-mapper: table: 253:1: snapshot-origin: unknown target type This patch to /etc/rc.d/rc.S fixes the problem by getting the list of logical volumes and if any of them depend on a snapshot it loads the module. Eric, if your around, please include the patch in the next slackware release as currently any volumes with a snapshot are not mounted on boot. Thanks, schu --- rc.S.orig 2007-12-29 18:22:03.000000000 -0900 +++ rc.S 2007-12-29 15:23:06.000000000 -0900 @@ -49,6 +49,10 @@ # Try to load a device-mapper kernel module: /sbin/modprobe -q dm-mod fi + # if we have a snapshot then load the snapshot module: + if /sbin/lvdisplay --ignorelockingfailure | grep -q snapshot; then + /sbin/modprobe -q dm-snapshot + fi # Scan for new volume groups: /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null if [ $? = 0 ]; then |
I found another bug in Slackware 12:
Code:
root@server01:/etc/udev/rules.d# lvremove -f /dev/grp_home/snp_home Code:
--- 64-device-mapper.rules.orig 2008-01-02 14:02:02.000000000 -0900 For those that don't want to patch, installing udev-116-i486-1 from -current also seems to fix the problem. schu |
All times are GMT -5. The time now is 02:17 PM. |