Question: Can I use dd to clone my luks encrypted lvm os drive?


EDIT WITH UPDATE: Operation went off without a hitch! I'm now up and running with the 512GB nvme drive! Next stop is dual booting nixos, which was the whole reason for switching to the larger drive.

ORIGINAL POST:

I’ve got a laptop running Arch (btw), with a 128GB nvme in it. The nvme has two partitions. EFI boot, and a luks encrypted lvm.

I’ve got a 512GB nvme I want to swap in. I think I can clone the device with dd, update the uuids, expand the lvm, and drop in the 512 nvme, but my searching hasn't given me a clear confirmation of this. Am I correct in my thought process, or am I setting myself up for disaster?

This entry was edited (1 year ago)
in reply to harsh3466

Look into pvmove. I'd take a backup with dd but try to do the actual move with pvmove. This might involve multiple steps if you can't have both nvme's installed at the same time. In that case I hope you have other drives.

Edit: I think what you're doing won't be a disaster because you're not writing anything to the old nvme so that data is still there. So you won't bork anything if the new drive doesn't work.

This entry was edited (1 year ago)