Linux Device Mapper development
 help / color / mirror / Atom feed
From: Peter Lavin <lavinp@cs.tcd.ie>
To: dm-devel@redhat.com
Subject: Resetting dmsetup open count
Date: Wed, 02 Jul 2008 16:39:25 +0100	[thread overview]
Message-ID: <486BA12D.5010506@cs.tcd.ie> (raw)

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

             reply	other threads:[~2008-07-02 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02 15:39 Peter Lavin [this message]
2008-07-09 14:01 ` Resetting dmsetup open count Konrad Rzeszutek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486BA12D.5010506@cs.tcd.ie \
    --to=lavinp@cs.tcd.ie \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox