I have two external hard discs on an OpenSUSE 13.1 system.

On one I have created a partition structure:

  1. An encrypted LVM partition (LUKS)
  2. 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.

  • Wait, what? "with only one disk running at the same time"? You want to copy all partitions, lvm config, and the data on each volume, from one disk to another, with only one disk present at any given time? – Patrick Oct 16 '14 at 1:43
  • @Patrick: "How can I replicate this structure easily" - I want to replicate the structure, not the data in the volumes. At the end of this step I want to have empty volumes/partitions. – Reinstate Monica - M. Schröder Oct 16 '14 at 11:20

Your Answer

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

Browse other questions tagged or ask your own question.