[Virtual-pkg-base-maintainers] Bug#684071: base: Cannot create LVM logical volumes of certain sizes

Mario Domenech Goulart mario.goulart at gmail.com
Mon Aug 6 17:38:11 UTC 2012


Package: base
Severity: important

Dear Maintainer,

I cannot create logical volumes of certain sizes on LVM.  Below you can see the
behavior I'm facing.  I can create volumes of 500MB, 2GB, 3GB, 4GB, 5GB, 50GB
and 500GB, but not volumes of 1GB and 2GB.


    # lvcreate -L 500M -n foo vg00
      Logical volume "foo" created
    
    # lvremove /dev/vg00/foo 
    Do you really want to remove active logical volume foo? [y/n]: y
      Logical volume "foo" successfully removed
    
    # lvcreate -L 1G -n foo vg00
      device-mapper: resume ioctl on  failed: Invalid argument
      Unable to resume vg00-foo (253:7)
      Failed to activate new LV.
      Attempted to decrement suspended device counter below zero.

At this point dmesg shows

    [243903.477075] device-mapper: table: 253:7: md1 too small for target: start=1942407168, len=2097152, dev_size=1943096960
    
    # lvcreate -L 2G -n foo vg00
      device-mapper: resume ioctl on  failed: Invalid argument
      Unable to resume vg00-foo (253:7)
      Failed to activate new LV.
      Attempted to decrement suspended device counter below zero.

Again, dmesg shows

    [243973.216421] device-mapper: table: 253:7: md1 too small for target: start=1942407168, len=4194304, dev_size=1943096960

    # lvcreate -L 3G -n foo vg00
      Logical volume "foo" created
    
    # lvremove /dev/vg00/foo 
    Do you really want to remove active logical volume foo? [y/n]: y
      Logical volume "foo" successfully removed
    
    # lvcreate -L 4G -n foo vg00
      Logical volume "foo" created
    
    # lvremove /dev/vg00/foo 
    Do you really want to remove active logical volume foo? [y/n]: y
      Logical volume "foo" successfully removed
    
    # lvcreate -L 5G -n foo vg00
      Logical volume "foo" created

    # lvremove /dev/vg00/foo
    Do you really want to remove active logical volume foo? [y/n]: y
      Logical volume "foo" successfully removed

    # lvcreate -L 50G -n foo vg00
      Logical volume "foo" created

    # lvremove /dev/vg00/foo                                                                                                                           
    Do you really want to remove active logical volume foo? [y/n]: y
      Logical volume "foo" successfully removed

    # lvcreate -L 500G -n foo vg00                                                                                                                     
      Logical volume "foo" created

    # lvremove /dev/vg00/foo
    Do you really want to remove active logical volume foo? [y/n]: y
      Logical volume "foo" successfully removed


Here's some information about the LVM setup:

    # pvscan 
      PV /dev/md1   VG vg00   lvm2 [928.40 GiB / 908.71 GiB free]
      Total: 1 [928.40 GiB] / in use: 1 [928.40 GiB] / in no VG: 0 [0   ]


    # lvscan 
      ACTIVE            '/dev/vg00/system' [9.31 GiB] inherit
      ACTIVE            '/dev/vg00/6e237dfc-4637-431a-b93a-7727dd650811.disk0_data' [1.00 GiB] inherit
      ACTIVE            '/dev/vg00/6e237dfc-4637-431a-b93a-7727dd650811.disk0_meta' [128.00 MiB] inherit
      ACTIVE            '/dev/vg00/b8e8ebd4-a783-4b18-8d2b-cb7964867f90.disk0_data' [5.00 GiB] inherit
      ACTIVE            '/dev/vg00/b8e8ebd4-a783-4b18-8d2b-cb7964867f90.disk0_meta' [128.00 MiB] inherit
      ACTIVE            '/dev/vg00/9319a886-58d3-4a80-982b-d8172dd0aebc.disk0_data' [4.00 GiB] inherit
      ACTIVE            '/dev/vg00/9319a886-58d3-4a80-982b-d8172dd0aebc.disk0_meta' [128.00 MiB] inherit

Notice above that it was once possible to create logical volumes of 1GB.


The machine has two disks in RAID1 mode:

    # mdadm -D /dev/md1 
    /dev/md1:
            Version : 1.2
      Creation Time : Tue Jul 17 16:45:33 2012
         Raid Level : raid1
         Array Size : 971548480 (926.54 GiB 994.87 GB)
      Used Dev Size : 971548480 (926.54 GiB 994.87 GB)
       Raid Devices : 2
      Total Devices : 2
        Persistence : Superblock is persistent
    
        Update Time : Mon Aug  6 13:58:29 2012
              State : clean 
     Active Devices : 2
    Working Devices : 2
     Failed Devices : 0
      Spare Devices : 0
    
               Name : n1:1  (local to host n1)
               UUID : 64ffd712:0c3736fd:39091b3e:5c6ac938
             Events : 54
    
        Number   Major   Minor   RaidDevice State
           0       8        2        0      active sync   /dev/sda2
           1       8       18        1      active sync   /dev/sdb2


    # cat /proc/mdstat 
    Personalities : [raid1] 
    md1 : active raid1 sda2[0] sdb2[1]
          971548480 blocks super 1.2 [2/2] [UU]
          
    md0 : active raid1 sda1[0] sdb1[1]
          498368 blocks super 1.2 [2/2] [UU]
      
    unused devices: <none>


It also uses drbd:

    # cat /proc/drbd 
    version: 8.3.11 (api:88/proto:86-96)
    srcversion: 2D876214BAAD53B31ADC1D6 
     0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
        ns:68484 nr:0 dw:11140 dr:113232 al:17 bm:11 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
    
     3: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
        ns:589824 nr:0 dw:0 dr:590504 al:0 bm:41 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
     4: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
        ns:121700 nr:0 dw:11108 dr:174452 al:33 bm:22 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0


Some more information from /proc:

    # cat /proc/diskstats 
       8       0 sda 3618678 11676737 1946002684 28266812 99752 132902 2768075 1988164 0 10614804 30251676
       8       1 sda1 9125 6477 1059504 24840 13878 4 77 417316 0 426056 442148
       8       2 sda2 3607660 11670260 1944928036 28239416 85872 132898 2767998 1570824 0 10195464 29806948
       8      16 sdb 2937179 12328563 1945545241 35167572 99755 132899 2768075 1964064 0 11919228 37130800
       8      17 sdb1 18731 6362 1101820 23100 13878 4 77 395072 0 401576 418164
       8      18 sdb2 2916555 12322201 1944428277 35143204 85875 132895 2767998 1568972 0 11522628 36711360
       9       0 md0 11280 0 57124 0 20 0 48 0 0 0 0
       9       1 md1 142039 0 3051545 0 220974 0 2756355 0 0 0 0
     253       0 dm-0 18608 0 602730 131804 201488 0 2709832 2481812 0 1806000 2613620
       7       0 loop0 0 0 0 0 0 0 0 0 0 0 0
       7       1 loop1 0 0 0 0 0 0 0 0 0 0 0
       7       2 loop2 0 0 0 0 0 0 0 0 0 0 0
       7       3 loop3 0 0 0 0 0 0 0 0 0 0 0
       7       4 loop4 0 0 0 0 0 0 0 0 0 0 0
       7       5 loop5 0 0 0 0 0 0 0 0 0 0 0
       7       6 loop6 0 0 0 0 0 0 0 0 0 0 0
       7       7 loop7 0 0 0 0 0 0 0 0 0 0 0
     253       1 dm-1 23556 0 295968 325172 2793 0 22344 88712 0 27928 413904
     253       2 dm-2 8965 0 71629 14436 37 0 119 6564 0 18608 21000
     253       3 dm-3 18074 0 1250512 1186268 0 0 0 0 0 22268 1186272
     253       4 dm-4 8997 0 71885 7868 78 0 566 12396 0 13108 20264
     253       5 dm-5 26381 0 418408 182004 2785 0 22280 46956 0 17900 228960
     253       6 dm-6 8989 0 71821 18292 81 0 366 4740 0 7692 23032
     147       0 drbd0 13972 0 111776 177536 2793 0 22344 480720 0 245835304 552603892
     147       3 drbd3 170 0 1360 1024 0 0 0 0 0 4294958296 9912
     147       4 drbd4 15965 0 127720 85456 2785 0 22280 320624 0 245835220 567036640


    # cat /proc/partitions 
    major minor  #blocks  name
    
       8        0  976762584 sda
       8        1     498688 sda1
       8        2  971679744 sda2
       8       16  976762584 sdb
       8       17     498688 sdb1
       8       18  971679744 sdb2
       9        0     498368 md0
       9        1  971548480 md1
     253        0    9764864 dm-0
     253        1    1048576 dm-1
     253        2     131072 dm-2
     253        3    5242880 dm-3
     253        4     131072 dm-4
     253        5    4194304 dm-5
     253        6     131072 dm-6
     147        0    1048576 drbd0
     147        3    5242880 drbd3
     147        4    4194304 drbd4


LVM is:

    # lvm version
      LVM version:     2.02.95(2) (2012-03-06)
      Library version: 1.02.74 (2012-03-06)
      Driver version:  4.22.0


Linux is:

    # uname -a
    Linux n1 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash



More information about the Virtual-pkg-base-maintainers mailing list