is there a way to create a snapshot of a logical volume (lv1
) that resides into volume group vgA
inside a different volume group (say vgB
)?
i have my root logical volume in volume group vgA
on the SSD and i want to take a snapshot of the volume on the second volume grout vgB
that sits onto the mechanical hard disk, so i tried to execute
lvcreate -L 10G -s -n vgB/rootSnapshot vgA/rootVolume
and some other variants but had no luck..
Advertisement
Answer
The snapshot volume must reside on the same VG as lv1.
For your situation, you may want to consider creating one VG (vgA) that spans over two PVs (pv1 for SSD, and pv2 for mechanical hard disk). Then you can create lv1 on pv1 and lvsnap on pv2.
lvcreate -L 100G -n lv1 vgA /dev/pv1 lvcreate -L 10G -s -n lvsnap /dev/vgA/lv1 /dev/pv2