From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3BA55Br009604 for ; Wed, 11 Apr 2012 06:05:05 -0400 Received: from nelson.canoo.com (gate0.canoo.com [195.141.68.118]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3BA51eJ018576 for ; Wed, 11 Apr 2012 06:05:02 -0400 Received: from localhost (localhost [127.0.0.1]) by nelson.canoo.com (Postfix) with ESMTP id 4A1176FC093 for ; Wed, 11 Apr 2012 12:05:00 +0200 (CEST) Received: from nelson.canoo.com ([127.0.0.1]) by localhost (nelson.canoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xYe-1HfoY6uq for ; Wed, 11 Apr 2012 12:04:59 +0200 (CEST) Received: from nelson.canoo.com (nelson.canoo.com [192.168.0.9]) by nelson.canoo.com (Postfix) with ESMTP id 8B2446FC031 for ; Wed, 11 Apr 2012 12:04:59 +0200 (CEST) Date: Wed, 11 Apr 2012 12:04:59 +0200 (CEST) From: Erik Schwalbe Message-ID: <1968283131.298650.1334138699493.JavaMail.root@nelson.canoo.com> In-Reply-To: <2049162317.298117.1334137791059.JavaMail.root@nelson.canoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_298649_313672467.1334138699492" Subject: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: linux-lvm@redhat.com ------=_Part_298649_313672467.1334138699492 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, we have a problem with hiding/deactivating a stacked volume group during startup. System is a Ubuntu 10.4.4 LTS (NAS). lvm2: 2.02.54-1ubuntu4.1ppa5 lvs: backup-all data -wi-ao 3.00t fileserver-forBackup data -wi-ao 50.00g .... kvm_disk0 data -wi-ao 400.00g vm-203-disk-1 kvm_disk0 -wi-ao- 28.01g .... kvm_disk0 is used as device for iscsitarget. The iscsiinitiator created a new volume group (kvm_disk0) on the blockdevice and new virtual disks (vm-203-disk-1) . Our problem is, that the iscsitarget host found not only the VG "data" during system startup but also the other VG (kvm_disk0) and activate it. So DRBD can't get exclusive access to the LV kvm_disk0. We try to filter in lvm.conf, but after startup, the VG kvm_disk0 is allways activated. Thank you for help. Regards, Erik ------=_Part_298649_313672467.1334138699492 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: arial,helvetica,sans-serif; font-size: 10pt; colo= r: #000000'>Hi,

we have a problem with hiding/deactivating a stacked= volume group during startup.

System is a Ubuntu 10.4.4 LTS (NAS).lvm2: 2.02.54-1ubuntu4.1ppa5

lvs:
backup-all   &= nbsp;           &nbs= p;  data      -wi-ao   3.00t &= nbsp;           &nbs= p;            &= nbsp;          
files= erver-forBackup        data  &= nbsp;   -wi-ao  50.00g      &n= bsp;            = ;  
....
kvm_disk0      &nbs= p;            data&n= bsp;     -wi-ao 400.00g     &n= bsp;            = ;            &n= bsp;      
vm-203-disk-1   = ;            kvm_dis= k0 -wi-ao-  28.01g 
....

kvm_disk0 is used as device f= or iscsitarget.

The iscsiinitiator created a new volume group (kvm_d= isk0) on the blockdevice and new virtual disks (vm-203-disk-1).

Our = problem is, that the iscsitarget host found not only the VG "data" during s= ystem startup but also the other VG (kvm_disk0) and activate it.
So DRBD= can't get exclusive access to the LV kvm_disk= 0.

We try to filter in lvm.conf, but after startup, the VG kvm_disk0= is allways activated.

Thank you for help.

Regards,
Erik
 





= 3D"JAX

Erleben Sie Canoo an der JAX! Hochkarätige Talks, unser neuer HTML5 Day und geballte Software-Expertise warten auf Sie. Wir freuen uns auf Ihren Besuch!

Rheingoldhalle Mainz |  16. − 20. April 2012  |  www.jax.de/2012



= ------=_Part_298649_313672467.1334138699492-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F86B870.5090301@redhat.com> Date: Thu, 12 Apr 2012 12:11:44 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <1968283131.298650.1334138699493.JavaMail.root@nelson.canoo.com> In-Reply-To: <1968283131.298650.1334138699493.JavaMail.root@nelson.canoo.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development Cc: Erik Schwalbe On 04/11/2012 11:04 AM, Erik Schwalbe wrote: > The iscsiinitiator created a new volume group (kvm_disk0) on the > blockdevice and new virtual disks (vm-203-disk-1). > > Our problem is, that the iscsitarget host found not only the VG "data" > during system startup but also the other VG (kvm_disk0) and activate it. > So DRBD can't get exclusive access to the LV kvm_disk0. > > We try to filter in lvm.conf, but after startup, the VG kvm_disk0 is > allways activated. Please post the filter you are using as well as the full path name of the disk you are attempting to filter (a complete recursive listing of /dev as generated by lvmdump or run by hand would be useful. You can use a service like pastebin for this - please don't send large attachments to the list). There are other ways to control activation if for some reason filtering will not work (e.g. the device name is not stable). Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3CBfZln009089 for ; Thu, 12 Apr 2012 07:41:35 -0400 Received: from nelson.canoo.com (gate0.canoo.com [195.141.68.118]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3CBfW2o023176 for ; Thu, 12 Apr 2012 07:41:32 -0400 Received: from localhost (localhost [127.0.0.1]) by nelson.canoo.com (Postfix) with ESMTP id E95406FC093 for ; Thu, 12 Apr 2012 13:41:31 +0200 (CEST) Received: from nelson.canoo.com ([127.0.0.1]) by localhost (nelson.canoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZiB61e4tkJva for ; Thu, 12 Apr 2012 13:41:31 +0200 (CEST) Received: from nelson.canoo.com (nelson.canoo.com [192.168.0.9]) by nelson.canoo.com (Postfix) with ESMTP id 49A3A6FC031 for ; Thu, 12 Apr 2012 13:41:31 +0200 (CEST) Date: Thu, 12 Apr 2012 13:41:31 +0200 (CEST) From: Erik Schwalbe Message-ID: <1875424017.355888.1334230891233.JavaMail.root@nelson.canoo.com> In-Reply-To: <4F86B870.5090301@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development Hi, filter was: filter = [ "r|/dev/data/kvm_disk0|" ] path: /dev/data/kvm_disk0 -> ../mapper/data-kvm_disk0 The device name is stable, but what other way of control activation are possible?? Regards, Erik ----- Original Message ----- From: "Bryn M. Reeves" To: "LVM general discussion and development" Cc: "Erik Schwalbe" Sent: Thursday, 12 April, 2012 1:11:44 PM Subject: Re: [linux-lvm] Hide volume group during startup On 04/11/2012 11:04 AM, Erik Schwalbe wrote: > The iscsiinitiator created a new volume group (kvm_disk0) on the > blockdevice and new virtual disks (vm-203-disk-1). > > Our problem is, that the iscsitarget host found not only the VG "data" > during system startup but also the other VG (kvm_disk0) and activate it. > So DRBD can't get exclusive access to the LV kvm_disk0. > > We try to filter in lvm.conf, but after startup, the VG kvm_disk0 is > allways activated. Please post the filter you are using as well as the full path name of the disk you are attempting to filter (a complete recursive listing of /dev as generated by lvmdump or run by hand would be useful. You can use a service like pastebin for this - please don't send large attachments to the list). There are other ways to control activation if for some reason filtering will not work (e.g. the device name is not stable). Regards, Bryn. _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F86C1F4.4080809@redhat.com> Date: Thu, 12 Apr 2012 12:52:20 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <1875424017.355888.1334230891233.JavaMail.root@nelson.canoo.com> In-Reply-To: <1875424017.355888.1334230891233.JavaMail.root@nelson.canoo.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development Cc: Erik Schwalbe On 04/12/2012 12:41 PM, Erik Schwalbe wrote: > Hi, > > filter was: > > filter = [ "r|/dev/data/kvm_disk0|" ] > > path: > /dev/data/kvm_disk0 -> ../mapper/data-kvm_disk0 To filter a device-mapper device you also have to filter out the /dev/dm-N device nodes that udev manages. There's also a symlink from /dev/$VG_NAME/$LV_NAME to the dm-N node (although I think that should be handled by filtering /dev/dm-N). I'd be using something like: [ "r|/dev/dm.*|", "r|/dev/$VG_NAME|", "a|.*|"] Alternately (and I prefer this for many configurations) you can accept ("a|..|") the device you need for the data VG and reject all other devices ("r|.*|"). > The device name is stable, but what other way of control activation are possible?? Tags but since you're not currently filtering dm-N nodes I would try that first. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3CC1goF026248 for ; Thu, 12 Apr 2012 08:01:42 -0400 Received: from mail09.linbit.com (mail09.linbit.com [212.69.161.110]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3CC1eZk007039 for ; Thu, 12 Apr 2012 08:01:40 -0400 Received: from soda.linbit (unknown [10.9.9.55]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 775C8106DCC2 for ; Thu, 12 Apr 2012 14:01:39 +0200 (CEST) Date: Thu, 12 Apr 2012 14:01:39 +0200 From: Lars Ellenberg Message-ID: <20120412120139.GP9163@barkeeper1-xen.linbit> References: <4F86B870.5090301@redhat.com> <1875424017.355888.1334230891233.JavaMail.root@nelson.canoo.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1875424017.355888.1334230891233.JavaMail.root@nelson.canoo.com> Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-lvm@redhat.com On Thu, Apr 12, 2012 at 01:41:31PM +0200, Erik Schwalbe wrote: > Hi, > > filter was: > > filter = [ "r|/dev/data/kvm_disk0|" ] > > path: > /dev/data/kvm_disk0 -> ../mapper/data-kvm_disk0 > > The device name is stable, but what other way of control activation are possible?? Forgot to update the initramfs/initrd, and the VGs are activated from there already, even before pivoting to the real root? Run update-initramfs or mkinitrd /boot/initramfs-`uname -r`.img `uname -r` or something like that. > > Regards, > Erik > > ----- Original Message ----- > From: "Bryn M. Reeves" > To: "LVM general discussion and development" > Cc: "Erik Schwalbe" > Sent: Thursday, 12 April, 2012 1:11:44 PM > Subject: Re: [linux-lvm] Hide volume group during startup > > On 04/11/2012 11:04 AM, Erik Schwalbe wrote: > > The iscsiinitiator created a new volume group (kvm_disk0) on the > > blockdevice and new virtual disks (vm-203-disk-1). > > > > Our problem is, that the iscsitarget host found not only the VG "data" > > during system startup but also the other VG (kvm_disk0) and activate it. > > So DRBD can't get exclusive access to the LV kvm_disk0. > > > > We try to filter in lvm.conf, but after startup, the VG kvm_disk0 is > > allways activated. > > Please post the filter you are using as well as the full path name of > the disk you are attempting to filter (a complete recursive listing of > /dev as generated by lvmdump or run by hand would be useful. You can use > a service like pastebin for this - please don't send large attachments > to the list). > > There are other ways to control activation if for some reason filtering > will not work (e.g. the device name is not stable). > > Regards, > Bryn. -- : Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3CCEAru031129 for ; Thu, 12 Apr 2012 08:14:10 -0400 Received: from nelson.canoo.com (gate0.canoo.com [195.141.68.118]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3CCE8oo009996 for ; Thu, 12 Apr 2012 08:14:09 -0400 Received: from localhost (localhost [127.0.0.1]) by nelson.canoo.com (Postfix) with ESMTP id A1DDD6FC093 for ; Thu, 12 Apr 2012 14:14:08 +0200 (CEST) Received: from nelson.canoo.com ([127.0.0.1]) by localhost (nelson.canoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7LgexknTVHSF for ; Thu, 12 Apr 2012 14:14:08 +0200 (CEST) Received: from nelson.canoo.com (nelson.canoo.com [192.168.0.9]) by nelson.canoo.com (Postfix) with ESMTP id 2CC716FC031 for ; Thu, 12 Apr 2012 14:14:08 +0200 (CEST) Date: Thu, 12 Apr 2012 14:14:08 +0200 (CEST) From: Erik Schwalbe Message-ID: <1943758108.360003.1334232848115.JavaMail.root@nelson.canoo.com> In-Reply-To: <4F86C1F4.4080809@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development Hi, there is only one dm-device in /dev: ... drwxr-xr-x 5 root root 100 2012-04-05 12:50 disk brw-rw---- 1 root disk 251, 18 2012-04-05 12:51 dm-18 drwxr-xr-x 4 root root 80 2012-04-05 12:51 drbd ... /dev/data/kvm_disk0 is a blockdevice for drbd, so there are many drbd files in /dev ... brw-rw---- 1 root disk 147, 20 2012-04-08 11:48 drbd20 ... drbd20 is the drbd resource using kvm_disk0 as device. The symlink in /dev/data/ is: lrwxrwxrwx 1 root root 24 2012-04-05 12:51 kvm_disk0 -> ../mapper/data-kvm_disk0 Should I be using this: filter = [ "r|/dev/mapper/data-kvm_disk0|", "r|/dev/kvm_disk0|", "a|.*|"] I know, it is a little bit confusing. The LV in VG data is called kvm_disk0 and the VG initiated on this device is also called kvm_disk0. Sorry, but thank you for help. Regards, Erik ----- Original Message ----- From: "Bryn M. Reeves" To: "LVM general discussion and development" Cc: "Erik Schwalbe" Sent: Thursday, 12 April, 2012 1:52:20 PM Subject: Re: [linux-lvm] Hide volume group during startup On 04/12/2012 12:41 PM, Erik Schwalbe wrote: > Hi, > > filter was: > > filter = [ "r|/dev/data/kvm_disk0|" ] > > path: > /dev/data/kvm_disk0 -> ../mapper/data-kvm_disk0 To filter a device-mapper device you also have to filter out the /dev/dm-N device nodes that udev manages. There's also a symlink from /dev/$VG_NAME/$LV_NAME to the dm-N node (although I think that should be handled by filtering /dev/dm-N). I'd be using something like: [ "r|/dev/dm.*|", "r|/dev/$VG_NAME|", "a|.*|"] Alternately (and I prefer this for many configurations) you can accept ("a|..|") the device you need for the data VG and reject all other devices ("r|.*|"). > The device name is stable, but what other way of control activation are possible?? Tags but since you're not currently filtering dm-N nodes I would try that first. Regards, Bryn. _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F86C9FA.9040906@redhat.com> Date: Thu, 12 Apr 2012 13:26:34 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <1943758108.360003.1334232848115.JavaMail.root@nelson.canoo.com> In-Reply-To: <1943758108.360003.1334232848115.JavaMail.root@nelson.canoo.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development Cc: Erik Schwalbe On 04/12/2012 01:14 PM, Erik Schwalbe wrote: > The symlink in /dev/data/ is: > > lrwxrwxrwx 1 root root 24 2012-04-05 12:51 kvm_disk0 -> ../mapper/data-kvm_disk0 OK, you're using an older LVM2/device-mapper that does not use udev to manage the device nodes and symlinks in /dev. > Should I be using this: > > filter = [ "r|/dev/mapper/data-kvm_disk0|", "r|/dev/kvm_disk0|", "a|.*|"] Yes. Or use the alternate style I showed and only accept the PVs belonging to the data VG. As Lars said you may also need to rebuild your initramfs although if the data VG doesn't contain your root file system, swap or other resources normally set up in the initramfs this shouldn't be needed. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx13.extmail.prod.ext.phx2.redhat.com [10.5.110.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3CCXAJM006990 for ; Thu, 12 Apr 2012 08:33:10 -0400 Received: from nelson.canoo.com (gate0.canoo.com [195.141.68.118]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3CCX9gD005656 for ; Thu, 12 Apr 2012 08:33:09 -0400 Received: from localhost (localhost [127.0.0.1]) by nelson.canoo.com (Postfix) with ESMTP id E6B9F6FC093 for ; Thu, 12 Apr 2012 14:33:08 +0200 (CEST) Received: from nelson.canoo.com ([127.0.0.1]) by localhost (nelson.canoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 863AaysdGjfQ for ; Thu, 12 Apr 2012 14:33:08 +0200 (CEST) Received: from nelson.canoo.com (nelson.canoo.com [192.168.0.9]) by nelson.canoo.com (Postfix) with ESMTP id 1D4246FC031 for ; Thu, 12 Apr 2012 14:33:08 +0200 (CEST) Date: Thu, 12 Apr 2012 14:33:08 +0200 (CEST) From: Erik Schwalbe Message-ID: <292484434.360232.1334233988047.JavaMail.root@nelson.canoo.com> In-Reply-To: <20120412120139.GP9163@barkeeper1-xen.linbit> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: LVM general discussion and development Ok, I will try a: update-initramfs -u -k all Hope this helps. Thank you for the hint. Regards, Erik ----- Original Message ----- From: "Lars Ellenberg" To: linux-lvm@redhat.com Sent: Thursday, 12 April, 2012 2:01:39 PM Subject: Re: [linux-lvm] Hide volume group during startup On Thu, Apr 12, 2012 at 01:41:31PM +0200, Erik Schwalbe wrote: > Hi, > > filter was: > > filter = [ "r|/dev/data/kvm_disk0|" ] > > path: > /dev/data/kvm_disk0 -> ../mapper/data-kvm_disk0 > > The device name is stable, but what other way of control activation are possible?? Forgot to update the initramfs/initrd, and the VGs are activated from there already, even before pivoting to the real root? Run update-initramfs or mkinitrd /boot/initramfs-`uname -r`.img `uname -r` or something like that. > > Regards, > Erik > > ----- Original Message ----- > From: "Bryn M. Reeves" > To: "LVM general discussion and development" > Cc: "Erik Schwalbe" > Sent: Thursday, 12 April, 2012 1:11:44 PM > Subject: Re: [linux-lvm] Hide volume group during startup > > On 04/11/2012 11:04 AM, Erik Schwalbe wrote: > > The iscsiinitiator created a new volume group (kvm_disk0) on the > > blockdevice and new virtual disks (vm-203-disk-1). > > > > Our problem is, that the iscsitarget host found not only the VG "data" > > during system startup but also the other VG (kvm_disk0) and activate it. > > So DRBD can't get exclusive access to the LV kvm_disk0. > > > > We try to filter in lvm.conf, but after startup, the VG kvm_disk0 is > > allways activated. > > Please post the filter you are using as well as the full path name of > the disk you are attempting to filter (a complete recursive listing of > /dev as generated by lvmdump or run by hand would be useful. You can use > a service like pastebin for this - please don't send large attachments > to the list). > > There are other ways to control activation if for some reason filtering > will not work (e.g. the device name is not stable). > > Regards, > Bryn. -- : Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 12 Apr 2012 15:31:09 +0200 (CEST) From: Erik Schwalbe Message-ID: <1637520600.360900.1334237469507.JavaMail.root@nelson.canoo.com> In-Reply-To: <4F86C9FA.9040906@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: "Bryn M. Reeves" Cc: LVM general discussion and development Hi, sorry but it did not work: I deactivate the VG kvm_disk0 with vgchange -an kvm_disk0, after that I set the filter and do a update-initramfs -u -k all But after reboot the VG is always activate. ... kvm_disk0 data -wi-ao 400.00g vm-203-disk-1 kvm_disk0 -wi-a- 28.01g vm-203-disk-2 kvm_disk0 -wi-a- 80.00g ... Regards, Erik ----- Original Message ----- From: "Bryn M. Reeves" To: "LVM general discussion and development" Cc: "Erik Schwalbe" Sent: Thursday, 12 April, 2012 2:26:34 PM Subject: Re: [linux-lvm] Hide volume group during startup On 04/12/2012 01:14 PM, Erik Schwalbe wrote: > The symlink in /dev/data/ is: > > lrwxrwxrwx 1 root root 24 2012-04-05 12:51 kvm_disk0 -> ../mapper/data-kvm_disk0 OK, you're using an older LVM2/device-mapper that does not use udev to manage the device nodes and symlinks in /dev. > Should I be using this: > > filter = [ "r|/dev/mapper/data-kvm_disk0|", "r|/dev/kvm_disk0|", "a|.*|"] Yes. Or use the alternate style I showed and only accept the PVs belonging to the data VG. As Lars said you may also need to rebuild your initramfs although if the data VG doesn't contain your root file system, swap or other resources normally set up in the initramfs this shouldn't be needed. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F86DB2B.1020009@redhat.com> Date: Thu, 12 Apr 2012 14:39:55 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <1637520600.360900.1334237469507.JavaMail.root@nelson.canoo.com> In-Reply-To: <1637520600.360900.1334237469507.JavaMail.root@nelson.canoo.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: Erik Schwalbe Cc: LVM general discussion and development On 04/12/2012 02:31 PM, Erik Schwalbe wrote: > Hi, > > sorry but it did not work: > > I deactivate the VG kvm_disk0 with vgchange -an kvm_disk0, after that I set the filter Test it at this point. There is no need to reboot. If pvs/vgchange/vgdisplay etc. still display the nested VG and its PV your filters are wrong or insufficient. Examine the -vvv output from the tools to see the filter decisions that are being made. Since you haven't mentioned any of the versions you are using you may also want to remove the LVM2 cache after editing the filter (current versions clear it automatically but older releases would still show filtered devices if they exist in the cache. > and do a update-initramfs -u -k all You need to know whether this is the correct command for your distribution and that it's affecting whatever kernel/initramfs combination the machine boots by default (and also that it actually works and creates a new initramfs). But for now I would ignore boot problems and focus on the filter. Don't try to solve all the problems at once as that just makes it more confusing. When you have confirmed that your filter settings correctly exclude the nested VG you can move on to making sure those settings are applied at boot. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 12 Apr 2012 16:14:24 +0200 (CEST) From: Erik Schwalbe Message-ID: <605587411.361726.1334240064379.JavaMail.root@nelson.canoo.com> In-Reply-To: <4F86DB2B.1020009@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: "Bryn M. Reeves" Cc: LVM general discussion and development Ok, I found a solution: I deactivate the VG kvm_disk0 with vgchange -an kvm_disk0, after that I set the filter: filter = [ "r|/dev/mapper/data-kvm_disk0|", "r|/dev/kvm_disk0|"] without "a|.*|" !!!! and do a update-initramfs -u -k all Perfect :-) It seems that the allow filter overrules the remove option. Is my filter correct?? ps: lvm version: 2.02.54-1ubuntu4.1ppa5 Regards, Erik ----- Original Message ----- From: "Bryn M. Reeves" To: "Erik Schwalbe" Cc: "LVM general discussion and development" Sent: Thursday, 12 April, 2012 3:39:55 PM Subject: Re: [linux-lvm] Hide volume group during startup On 04/12/2012 02:31 PM, Erik Schwalbe wrote: > Hi, > > sorry but it did not work: > > I deactivate the VG kvm_disk0 with vgchange -an kvm_disk0, after that I set the filter Test it at this point. There is no need to reboot. If pvs/vgchange/vgdisplay etc. still display the nested VG and its PV your filters are wrong or insufficient. Examine the -vvv output from the tools to see the filter decisions that are being made. Since you haven't mentioned any of the versions you are using you may also want to remove the LVM2 cache after editing the filter (current versions clear it automatically but older releases would still show filtered devices if they exist in the cache. > and do a update-initramfs -u -k all You need to know whether this is the correct command for your distribution and that it's affecting whatever kernel/initramfs combination the machine boots by default (and also that it actually works and creates a new initramfs). But for now I would ignore boot problems and focus on the filter. Don't try to solve all the problems at once as that just makes it more confusing. When you have confirmed that your filter settings correctly exclude the nested VG you can move on to making sure those settings are applied at boot. Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F86E6F8.3010101@redhat.com> Date: Thu, 12 Apr 2012 15:30:16 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <605587411.361726.1334240064379.JavaMail.root@nelson.canoo.com> In-Reply-To: <605587411.361726.1334240064379.JavaMail.root@nelson.canoo.com> Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: Erik Schwalbe Cc: LVM general discussion and development On 04/12/2012 03:14 PM, Erik Schwalbe wrote: > Ok, I found a solution: > > I deactivate the VG kvm_disk0 with vgchange -an kvm_disk0, after that I set the filter: > > filter = [ "r|/dev/mapper/data-kvm_disk0|", "r|/dev/kvm_disk0|"] > > without "a|.*|" !!!! Shouldn't make any difference. The filter line has an implicit "a|.*|" at the end. From the lvm.conf man page: "Devices that don't match any patterns are accepted." > Is my filter correct?? If it works for you then that's the main thing. Just be aware that it will need adjustment if you add any more LVs that need to be treated this way (that's why I prefer to accept the PVs I need and reject everything else with a final "r|.*|"). Regards, Bryn. From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 12 Apr 2012 16:50:02 +0200 (CEST) From: Erik Schwalbe Message-ID: <245186210.362567.1334242202575.JavaMail.root@nelson.canoo.com> In-Reply-To: <4F86E6F8.3010101@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] Hide volume group during startup Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii" To: "Bryn M. Reeves" Cc: LVM general discussion and development Thank you very much for your help. Regards, Erik ----- Original Message ----- From: "Bryn M. Reeves" To: "Erik Schwalbe" Cc: "LVM general discussion and development" Sent: Thursday, 12 April, 2012 4:30:16 PM Subject: Re: [linux-lvm] Hide volume group during startup On 04/12/2012 03:14 PM, Erik Schwalbe wrote: > Ok, I found a solution: > > I deactivate the VG kvm_disk0 with vgchange -an kvm_disk0, after that I set the filter: > > filter = [ "r|/dev/mapper/data-kvm_disk0|", "r|/dev/kvm_disk0|"] > > without "a|.*|" !!!! Shouldn't make any difference. The filter line has an implicit "a|.*|" at the end. From the lvm.conf man page: "Devices that don't match any patterns are accepted." > Is my filter correct?? If it works for you then that's the main thing. Just be aware that it will need adjustment if you add any more LVs that need to be treated this way (that's why I prefer to accept the PVs I need and reject everything else with a final "r|.*|"). Regards, Bryn.