creating a LUKS snapshot hangs the system
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lvm2
LVM cannot create a snapshot of a LUKS encrypted volume.
To reproduce:
1. Install Ubuntu 10.04 Lucid Lynx to a LUKS root using the alternate installer.
2. Run: lvcreate --snapshot /dev/vg00/root --size 2G --name backup --verbose
This hangs the system. Verbose lvcreate messages are normal. The last line printed is:
Suspending vg00-root (252:1) with filesystem sync with device flush
The console error is:
[360:540149] INFO: task flush-252:1:486 blocked for more than 120 seconds.
[360:609736] INFO: task lvcreate:1320 blocked for more than 120 seconds.
These console messages periodically repeat, but lvcreate never returns and the system becomes unresponsive and requires a hard reset.
The snapshot volume is created and is visible after boot, but it seems to be corrupt:
# mount /dev/vg00/backup /mnt
mount: unknown filesystem type 'DM_snapshot_cow'
I tested a similar storage configuration on an external disk connected to the same computer; doing an LVM snapshot inside LUKS behaves correctly on an external disk.
Thus, this LVM glitch is probably limited to taking a snapshot of a root filesystem that is in LUKS.
Also note that nothing is being logged into the syslog or dmesg. The hang instantly stops all IO to the root filesystem.