I have two external hard discs on an OpenSUSE 13.1 system.
On one I have created a partition structure:
- An encrypted LVM partition (LUKS)
- Several volumes (10) on this LVM partition, some formatted with xfs, some with ext4.
sdf 8:80 0 5,5T 0 disk └─sdf1 8:81 0 5,5T 0 part └─extern-2-crypt 253:5 0 5,5T 0 crypt ├─extern--2-nelson--home 253:10 0 8G 0 lvm /extern/nelson/home ├─extern--2-lucien--boot 253:11 0 300M 0 lvm /extern/lucien/boot ├─extern--2-nelson--root 253:12 0 11,5G 0 lvm /extern/nelson/root ├─extern--2-nelson--space 253:13 0 90,1G 0 lvm /extern/nelson/space ├─extern--2-lucien--backup 253:14 0 400G 0 lvm /extern/lucien/backup ├─extern--2-lucien--home 253:15 0 20G 0 lvm /extern/lucien/home ├─extern--2-lucien--raid 253:16 0 3,5T 0 lvm /extern/lucien/raid ├─extern--2-lucien--root 253:17 0 8,5G 0 lvm /extern/lucien/root └─extern--2-lucien--space 253:18 0 30G 0 lvm /extern/lucien/space
How can I replicate this structure easily including the LVM config from one disc to the other (with only one disc running at the same time)?
I know of sgdisk (8)
and parted
(mentioned in How to copy the partition layout of a whole disk using standard tools), but that covers only the partition, not the LUKS information and certainly not the LVM config.