[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] I can't have the mirror_log mirrored, LVM complains "there is no suitable space"



2013/7/4 Alessandro MACUZ <alessandro macuz gmail com>
2013/7/4 Alasdair G Kergon <agk redhat com>
On Tue, Jul 02, 2013 at 02:14:01AM +0200, Alessandro MACUZ wrote:
> Why "*lvconvert -i 5 -m1 --mirrorlog mirrored /dev/lvgrptstnlvm/root
> /dev/sdb1*" doesn't work whereas
> "*lvconvert -m1 /dev/lvgrptstnlvm/root /dev/sdb1*" does? The space to be
> allocated differs by just one PE.

Exactly which version of lvm2 are you using?
Is it 2.02.97 or later?  If not, you should try a newer version.
To debug, you then need to run the command with -vvvv added to the command
line.  Post a link to this output if you want others to look.


I downloaded https://git.fedorahosted.org/cgit/lvm2.git/snapshot/lvm2-2_02_98.tar.gz and compiled/installed via 

./configure
make
make install

on top of a Knoppix Live DVD

No errors in compiling and installing it.

Unfortunately I get the same error. This is the output of LVM2 2.02.98 command:

root Microknoppix:/tmp/lvm2-2_02_98# lvs -a -o+devices
  LV   VG           Attr      LSize Pool Origin Data%  Move Log Copy%  Convert Devices
  root lvgrptstnlvm -wi-a---- 6.00g                                            /dev/sda1(0)
root Microknoppix:/tmp/lvm2-2_02_98# lvconvert -vvv -m1 --mirrorlog mirrored --alloc normal /dev/lvgrptstnlvm/root /dev/sdb1
      Setting activation/monitoring to 0
        Processing: lvconvert -vvv -m1 --mirrorlog mirrored --alloc normal /dev/lvgrptstnlvm/root /dev/sdb1
        O_DIRECT will be used
      Setting global/locking_type to 1
      Setting global/wait_for_locks to 1
      File-based locking selected.
      Setting global/locking_dir to /run/lock/lvm
      Setting global/prioritise_write_locks to 1
      Setting activation/mirror_region_size to 512
      Getting target version for mirror
        dm version   OF   [16384] (*1)
        dm versions   OF   [16384] (*1)
      Found mirror target v1.12.1.
      Getting target version for mirror
        dm versions   OF   [16384] (*1)
      Found mirror target v1.12.1.
      Locking /run/lock/lvm/V_lvgrptstnlvm WB
        _do_flock /run/lock/lvm/V_lvgrptstnlvm:aux WB
        _do_flock /run/lock/lvm/V_lvgrptstnlvm WB
        _undo_flock /run/lock/lvm/V_lvgrptstnlvm:aux
        Opened /dev/ram0 RO O_DIRECT
        /dev/ram0: block size is 4096 bytes
      /dev/ram0: No label detected
        Closed /dev/ram0
        dm status   (252:0) OF   [16384] (*1)
        /dev/lvgrptstnlvm/root_mlog_mimage_0: Reserved internal LV device lvgrptstnlvm/root_mlog_mimage_0 not usable.
        /dev/lvgrptstnlvm/root_mlog_mimage_0: Skipping unusable device
        Opened /dev/ram RO O_DIRECT
        /dev/ram: block size is 4096 bytes
      /dev/ram: No label detected
        Closed /dev/ram
        Opened /dev/sda1 RO O_DIRECT
        /dev/sda1: block size is 4096 bytes
      /dev/sda1: lvm2 label detected at sector 1
        lvmcache: /dev/sda1: now in VG #orphans_lvm2 (#orphans_lvm2) with 0 mdas
        /dev/sda1: Found metadata at 67584 size 1470 (in area at 4096 size 192512) for lvgrptstnlvm (DxeZ11-9H0a-LSu7-DzkC-21nf-qolp-4rPTBp)
        lvmcache: /dev/sda1: now in VG lvgrptstnlvm with 1 mdas
        lvmcache: /dev/sda1: setting lvgrptstnlvm VGID to DxeZ119H0aLSu7DzkC21nfqolp4rPTBp
        lvmcache: /dev/sda1: VG lvgrptstnlvm: Set creation host to Microknoppix.
        dm status   (252:1) OF   [16384] (*1)
        /dev/lvgrptstnlvm/root_mlog_mimage_1: Reserved internal LV device lvgrptstnlvm/root_mlog_mimage_1 not usable.
        /dev/lvgrptstnlvm/root_mlog_mimage_1: Skipping unusable device
        Opened /dev/ram2 RO O_DIRECT
        /dev/ram2: block size is 4096 bytes
      /dev/ram2: No label detected
        Closed /dev/ram2
        dm status   (252:2) OF   [16384] (*1)
        /dev/dm-2: Skipping unusable device
        Opened /dev/ram3 RO O_DIRECT
        /dev/ram3: block size is 4096 bytes
      /dev/ram3: No label detected
        Closed /dev/ram3
        dm status   (252:3) OF   [16384] (*1)
        /dev/dm-3: Skipping unusable device
        Opened /dev/ram4 RO O_DIRECT
        /dev/ram4: block size is 4096 bytes
      /dev/ram4: No label detected
        Closed /dev/ram4
        dm status   (252:4) OF   [16384] (*1)
        /dev/dm-4: Skipping unusable device
        Opened /dev/ram5 RO O_DIRECT
        /dev/ram5: block size is 4096 bytes
      /dev/ram5: No label detected
        Closed /dev/ram5
        dm status   (252:5) OF   [16384] (*1)
        Opened /dev/lvgrptstnlvm/root RO O_DIRECT
      /dev/lvgrptstnlvm/root: size is 12582912 sectors
        Closed /dev/lvgrptstnlvm/root
      /dev/lvgrptstnlvm/root: size is 12582912 sectors
        Opened /dev/lvgrptstnlvm/root RO O_DIRECT
        /dev/lvgrptstnlvm/root: block size is 4096 bytes
        Closed /dev/lvgrptstnlvm/root
        Using /dev/lvgrptstnlvm/root
        Opened /dev/lvgrptstnlvm/root RO O_DIRECT
        /dev/lvgrptstnlvm/root: block size is 4096 bytes
      /dev/lvgrptstnlvm/root: No label detected
        Closed /dev/lvgrptstnlvm/root
        Opened /dev/ram6 RO O_DIRECT
        /dev/ram6: block size is 4096 bytes
      /dev/ram6: No label detected
        Closed /dev/ram6
        Opened /dev/ram7 RO O_DIRECT
        /dev/ram7: block size is 4096 bytes
      /dev/ram7: No label detected
        Closed /dev/ram7
        Opened /dev/ram8 RO O_DIRECT
        /dev/ram8: block size is 4096 bytes
      /dev/ram8: No label detected
        Closed /dev/ram8
        Opened /dev/ram9 RO O_DIRECT
        /dev/ram9: block size is 4096 bytes
      /dev/ram9: No label detected
        Closed /dev/ram9
        Opened /dev/ram10 RO O_DIRECT
        /dev/ram10: block size is 4096 bytes
      /dev/ram10: No label detected
        Closed /dev/ram10
        Opened /dev/ram11 RO O_DIRECT
        /dev/ram11: block size is 4096 bytes
      /dev/ram11: No label detected
        Closed /dev/ram11
        Opened /dev/ram12 RO O_DIRECT
        /dev/ram12: block size is 4096 bytes
      /dev/ram12: No label detected
        Closed /dev/ram12
        Opened /dev/ram13 RO O_DIRECT
        /dev/ram13: block size is 4096 bytes
      /dev/ram13: No label detected
        Closed /dev/ram13
        Opened /dev/ram14 RO O_DIRECT
        /dev/ram14: block size is 4096 bytes
      /dev/ram14: No label detected
        Closed /dev/ram14
        Opened /dev/ram15 RO O_DIRECT
        /dev/ram15: block size is 4096 bytes
      /dev/ram15: No label detected
        Closed /dev/ram15
        Opened /dev/sdb1 RO O_DIRECT
        /dev/sdb1: block size is 4096 bytes
      /dev/sdb1: lvm2 label detected at sector 1
        lvmcache: /dev/sdb1: now in VG #orphans_lvm2 (#orphans_lvm2) with 0 mdas
        /dev/sdb1: Found metadata at 31232 size 1470 (in area at 4096 size 520192) for lvgrptstnlvm (DxeZ11-9H0a-LSu7-DzkC-21nf-qolp-4rPTBp)
        lvmcache: /dev/sdb1: now in VG lvgrptstnlvm (DxeZ119H0aLSu7DzkC21nfqolp4rPTBp) with 1 mdas
        Opened /dev/sdb2 RO O_DIRECT
        /dev/sdb2: block size is 4096 bytes
      /dev/sdb2: lvm2 label detected at sector 1
        lvmcache: /dev/sdb2: now in VG #orphans_lvm2 (#orphans_lvm2) with 0 mdas
        /dev/sdb2: Found metadata at 29696 size 1470 (in area at 4096 size 1044480) for lvgrptstnlvm (DxeZ11-9H0a-LSu7-DzkC-21nf-qolp-4rPTBp)
        lvmcache: /dev/sdb2: now in VG lvgrptstnlvm (DxeZ119H0aLSu7DzkC21nfqolp4rPTBp) with 1 mdas
        Opened /dev/sdc RO O_DIRECT
        /dev/sdc: block size is 4096 bytes
      /dev/sdc: lvm2 label detected at sector 1
        lvmcache: /dev/sdc: now in VG #orphans_lvm2 (#orphans_lvm2) with 0 mdas
        /dev/sdc: Found metadata at 28160 size 1470 (in area at 4096 size 1044480) for lvgrptstnlvm (DxeZ11-9H0a-LSu7-DzkC-21nf-qolp-4rPTBp)
        lvmcache: /dev/sdc: now in VG lvgrptstnlvm (DxeZ119H0aLSu7DzkC21nfqolp4rPTBp) with 1 mdas
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Using cached label for /dev/sdc
        Allocated VG lvgrptstnlvm at 0x8194c58.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Using cached label for /dev/sdc
        Read lvgrptstnlvm metadata (119) from /dev/sda1 at 67584 size 1470
        Allocated VG lvgrptstnlvm at 0x8198c60.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Using cached label for /dev/sdc
        Read lvgrptstnlvm metadata (119) from /dev/sdb1 at 31232 size 1470
        Freeing VG lvgrptstnlvm at 0x8198c60.
        Allocated VG lvgrptstnlvm at 0x8198c60.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Using cached label for /dev/sdc
        Read lvgrptstnlvm metadata (119) from /dev/sdb2 at 29696 size 1470
        Freeing VG lvgrptstnlvm at 0x8198c60.
        Allocated VG lvgrptstnlvm at 0x8198c60.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Using cached label for /dev/sdc
        Read lvgrptstnlvm metadata (119) from /dev/sdc at 28160 size 1470
        Freeing VG lvgrptstnlvm at 0x8198c60.
        /dev/sda1 0:      0   1536: root(0:0)
        /dev/sda1 1:   1536    767: NULL(0:0)
        /dev/sdb1 0:      0   2271: NULL(0:0)
        /dev/sdb2 0:      0     31: NULL(0:0)
        /dev/sdc 0:      0      7: NULL(0:0)
        Adding PE range: start PE 0 length 2271 on /dev/sdb1
    Archiving volume group "lvgrptstnlvm" metadata (seqno 119).
    Adjusting mirror image count of root
    Setting logging type to mirrored
      allocation/mirror_logs_require_separate_pvs not found in config: defaulting to 0
      allocation/maximise_cling not found in config: defaulting to 1
        Allowing allocation on /dev/sdb1 start PE 0 length 2271
        Parallel PVs at LE 0 length 1536: /dev/sda1
        Trying allocation using contiguous policy.
        Still need 1538 total extents:
          1 (1 data/0 parity) parallel areas of 1536 extents each
          2 mirror logs of 1 extents each
        Considering allocation area 0 as /dev/sdb1 start PE 0 length 1536 leaving 735.
        Trying allocation using cling policy.
        Cling_to_allocated is set
        Still need 1538 total extents:
          1 (1 data/0 parity) parallel areas of 1536 extents each
          2 mirror logs of 1 extents each
        Trying allocation using normal policy.
        Cling_to_allocated is set
        Still need 1538 total extents:
          1 (1 data/0 parity) parallel areas of 1536 extents each
          2 mirror logs of 1 extents each
        Cling_to_allocated is not set
        Still need 1538 total extents:
          1 (1 data/0 parity) parallel areas of 1536 extents each
          2 mirror logs of 1 extents each
        Considering allocation area 0 as /dev/sdb1 start PE 0 length 1536 leaving 735.
        Found 1 areas for 1 parallel areas and 2 log areas so far.
        Considering allocation area 1 as /dev/sdb1 start PE 0 length 735 leaving 0.
  Insufficient suitable allocatable extents for logical volume : 1536 more required
  Unable to allocate extents for mirror(s).
        Unlock: Memlock counters: locked:0 critical:0 daemon:0 suspended:0
        Syncing device names
      Unlocking /run/lock/lvm/V_lvgrptstnlvm
        _undo_flock /run/lock/lvm/V_lvgrptstnlvm
        Closed /dev/sda1
        Closed /dev/sdb1
        Closed /dev/sdb2
        Closed /dev/sdc
        Freeing VG lvgrptstnlvm at 0x8194c58.
root Microknoppix:/tmp/lvm2-2_02_98#


Alex


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]