0

On a RHEL 5 I have to create an LVM mirror from multipath disks. There are enough free extents, but - on two disks, because the VG was made out of 4 disks.

[root@SERVER ~]# pvs -v --segments | head -1
    Scanning for physical volume names
  PV                              VG        Fmt  Attr PSize   PFree   Start SSize  LV                 Start Type   PE Ranges                              
[root@SERVER ~]# pvs -v --segments | grep archivvg6
    Scanning for physical volume names
  /dev/mpath/orau11db6_32gcc1     archivvg6 lvm2 a--   32.00G  32.00G     0   8191                        0 free                                          
  /dev/mpath/orau11db6_32gcc2     archivvg6 lvm2 a--   32.00G      0      0   8191 orau011archlv          0 linear /dev/mpath/orau11db6_32gcc2:0-8190     
  /dev/mpath/orau11db6_8gcc1      archivvg6 lvm2 a--    8.00G   8.00G     0   2047                        0 free                                          
  /dev/mpath/orau11db6_8gcc2      archivvg6 lvm2 a--    8.00G      0      0   2047 orau011archlv       8191 linear /dev/mpath/orau11db6_8gcc2:0-2046      
[root@SERVER ~]# lvs | grep archivvg6
  orau011archlv      archivvg6 -wi-ao  39.99G                                      
[root@SERVER ~]# lvconvert --mirrorlog mirrored -m 1 archivvg6/orau011archlv /dev/mpath/orau11db6_32gcc1 /dev/mpath/orau11db6_8gcc1
  Insufficient suitable allocatable extents for logical volume : 10238 more required
  Unable to allocate extents for mirror(s).
[root@SERVER ~]# 
[root@SERVER ~]# lvconvert --mirrorlog mirrored -m 1 archivvg6/orau011archlv /dev/mpath/orau11db6_32gcc1
  Insufficient free space: 10238 extents needed, but only 8191 available
  Unable to allocate extents for mirror(s).
[root@SERVER ~]# 

Question: how can I use "lvconvert" command to use the two disks?

UPDATE: Would "--alloc anywhere" help? update: no..:

[root@SERVER ~]# lvconvert -i 5 --alloc anywhere --mirrorlog mirrored -m 1 archivvg6/orau011archlv /dev/mpath/orau11db6_32gcc1 /dev/mpath/orau11db6_8gcc1
  Insufficient suitable allocatable extents for logical volume : 2 more required
  Unable to allocate extents for mirror(s).
[root@SERVER ~]# 
0

1) there was a syntax error, this is the GOOD one:

lvconvert -v -m 1 --mirrorlog mirrored /dev/archivvg6/orau011archlv /dev/mpath/orau11db6_32gcc1 /dev/mpath/orau11db6_32gcc2 /dev/mpath/orau11db6_8gcc1 /dev/mpath/orau11db6_8gcc2

CC1 CC2 CC1 CC2

but the man page doesn't really speaks about this.. :)

2) 1 free PE is needed per PV! So decrease the FS, then LV size to free up 4 MByte..

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.