linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Cannot access logical volume (open count=1)
@ 2011-02-10 21:14 Peter Flass
  2011-02-10 22:53 ` Ray Morris
  2011-02-14 10:19 ` Bryn M. Reeves
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Flass @ 2011-02-10 21:14 UTC (permalink / raw)
  To: linux-lvm

I'm truly sorry to bother the developers' list with this question, but 
I've searched and can't find an ansewr that works.  A system crash seems 
to have corrupted something in my fedora system.  I boot to a rescue CD 
and look thru LVM.  The disk (sdb) has one vg and three lv's on it.  
Call the vg vg_xxx, the lv's are lv_boot (ext3, I believe), lv_swap (no 
fs) and lv_home (ext4).  I can't fsck (e2fsck) lv_home or do anything 
else with it, LVM says it's open count=1 where the open count of the 
other two lv's is zero.

I can't find who has it open.  /proc/mounts shows /dev/sdb1 mounted on 
/media/usb0, when I umount  it (either by mount point or device) it 
disappears, but the lv still shows open, and as a result I am unable to 
do anything with it.  lsof also shows nothing open that resembles this 
lv.  I can inactivate the other two lvs in this vg, but not lv_home.

What can I do to fix this problem?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Cannot access logical volume (open count=1)
  2011-02-10 21:14 [linux-lvm] Cannot access logical volume (open count=1) Peter Flass
@ 2011-02-10 22:53 ` Ray Morris
  2011-02-11  1:48   ` Peter Flass
  2011-02-14 10:19 ` Bryn M. Reeves
  1 sibling, 1 reply; 4+ messages in thread
From: Ray Morris @ 2011-02-10 22:53 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Peter_Flass

  Check whether the LV has a partition on it.
(fdisk -l /dev/vg*/home)  If so, use kpartx -dvv 
to close it.

> The disk (sdb) has one vg and three lv's on it
> /proc/mounts shows /dev/sdb1 mounted

  If /dev/sdb1 is mounted, does that mean there's 
a /dev/sdb2 which is a PV?
-- 
Ray Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php




On Thu, 10 Feb 2011 16:14:22 -0500
Peter Flass <Peter_Flass@yahoo.com> wrote:

> I'm truly sorry to bother the developers' list with this question,
> but I've searched and can't find an ansewr that works.  A system
> crash seems to have corrupted something in my fedora system.  I boot
> to a rescue CD and look thru LVM.  The disk (sdb) has one vg and
> three lv's on it. Call the vg vg_xxx, the lv's are lv_boot (ext3, I
> believe), lv_swap (no fs) and lv_home (ext4).  I can't fsck (e2fsck)
> lv_home or do anything else with it, LVM says it's open count=1 where
> the open count of the other two lv's is zero.
> 
> I can't find who has it open.  /proc/mounts shows /dev/sdb1 mounted
> on /media/usb0, when I umount  it (either by mount point or device)
> it disappears, but the lv still shows open, and as a result I am
> unable to do anything with it.  lsof also shows nothing open that
> resembles this lv.  I can inactivate the other two lvs in this vg,
> but not lv_home.
> 
> What can I do to fix this problem?
> 
> _______________________________________________
> 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/
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Cannot access logical volume (open count=1)
  2011-02-10 22:53 ` Ray Morris
@ 2011-02-11  1:48   ` Peter Flass
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Flass @ 2011-02-11  1:48 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Ray Morris

I'm learning as I go here, I had never heard of Linux LVM until 
yesterday.  This is a plain vanilla fedora installation.  /dev/sdb2 
contains the root and swap logical volumes.  /dev/sdb1 is home.  kpartx 
-a /dev/sdb creates /dev/sdb1 and /dev/sdb2,
and kpartx -d /dev/sdb deletes both of them.  Neither state made a bit 
of difference as far as accessing 'home'.

Pvscan shows one pv: /dev/sdb2.

BTW, I forgot to mention that I'm booting from the latest Ubuntu rescure 
remix  CD (10.10).  My Fedora CD won't boot - it loops during boot.  
Someone suggested Knoppix, but that loops also.


On 2/10/2011 5:53 PM, Ray Morris wrote:
>    Check whether the LV has a partition on it.
> (fdisk -l /dev/vg*/home)  If so, use kpartx -dvv
> to close it.
>
>> The disk (sdb) has one vg and three lv's on it
>> /proc/mounts shows /dev/sdb1 mounted
>    If /dev/sdb1 is mounted, does that mean there's
> a /dev/sdb2 which is a PV?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Cannot access logical volume (open count=1)
  2011-02-10 21:14 [linux-lvm] Cannot access logical volume (open count=1) Peter Flass
  2011-02-10 22:53 ` Ray Morris
@ 2011-02-14 10:19 ` Bryn M. Reeves
  1 sibling, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2011-02-14 10:19 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Peter Flass

On 02/10/2011 09:14 PM, Peter Flass wrote:
> I'm truly sorry to bother the developers' list with this question, but 
> I've searched and can't find an ansewr that works.  A system crash seems 
> to have corrupted something in my fedora system.  I boot to a rescue CD 
> and look thru LVM.  The disk (sdb) has one vg and three lv's on it.  
> Call the vg vg_xxx, the lv's are lv_boot (ext3, I believe), lv_swap (no 
> fs) and lv_home (ext4).  I can't fsck (e2fsck) lv_home or do anything 
> else with it, LVM says it's open count=1 where the open count of the 
> other two lv's is zero.
> 
> I can't find who has it open.  /proc/mounts shows /dev/sdb1 mounted on 
> /media/usb0, when I umount  it (either by mount point or device) it 
> disappears, but the lv still shows open, and as a result I am unable to 
> do anything with it.  lsof also shows nothing open that resembles this 
> lv.  I can inactivate the other two lvs in this vg, but not lv_home.
> 
> What can I do to fix this problem?

What does "dmsetup ls --tree" look like?

E.g.:

$ sudo dmsetup ls --tree
tvg0-l0 (253:7)
 └─ (7:1)
bmr_vg1-swap (253:4)
 └─ (9:1)
luks-ca3de7ff-5487-4e9b-ac2b-846efc71b2e2 (253:5)
 └─bmr_vg0-data (253:2)
    └─ (9:2)
bmr_vg0-var (253:1)
 └─ (9:2)
luks-a48853af-19d8-4965-a346-d82ae4672b66 (253:6)
 └─bmr_vg0-home (253:3)
    └─ (9:2)
bmr_vg0-root (253:0)
 └─ (9:2)

Regards,
Bryn.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-14 10:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 21:14 [linux-lvm] Cannot access logical volume (open count=1) Peter Flass
2011-02-10 22:53 ` Ray Morris
2011-02-11  1:48   ` Peter Flass
2011-02-14 10:19 ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).