Can any one assist? I have a virtual box VDI which runs 11.2/KDE
I am playing with mirroring as a learning exercise. As I’m familiar with another LVM I thought that I could easily adapt to the LVM used in Linux. However I have hit some problems. I accept that they might be due to VirtualBox, but lets see.
I have performed an install of 11.2 onto a disk (/dev/sda), using lvm. The setup program very cleverly created a boot partition (/dev/sda1), and a partition to be owned by lvm (/dev/sda2), in which I have the home/root/swap volumes.
I wanted to create a mirrored environment, and after a bit of playing discovered that I needed to replicate the partitioning on the newly attached virtual disk (which had to be fully allocated not “dynamic”). I also eventually realised that in needed to use lvconvert not lvextend…
lvextend /dev/system/home -m 1 /dev/sdb2
would tell me that it could not vary the number of mirrors yet (?!)
lvconvert /dev/system/home -m 1 /dev/sdb2
tell me that “Not enough PVs with free space available for parallel allocation”, yet vgdisplay -v tells me that /dev/sdb2 is empty (and /dev/system/home is smaller that the size of /dev/sdb2)
lvconvert /dev/system/home -m 1 --alloc anywhere /dev/sdb2
appears to do the job, with numerous errors complaining about the mirror monitoring failing, except that lvdisplay -v does not tell me if the volume has been mirrored, and the allocated LE has not changed, yet vgdisplay -v shows that the number of free PEs has gone down.
As far as mirroring the rest of the Lvs I’ll wait until the community has feed its comments back to me.
The boot partition, I have mirrored via dd, and have edited the /boot/grub/menu.lst file to change the hd0 references to hd1.
I guess that I still need to dd the first 512 bytes of /dev/sda to /dev/sdb in order to get it to boot.
I suppose my question is that am I approaching LVM mirroring correctly?
Thanks in advance.