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

Alessandro MACUZ alessandro.macuz at gmail.com
Thu Jul 4 12:45:44 UTC 2013


2013/7/4 matthew patton <pattonme at yahoo.com>

>
>
> >
> >
> http://serverfault.com/questions/500533/lvm-mirror-with-data-and-logs-mirrored-on-same-2-devices
>
> wow, that smells like a logic bug to me. If not, then the documentation
> needs a VERY obvious warning about how to properly do mirrored devices with
> mirrored logs (nee 4+ distinct PV devices). If the internals can't be
> fixed, then it needs to error out on creation when there aren't 4 devices
> to work with. Any particular reason why you wanted pseudo-external logs in
> the first place?
>
> Does 'lvcreate -nv' show you the work plan?
>
>
Yet lvconvert looks the right tool for me if I could overcome this
limitation. I guess you meant 'lvconvert' instead of 'lvcreate' because
lvcreate works fine and I don't think it needs to be debugged. The only
drawback is that I need a much more complicated migration.

In case you needed the "lvconvert" here it is (pretty long) the output of

 lvconvert -vvv -m1 --mirrorlog mirrored /dev/lvgrptstnlvm/root /dev/sdb1


root at debian:/home/user# lvconvert -vvv -m1 --mirrorlog mirrored
/dev/lvgrptstnlvm/root /dev/sdb1
        Processing: lvconvert -vvv -m1 --mirrorlog mirrored
/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 activation/mirror_region_size to 512
      Getting target version for mirror
        dm versions   OF   [16384] (*1)
      Getting target version for mirror
        dm versions   OF   [16384] (*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
        /dev/sr0: Added to device cache
        /dev/cdrom: Aliased to /dev/sr0 in device cache (preferred name)
        /dev/cdrw: Aliased to /dev/cdrom in device cache

/dev/disk/by-id/ata-VMware_Virtual_IDE_CDROM_Drive_10000000000000000001:
Aliased to /dev/cdrom in device cache
        /dev/disk/by-label/Debian\x20wheezy\x2020130505-08:21: Aliased to
/dev/cdrom in device cache
        /dev/disk/by-path/pci-0000:00:07.1-scsi-1:0:0:0: Aliased to
/dev/cdrom in device cache
        /dev/dvd: Aliased to /dev/cdrom in device cache
        /dev/dvdrw: Aliased to /dev/cdrom in device cache
        /dev/sda: Added to device cache
        /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0: Aliased to
/dev/sda in device cache
        /dev/sda1: Added to device cache
        /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0-part1: Aliased to
/dev/sda1 in device cache
        /dev/sdb: Added to device cache
        /dev/disk/by-id/scsi-26362623865306265: Aliased to /dev/sdb in
device cache
        /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0: Aliased to
/dev/sdb in device cache
        /dev/sdb1: Added to device cache
        /dev/disk/by-id/scsi-26362623865306265-part1: Aliased to /dev/sdb1
in device cache
        /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0-part1: Aliased to
/dev/sdb1 in device cache
        /dev/sdb2: Added to device cache
        /dev/disk/by-id/scsi-26362623865306265-part2: Aliased to /dev/sdb2
in device cache
        /dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:1:0-part2: Aliased to
/dev/sdb2 in device cache
        /dev/fd0: Added to device cache
        /dev/loop0: Added to device cache
        /dev/loop1: Added to device cache
        /dev/loop2: Added to device cache
        /dev/loop3: Added to device cache
        /dev/loop4: Added to device cache
        /dev/loop5: Added to device cache
        /dev/loop6: Added to device cache
        /dev/loop7: Added to device cache
        /dev/dm-0: Added to device cache
        /dev/disk/by-id/dm-name-lvgrptstnlvm-root: Aliased to /dev/dm-0 in
device cache (preferred name)

/dev/disk/by-id/dm-uuid-LVM-DxeZ119H0aLSu7DzkC21nfqolp4rPTBpNTJpPI2EvQWsK2Xd5eoSvk4x8slmPVYC:
Aliased to /dev/disk/by-id/dm-name-lvgrptstnlvm-root in device cache
        /dev/disk/by-uuid/2e715f19-ad02-44d8-9e06-e1ac5e302dfd: Aliased to
/dev/disk/by-id/dm-name-lvgrptstnlvm-root in device cache
        /dev/lvgrptstnlvm/root: Aliased to
/dev/disk/by-id/dm-name-lvgrptstnlvm-root in device cache (preferred name)
        /dev/mapper/lvgrptstnlvm-root: Aliased to /dev/lvgrptstnlvm/root in
device cache
        /dev/fd0: Skipping: Unrecognised LVM device type 2
        Opened /dev/loop0 RO O_DIRECT
      /dev/loop0: size is 1094288 sectors
        Closed /dev/loop0
      /dev/loop0: size is 1094288 sectors
        Opened /dev/loop0 RO O_DIRECT
        /dev/loop0: block size is 1024 bytes
        Closed /dev/loop0
        Using /dev/loop0
        Opened /dev/loop0 RO O_DIRECT
        /dev/loop0: block size is 1024 bytes
      /dev/loop0: No label detected
        Closed /dev/loop0
        Opened /dev/sda RO O_DIRECT
      /dev/sda: size is 18874368 sectors
        /dev/sda: block size is 4096 bytes
        /dev/sda: Skipping: Partition table signature found
        Closed /dev/sda
        /dev/cdrom: Skipping: Unrecognised LVM device type 11
        dm status   (254:0) 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/loop1 RO O_DIRECT
      /dev/loop1: size is 0 sectors
        /dev/loop1: Skipping: Too small to hold a PV
        Closed /dev/loop1
        Opened /dev/sda1 RO O_DIRECT
      /dev/sda1: size is 18872320 sectors
        Closed /dev/sda1
      /dev/sda1: size is 18872320 sectors
        Opened /dev/sda1 RO O_DIRECT
        /dev/sda1: block size is 4096 bytes
        Closed /dev/sda1
        Using /dev/sda1
        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 42496 size 1283 (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 debian.
        Opened /dev/loop2 RO O_DIRECT
      /dev/loop2: size is 0 sectors
        /dev/loop2: Skipping: Too small to hold a PV
        Closed /dev/loop2
        Opened /dev/loop3 RO O_DIRECT
      /dev/loop3: size is 0 sectors
        /dev/loop3: Skipping: Too small to hold a PV
        Closed /dev/loop3
        Opened /dev/loop4 RO O_DIRECT
      /dev/loop4: size is 0 sectors
        /dev/loop4: Skipping: Too small to hold a PV
        Closed /dev/loop4
        Opened /dev/loop5 RO O_DIRECT
      /dev/loop5: size is 0 sectors
        /dev/loop5: Skipping: Too small to hold a PV
        Closed /dev/loop5
        Opened /dev/loop6 RO O_DIRECT
      /dev/loop6: size is 0 sectors
        /dev/loop6: Skipping: Too small to hold a PV
        Closed /dev/loop6
        Opened /dev/loop7 RO O_DIRECT
      /dev/loop7: size is 0 sectors
        /dev/loop7: Skipping: Too small to hold a PV
        Closed /dev/loop7
        Opened /dev/sdb RO O_DIRECT
      /dev/sdb: size is 18874368 sectors
        /dev/sdb: block size is 4096 bytes
        /dev/sdb: Skipping: Partition table signature found
        Closed /dev/sdb
        Opened /dev/sdb1 RO O_DIRECT
      /dev/sdb1: size is 18610176 sectors
        Closed /dev/sdb1
      /dev/sdb1: size is 18610176 sectors
        Opened /dev/sdb1 RO O_DIRECT
        /dev/sdb1: block size is 4096 bytes
        Closed /dev/sdb1
        Using /dev/sdb1
        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 6144 size 1283 (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: size is 262144 sectors
        Closed /dev/sdb2
      /dev/sdb2: size is 262144 sectors
        Opened /dev/sdb2 RO O_DIRECT
        /dev/sdb2: block size is 4096 bytes
        Closed /dev/sdb2
        Using /dev/sdb2
        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 4608 size 1283 (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
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Allocated VG lvgrptstnlvm at 0x2732230.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Read lvgrptstnlvm metadata (109) from /dev/sda1 at 42496 size 1283
        Allocated VG lvgrptstnlvm at 0x2736240.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Read lvgrptstnlvm metadata (109) from /dev/sdb1 at 6144 size 1283
        Freeing VG lvgrptstnlvm at 0x2736240.
        Allocated VG lvgrptstnlvm at 0x2736240.
        Using cached label for /dev/sda1
        Using cached label for /dev/sdb1
        Using cached label for /dev/sdb2
        Read lvgrptstnlvm metadata (109) from /dev/sdb2 at 4608 size 1283
        Freeing VG lvgrptstnlvm at 0x2736240.
        /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)
        Adding PE range: start PE 0 length 2271 on /dev/sdb1
    Archiving volume group "lvgrptstnlvm" metadata (seqno 109).
    Adjusting mirror image count of root
    Setting logging type to mirrored
        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.
        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 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
        Freeing VG lvgrptstnlvm at 0x2732230.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20130704/7cdacf3a/attachment.htm>


More information about the linux-lvm mailing list