https://bugzilla.novell.com/show_bug.cgi?id=241990
Summary: VG / LV / snapshot not recognized when snapshot exists
(lvm2)
Product: openSUSE 10.2
Version: Final
Platform: i686
OS/Version: SuSE Other
Status: NEW
Severity: Major
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@forge.provo.novell.com
ReportedBy: webclark@rochester.rr.com
QAContact: qa@suse.de
CC: webclark@rochester.rr.com
OS: Suse 10.2
I posted this to suseforums.net for a week and 35 views and got no responses.
It seems clear to me that this is not right, so I am posting as a bug.
My system has an LVM so that I can build a single "nethome" file system
spanning two physical disks.
The LVM is not used for the boot, root, or any other system oriented drive.
Just this "nethome".
It is a pretty simple "clean" install about a month ago, and works fine
otherwise.
I can create a snapshot and mount it successfully, but if I try to shutdown and
boot while the snapshot is in existence, booting fails.
Descriptions of the use of snapshots include using them as a mechanism to
enable user's to recover deleted files, so I conclude that it should be OK to
boot with a snapshot active. I see nothing in the LVM documentation to
indicate otherwise.
Below I give the sequence of commands to reproduce the problem, and I have
typed the pertinent stuff printed on the console when I boot. I did a
"vgdisplay -v" at several points in the process, and have attached these at the
end. I can reproduce this over and over, it never fails to fail. To be able to
boot again, I simply lvremove the snapshot (using the right path even though it
is not visible in the file system).
Presumably the purpose here is to report the bug so that it can be fixed in the
next version, but if possible, I would greatly appreciate knowing how I can fix
it in the current version. I don't require hand-holding, just a concise
indication of what to do. I have been using UNIX and now Linux for many years,
and so know my way around reasonably well once pointed in the right direction,
although I don't know all of the particulars of a given system.
Thank you.
-----------------
To reproduce:
-----------------
After a normal boot...
See "vgdisplay -v" with lvm mounted on /nethome attached. (I am running like
this *now*).
lvcreate --size 8G --snapshot --name snap /dev/vg_rnscserver_01/lv_nethome_01
works.
See "vgdisplay -v" with snapshot in existance but not mounted attached.
mount /dev/vg_rnscserver_01/snap /nethome.snap
works.
snapshot and base lvm accessible. I have not exercised them in this mode (with
a snapshot), but it appears to be functional.
See "vgdisplay -v with snapshot mounted, attached.
Reboot (With snapshot in existence)
The following messages are output to the console, but not captured in dmesg,
boot.log, or messages:
Activating Device mapper...
device-mapper: ioctl:4.7.0-ioctl (2006-06-24) initialized: dm-devel@redhat.com
Starting MD RAID
Waiting for udev to settle...
Scanning for LVM volume groups...
Reading all physical volumes. Thismay take a while...
Found volume group "vg_rnscserver_01" using metatype lvm2
Activating LVM volume groups...
device-mapper: table: 253: 1: snapshot-origin: unknown target type
device-mapper: ioctl: error adding target to table
device-mapper: reload ioctl failed: invalid argument
1 Logical volume(s) in volume group "vg_rnscserver_01" now active
Waiting for /dev/vg_rnscserver_01/lv_nethome_01 .
No more events
Checking file systems
etc.
Single user root shell presented.
Sure enough /dev/vg_rnscserver_01 does not exist.
See "vtdisplay -v" at this point output attached.
lvremove /dev/vg_rnscserver_01/snap
works (even though /dev/vg_rnscserver_01 is not visible in the file system.
See "vgdisplay -v" after snapshot is removed, attached.
Reboot.
System boots successfully, lvm is mounted and works.
--------------------
ATTACHMENTS:
--------------------
"vgdisplay -v" with lvm mounted (no snapshot)
---------------------------------------------------------
--- Volume group ---
VG Name vg_rnscserver_01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 18
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 203.41 GB
PE Size 4.00 MB
Total PE 52073
Alloc PE / Size 49920 / 195.00 GB
Free PE / Size 2153 / 8.41 GB
VG UUID E4kcZk-Y73I-0vrE-JvT5-Sf8t-FDId-UQs50R
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/lv_nethome_01
VG Name vg_rnscserver_01
LV UUID TPxEJ5-rDSD-ZypA-92l3-kmbY-0Cva-KORW2N
LV Write Access read/write
LV Status available
# open 1
LV Size 195.00 GB
Current LE 49920
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Physical volumes ---
PV Name /dev/hda8
PV UUID 1byvJe-bX7P-i5rp-bPnW-BVRC-PXw2-NhA9tq
PV Status allocatable
Total PE / Free PE 23456 / 2153
PV Name /dev/hdb1
PV UUID 1WORbE-Fhu2-xETa-D3fe-qce5-lxBV-gWc7uq
PV Status allocatable
Total PE / Free PE 28617 / 0
-----------------------------------------------------------------
"vgdisplay -v" with snapshot created but not mounted
-----------------------------------------------------------------
--- Volume group ---
VG Name vg_rnscserver_01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 17
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 203.41 GB
PE Size 4.00 MB
Total PE 52073
Alloc PE / Size 51968 / 203.00 GB
Free PE / Size 105 / 420.00 MB
VG UUID E4kcZk-Y73I-0vrE-JvT5-Sf8t-FDId-UQs50R
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/lv_nethome_01
VG Name vg_rnscserver_01
LV UUID TPxEJ5-rDSD-ZypA-92l3-kmbY-0Cva-KORW2N
LV Write Access read/write
LV snapshot status source of
/dev/vg_rnscserver_01/snap [active]
LV Status available
# open 1
LV Size 195.00 GB
Current LE 49920
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/snap
VG Name vg_rnscserver_01
LV UUID 6o7IP6-Sei1-8buE-SC0f-57E5-8uaE-0n7gBS
LV Write Access read/write
LV snapshot status active destination for /dev/vg_rnscserver_01/lv_nethome_01
LV Status available
# open 0
LV Size 195.00 GB
Current LE 49920
COW-table size 8.00 GB
COW-table LE 2048
Allocated to snapshot 0.00%
Snapshot chunk size 8.00 KB
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Physical volumes ---
PV Name /dev/hda8
PV UUID 1byvJe-bX7P-i5rp-bPnW-BVRC-PXw2-NhA9tq
PV Status allocatable
Total PE / Free PE 23456 / 105
PV Name /dev/hdb1
PV UUID 1WORbE-Fhu2-xETa-D3fe-qce5-lxBV-gWc7uq
PV Status allocatable
Total PE / Free PE 28617 / 0
-----------------------------------------------
"vgdisplay -v" with snapshot mounted
-----------------------------------------------
--- Volume group ---
VG Name vg_rnscserver_01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 17
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 203.41 GB
PE Size 4.00 MB
Total PE 52073
Alloc PE / Size 51968 / 203.00 GB
Free PE / Size 105 / 420.00 MB
VG UUID E4kcZk-Y73I-0vrE-JvT5-Sf8t-FDId-UQs50R
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/lv_nethome_01
VG Name vg_rnscserver_01
LV UUID TPxEJ5-rDSD-ZypA-92l3-kmbY-0Cva-KORW2N
LV Write Access read/write
LV snapshot status source of
/dev/vg_rnscserver_01/snap [active]
LV Status available
# open 1
LV Size 195.00 GB
Current LE 49920
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/snap
VG Name vg_rnscserver_01
LV UUID 6o7IP6-Sei1-8buE-SC0f-57E5-8uaE-0n7gBS
LV Write Access read/write
LV snapshot status active destination for /dev/vg_rnscserver_01/lv_nethome_01
LV Status available
# open 1
LV Size 195.00 GB
Current LE 49920
COW-table size 8.00 GB
COW-table LE 2048
Allocated to snapshot 0.01%
Snapshot chunk size 8.00 KB
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Physical volumes ---
PV Name /dev/hda8
PV UUID 1byvJe-bX7P-i5rp-bPnW-BVRC-PXw2-NhA9tq
PV Status allocatable
Total PE / Free PE 23456 / 105
PV Name /dev/hdb1
PV UUID 1WORbE-Fhu2-xETa-D3fe-qce5-lxBV-gWc7uq
PV Status allocatable
Total PE / Free PE 28617 / 0
---------------------------------------------------------------------
"vgdisplay-v" after booting, boot fails, in single user mode
---------------------------------------------------------------------
--- Volume group ---
VG Name vg_rnscserver_01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 14
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 203.41 GB
PE Size 4.00 MB
Total PE 52073
Alloc PE / Size 51968 / 203.00 GB
Free PE / Size 105 / 420.00 MB
VG UUID E4kcZk-Y73I-0vrE-JvT5-Sf8t-FDId-UQs50R
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/lv_nethome_01
VG Name vg_rnscserver_01
LV UUID TPxEJ5-rDSD-ZypA-92l3-kmbY-0Cva-KORW2N
LV Write Access read/write
LV snapshot status source of
/dev/vg_rnscserver_01/snap [INACTIVE]
LV Status available
# open 0
LV Size 195.00 GB
Current LE 49920
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/snap
VG Name vg_rnscserver_01
LV UUID dPq31r-02ZB-6XzT-AlPN-o3qj-f5na-xh8x01
LV Write Access read/write
LV snapshot status INACTIVE destination for
/dev/vg_rnscserver_01/lv_nethome_01
LV Status NOT available
LV Size 195.00 GB
Current LE 49920
COW-table size 8.00 GB
COW-table LE 2048
Snapshot chunk size 8.00 KB
Segments 1
Allocation inherit
Read ahead sectors 0
--- Physical volumes ---
PV Name /dev/hda8
PV UUID 1byvJe-bX7P-i5rp-bPnW-BVRC-PXw2-NhA9tq
PV Status allocatable
Total PE / Free PE 23456 / 105
PV Name /dev/hdb1
PV UUID 1WORbE-Fhu2-xETa-D3fe-qce5-lxBV-gWc7uq
PV Status allocatable
Total PE / Free PE 28617 / 0
----------------------------------------------------------------------------------------------
"vgdisplay -v" in single user mode after failed boot, after snapshot is removed
----------------------------------------------------------------------------------------------
--- Volume group ---
VG Name vg_rnscserver_01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 15
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 203.41 GB
PE Size 4.00 MB
Total PE 52073
Alloc PE / Size 49920 / 195.00 GB
Free PE / Size 2153 / 8.41 GB
VG UUID E4kcZk-Y73I-0vrE-JvT5-Sf8t-FDId-UQs50R
--- Logical volume ---
LV Name /dev/vg_rnscserver_01/lv_nethome_01
VG Name vg_rnscserver_01
LV UUID TPxEJ5-rDSD-ZypA-92l3-kmbY-0Cva-KORW2N
LV Write Access read/write
LV Status available
# open 0
LV Size 195.00 GB
Current LE 49920
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Physical volumes ---
PV Name /dev/hda8
PV UUID 1byvJe-bX7P-i5rp-bPnW-BVRC-PXw2-NhA9tq
PV Status allocatable
Total PE / Free PE 23456 / 2153
PV Name /dev/hdb1
PV UUID 1WORbE-Fhu2-xETa-D3fe-qce5-lxBV-gWc7uq
PV Status allocatable
Total PE / Free PE 28617 / 0
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.