View previous topic :: View next topic |
Author |
Message |
fremda n00b
Joined: 05 Dec 2011 Posts: 9
|
Posted: Fri Aug 10, 2012 9:42 am Post subject: lvm shutdown problem |
|
|
lvm 2.02.95-r4
1. With two or more volume groups the shutdown script (/etc/init.d/lvm stop) fails due to
Code: | VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null) |
output for two vgs:
The newline character shouldn't be there. It breaks the folowing script
Code: | #! /sbin/lvm --config 'global { locking_dir = "/run/lock/lvm" }'\nlvchange --sysinit -a ln vg
vg0\nvgchange --sysinit -a ln\n |
2. I have root, usr, and home in an lvm volume group. During a shutdown procedure I get
Code: | Logical volume vg0/root contains a filesystem in use.
Logical volume vg0/usr contains a filesystem in use |
What can be done to fix it? The home partition is unmounted before these errors. I'm not even sure whether root and usr are remounted in read-only. |
|
Back to top |
|
|
yzg Guru
Joined: 18 Jun 2005 Posts: 493
|
Posted: Fri Jan 11, 2013 11:34 pm Post subject: |
|
|
I had the same problem. To fix it, edit /etc/init.d/lvm and replace this line:
Code: |
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix 2> /dev/null)
|
with
Code: |
VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix | tr '\n' ' ' 2> /dev/null)
|
I have filed a bug https://bugs.gentoo.org/show_bug.cgi?id=451478 |
|
Back to top |
|
|
|