Tuesday, October 01, 2013

extend an lvm with a file on another partition

if resizing another lvm and file system is not an option (time consuming) a temp solution will be

dd if=/dev/zero of=/var/disk1_2.dsk bs=1M count=100

losetup /dev/loop0 /var/disk1_2.dsk

pvcreate /dev/loop0

vgextend /dev/VG1/lv_disk1

lvextend -L+100M /dev/VG1/lv_disk1

vim /etc/rc.local
losetup /dev/loop0 /var/disk1_2.dsk 

No comments: