FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 07-02-2008, 03:39 PM
Peter Lavin
 
Default Resetting dmsetup open count

Dear dmsetup mailers,

I am attempting to remove a LVM in CentOS 5. I am getting the following
message...


Can't remove open logical volume "lvm_name"

I can delete the link... /dev/vg01/lvm_name and also delete the
associated block... /dev/mapper/vg01-lvm_name.


However, when I attempt to recreate the LVM using the same name (I need
to use the same name). I get a message that the LVM already exists. I
have traced this to dmsetup, where running dmsetup info vg01-lvm_name
reveals...


[root@tg26 mapper]# dmsetup info vg01-lvm_name
Name: vg01-lvm_name
State: ACTIVE
Tables present: LIVE
Open count: 1 <------- this appears to be the problem
Event number: 0
Major, minor: 253, 63
Number of targets: 1
UUID: LVM-CT2Hz7dN6TLC3c8DydQ8nIenwjSmA8CI1yrsTLQy7Ip1Cxetz3 JrdQArvsgBqDsj

I may be able to reset this Open count by rebooting the machine but this
is the least preferred option. Is there a was of resetting this 'Open
count' in the dmsetup records without rebooting the system. My dmsetup
version is pre- 4.8.0 so I cannot use the lvmremove -f option.


Peter

--
best regards,
Peter Lavin,
Computer Architecture & Grid Research Group,
Lloyd Institute, 005,
Trinity College Dublin, Ireland.
+353 1 8961536

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-09-2008, 02:01 PM
Konrad Rzeszutek
 
Default Resetting dmsetup open count

On Wed, Jul 02, 2008 at 04:39:25PM +0100, Peter Lavin wrote:
> Dear dmsetup mailers,
>
> I am attempting to remove a LVM in CentOS 5. I am getting the following
> message...
>
> Can't remove open logical volume "lvm_name"
>
> I can delete the link... /dev/vg01/lvm_name and also delete the associated
> block... /dev/mapper/vg01-lvm_name.
>
> However, when I attempt to recreate the LVM using the same name (I need to
> use the same name). I get a message that the LVM already exists. I have
> traced this to dmsetup, where running dmsetup info vg01-lvm_name reveals...
>
> [root@tg26 mapper]# dmsetup info vg01-lvm_name
> Name: vg01-lvm_name
> State: ACTIVE
> Tables present: LIVE
> Open count: 1 <------- this appears to be the problem
> Event number: 0
> Major, minor: 253, 63
> Number of targets: 1
> UUID: LVM-CT2Hz7dN6TLC3c8DydQ8nIenwjSmA8CI1yrsTLQy7Ip1Cxetz3 JrdQArvsgBqDsj
>
> I may be able to reset this Open count by rebooting the machine but this is
> the least preferred option. Is there a was of resetting this 'Open count'
> in the dmsetup records without rebooting the system. My dmsetup version is
> pre- 4.8.0 so I cannot use the lvmremove -f option.

Did you use 'vgchange --available ln vg01-lvm_name' before trying to
remove it using 'dmsetup' ?

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 03:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org