This is very easy to duplicate:
1. Install slackware 12.
2. Create a group:
Code:
# vgcreate grp_home /dev/sda7
3. Create a volume:
Code:
# lvcreate -L1500 -n vol_home grp_home
4. Make a filesystem:
Code:
# mke2fs -j /dev/grp_home/vol_home
5. mount the file system:
Code:
# mount /dev/grp_home/vol_home /home
6. Make a snapshot:
Code:
# lvcreate -L500 -s -n snp_home /dev/grp_home/vol_home
Ok, so far so good, I have my snapshot of /home. You can see that it's working just fine:
Code:
root@server01:/# lvdisplay
--- Logical volume ---
LV Name /dev/grp_home/vol_home
VG Name grp_home
LV UUID 6XsUIm-YEv0-IUob-t1v2-GY4R-HDQ9-ATNg0C
LV Write Access read/write
LV snapshot status source of
/dev/grp_home/snp_home [active]
LV Status available
# open 1
LV Size 1.46 GB
Current LE 375
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/grp_home/snp_home
VG Name grp_home
LV UUID axupXY-2BbR-ZAJn-V7DM-tHVI-eSpi-mSj19e
LV Write Access read/write
LV snapshot status active destination for /dev/grp_home/vol_home
LV Status available
# open 0
LV Size 1.46 GB
Current LE 375
COW-table size 500.00 MB
COW-table LE 125
Allocated to snapshot 0.00%
Snapshot chunk size 8.00 KB
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3
Now I change my fstab to mount /home at boot, then I kick it.
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
device-mapper: ioctl: error adding target to table
EXT3-fs: unable to read superblock
If I manually run vgscan again it will create the block devices, but the filesystem isn't there so I can't mount /home.
The second I delete the snapshot everything works fine:
Code:
# lvremove /dev/grp_home/snp_home
Logical volume "snp_home" successfully removed
Now it works:
Code:
root@server01:~# mount /home
root@server01:~#
Does anyone know why this happens? Almost certainly it's a bug in LVM2, however that is maintained by the Redhat crowd which means that there probably isn't a way to report the problem on another distro.
Any thoughts would be very helpful.
schu