Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lvm shutdown problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
fremda
n00b
n00b


Joined: 05 Dec 2011
Posts: 9

PostPosted: Fri Aug 10, 2012 9:42 am    Post subject: lvm shutdown problem Reply with quote

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:
Code:
vg
vg0

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
View user's profile Send private message
yzg
Guru
Guru


Joined: 18 Jun 2005
Posts: 493

PostPosted: Fri Jan 11, 2013 11:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum