2011-12-02

Can't deactivate volume group "vg-main" with 1 open logical volume(s)

Can't deactivate volume group "vg-main" with 1 open logical volume(s) ... failed!
After moving to LVM2 on my Debian boxen, I began seeing this disturbing error message (with the word "failed!" in red) at shutdown. Apparently, with the root filesystem in an LVM volume, the volume group cannot be deactivated.

Failed or not, the system seemed to work normally - I shut it down at least once a day and it always comes right back up when I turn the computer on. I noticed a bug has been reported concerning this message:

#466141 lvm2: error message during shutdown (Can't deactivate volume group...)

Feri's reply (message #25) to that bug report explains it:

If a volume group contains mounted (even ro) logical volumes, it can't
be deactivated. On the other hand, deactivating a volume group does
not entail writing to the disk, so powering off with an active volume
group isn't bad in itself, if all of its logical volumes are "clean"
(eg. mounted read-only). If root is on a logical volume, you will
always get a warning about its logical volume being in use during
shutdown.
The question is, would it not be better to change the warning to something that doesn't generate fear? How about this:

Deactivating volume groups: root filesystem in logical volume detected - mounted read-only. All other logical volumes unmounted. 

No comments:

Post a Comment