This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 173201 - Unable to close device warnings when attempting to create a snapshot
Unable to close device warnings when attempting to create a snapshot
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-14 16:53 EST by Corey Marthaler
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: U3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-08 10:24:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2005-11-14 16:53:36 EST
Description of problem:
[root@link-10 ~]# lvscan
  ACTIVE            '/dev/corey2/lvol0' [50.00 GB] inherit
  ACTIVE   Original '/dev/corey1/lvol0' [50.00 GB] inherit
  ACTIVE   Snapshot '/dev/corey1/lvol1' [100.00 MB] inherit
  ACTIVE   Snapshot '/dev/corey1/lvol2' [100.00 MB] inherit
  ACTIVE   Snapshot '/dev/corey1/lvol3' [100.00 MB] inherit

[root@link-10 ~]# lvcreate -s -L 100M /dev/corey1/lvol0
  Attempt to close device '/dev/hda' which is not open.
  Attempt to close device '/dev/sda' which is not open.
  Attempt to close device '/dev/sdb' which is not open.
  Logical volume "lvol4" created

more verbose output:
[root@link-10 ~]# lvcreate -s -L 100M /dev/corey1/lvol0 -vv
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
    Setting chunksize to 16 sectors.
      Getting target version for snapshot
      Getting target version for snapshot-origin
      Setting activation/mirror_region_size to 512
      Locking /var/lock/lvm/V_corey1 WB
    Finding volume group "corey1"
      /dev/ramdisk: No label detected
      /dev/hda: size is 78165360 sectors
  Attempt to close device '/dev/hda' which is not open.
      /dev/sda: size is 569303040 sectors
  Attempt to close device '/dev/sda' which is not open.
      /dev/md0: size is 0 sectors
      /dev/dm-0: No label detected
      /dev/ram: No label detected
      /dev/hda1: No label detected
      /dev/sda1: lvm2 label detected
      /dev/dm-1: No label detected
      /dev/ram2: No label detected
      /dev/hda2: No label detected
      /dev/sda2: lvm2 label detected
      /dev/dm-2: No label detected
      /dev/ram3: No label detected
      /dev/hda3: No label detected
      /dev/sda3: lvm2 label detected
      /dev/dm-3: No label detected
      /dev/ram4: No label detected
      /dev/sda4: size is 2 sectors
      /dev/dm-4: No label detected
      /dev/ram5: No label detected
      /dev/sda5: lvm2 label detected
      /dev/dm-5: No label detected
      /dev/ram6: No label detected
      /dev/sda6: lvm2 label detected
      /dev/dm-6: No label detected
      /dev/ram7: No label detected
      /dev/dm-7: No label detected
      /dev/ram8: No label detected
      /dev/ram9: No label detected
      /dev/dm-9: No label detected
      /dev/ram10: No label detected
      /dev/dm-10: No label detected
      /dev/ram11: No label detected
      /dev/dm-11: No label detected
      /dev/ram12: No label detected
      /dev/ram13: No label detected
      /dev/ram14: No label detected
      /dev/ram15: No label detected
      /dev/sdb: size is 426977280 sectors
  Attempt to close device '/dev/sdb' which is not open.
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sdb3: lvm2 label detected
      /dev/sdb4: size is 2 sectors
      /dev/sdb5: lvm2 label detected
      /dev/sdb6: lvm2 label detected
      /dev/dm-52: No label detected
      /dev/sda1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
    Archiving volume group "corey1" metadata (seqno 69).
    Creating logical volume lvol5
    Creating volume group backup "/etc/lvm/backup/corey1" (seqno 70).
      Finding volume group for uuid
fSL7k3V6bjIyLCMiBIQQKBJhsN0vdjjOOEuHrWA49ReBBiDMsW76s2K14ISyAg66
      /dev/sda1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
    Found volume group "corey1"
      Locking memory
      Setting activation/missing_stripe_filler to /dev/ioerror
      Getting target version for linear
      Getting target version for striped
    Creating corey1-lvol5
    Loading corey1-lvol5 table
    Resuming corey1-lvol5 (253:8)
      Unlocking memory
      Linking /dev/corey1/lvol5 -> /dev/mapper/corey1-lvol5
    Zeroing start of logical volume "lvol5"
      Finding volume group for uuid
fSL7k3V6bjIyLCMiBIQQKBJhsN0vdjjOOEuHrWA49ReBBiDMsW76s2K14ISyAg66
      /dev/sda1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
    Found volume group "corey1"
      Locking memory
    Removing corey1-lvol5 (253:8)
      Unlocking memory
      Removing link /dev/corey1/lvol5
      Finding volume group for uuid
fSL7k3V6bjIyLCMiBIQQKBJhsN0vdjjOOEuHrWA49ReBBiDMsW76s2K14ISyAg66
      /dev/sda1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
    Found volume group "corey1"
      Finding volume group for uuid
fSL7k3V6bjIyLCMiBIQQKBJhsN0vdjjOZuKq9cj5IGHj8MAPCtam3CmIUJI7KEiH
      /dev/sda1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
    Found volume group "corey1"
    Loading corey1-lvol0-real table
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol0 table
    Loading corey1-lvol1-cow table
    Resuming corey1-lvol1-cow (253:9)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol1 table
    Loading corey1-lvol2-cow table
    Resuming corey1-lvol2-cow (253:2)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol2 table
    Loading corey1-lvol3-cow table
    Resuming corey1-lvol3-cow (253:4)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol3 table
    Loading corey1-lvol4-cow table
    Resuming corey1-lvol4-cow (253:6)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol4 table
    Resuming corey1-lvol0-real (253:0)
    Creating corey1-lvol5-cow
    Loading corey1-lvol5-cow table
    Resuming  (253:8)
    Creating corey1-lvol5
    Loading corey1-lvol5 table
      Removing /dev/corey1/lvol0
      Linking /dev/corey1/lvol0 -> /dev/mapper/corey1-lvol0
      Removing /dev/corey1/lvol1
      Linking /dev/corey1/lvol1 -> /dev/mapper/corey1-lvol1
      Removing /dev/corey1/lvol2
      Linking /dev/corey1/lvol2 -> /dev/mapper/corey1-lvol2
      Removing /dev/corey1/lvol3
      Linking /dev/corey1/lvol3 -> /dev/mapper/corey1-lvol3
      Removing /dev/corey1/lvol4
      Linking /dev/corey1/lvol4 -> /dev/mapper/corey1-lvol4
      Linking /dev/corey1/lvol5 -> /dev/mapper/corey1-lvol5
      Locking memory
    Suspending corey1-lvol0 (253:10)
    Suspending corey1-lvol1 (253:11)
    Suspending corey1-lvol2 (253:3)
    Suspending corey1-lvol3 (253:5)
    Suspending corey1-lvol4 (253:7)
    Suspending corey1-lvol5 (253:12)
    Suspending corey1-lvol5-cow (253:8)
    Suspending corey1-lvol0-real (253:0)
    Suspending corey1-lvol1-cow (253:9)
    Suspending corey1-lvol0-real (253:0)
    Suspending corey1-lvol2-cow (253:2)
    Suspending corey1-lvol0-real (253:0)
    Suspending corey1-lvol3-cow (253:4)
    Suspending corey1-lvol0-real (253:0)
    Suspending corey1-lvol4-cow (253:6)
    Suspending corey1-lvol0-real (253:0)
      Finding volume group for uuid
fSL7k3V6bjIyLCMiBIQQKBJhsN0vdjjOZuKq9cj5IGHj8MAPCtam3CmIUJI7KEiH
      /dev/sda1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
      /dev/sda1: lvm2 label detected
      /dev/sdb1: lvm2 label detected
      /dev/sda2: lvm2 label detected
      /dev/sdb2: lvm2 label detected
      /dev/sda3: lvm2 label detected
    Found volume group "corey1"
    Loading corey1-lvol0-real table
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol1-cow table
    Resuming corey1-lvol1-cow (253:9)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol2-cow table
    Resuming corey1-lvol2-cow (253:2)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol3-cow table
    Resuming corey1-lvol3-cow (253:4)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol4-cow table
    Resuming corey1-lvol4-cow (253:6)
    Resuming corey1-lvol0-real (253:0)
    Resuming corey1-lvol0-real (253:0)
    Loading corey1-lvol5-cow table
    Resuming corey1-lvol5-cow (253:8)
    Resuming corey1-lvol0 (253:10)
    Resuming corey1-lvol1 (253:11)
    Resuming corey1-lvol2 (253:3)
    Resuming corey1-lvol3 (253:5)
    Resuming corey1-lvol4 (253:7)
    Resuming corey1-lvol5 (253:12)
      Unlocking memory
      Removing /dev/corey1/lvol0
      Linking /dev/corey1/lvol0 -> /dev/mapper/corey1-lvol0
      Removing /dev/corey1/lvol1
      Linking /dev/corey1/lvol1 -> /dev/mapper/corey1-lvol1
      Removing /dev/corey1/lvol2
      Linking /dev/corey1/lvol2 -> /dev/mapper/corey1-lvol2
      Removing /dev/corey1/lvol3
      Linking /dev/corey1/lvol3 -> /dev/mapper/corey1-lvol3
      Removing /dev/corey1/lvol4
      Linking /dev/corey1/lvol4 -> /dev/mapper/corey1-lvol4
      Removing /dev/corey1/lvol5
      Linking /dev/corey1/lvol5 -> /dev/mapper/corey1-lvol5
    Creating volume group backup "/etc/lvm/backup/corey1" (seqno 71).
  Logical volume "lvol5" created
      Unlocking /var/lock/lvm/V_corey1


Version-Release number of selected component (if applicable):
[root@link-10 ~]# lvcreate --version
  LVM version:     2.02.00 (2005-11-10)
  Library version: 1.02.00 (2005-11-10)
  Driver version:  4.4.0
Comment 1 Alasdair Kergon 2005-11-23 10:43:04 EST
This one looks strange.

It means that in some path through the program there is a 'close' that wasn't
preceded by an 'open'.

I haven't reproduced it.
Please can you repeat with -vvvv to produce more detailed diagnostics.

Also try to reproduce it with 'vgscan -vvvv'.

What sort of partition tables were on those devices, and which kernel?

Comment 2 Alasdair Kergon 2005-11-23 10:49:00 EST
Ah - I've just managed to reproduce it - no need for more information.
Comment 3 Alasdair Kergon 2005-11-23 10:50:15 EST
-vvvv output shows the real problem:
  device/dev-io.c:514   /dev/sda: Immediate close attempt while still referenced
Comment 4 Alasdair Kergon 2005-11-23 11:05:15 EST
Fix added to 2.02.01
Comment 6 Corey Marthaler 2006-02-06 16:16:41 EST
fix verified in lvm2-2.02.01-1.3.RHEL4.

Note You need to log in before you can comment on or make changes to this bug.