Re: LUKS is written to a device with no partition table. Is it possible to add a partition table?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Based on Milan's suggestion in the gitlab issue
(which was to dd 4TiB to another part of the device).
It looks like the first step is to figure out the exact number of blocks that
the btrfs filesystem lives on and where they are.

It turns out that 'cryptsetup resize' doesn't do what I though it did.

# blockdev --getsize /dev/sdd
23441768448
# blockdev --getsize /dev/mapper/fatty
23441764352

Is it safe to assume that the filesystem lives from blocks 4096 to
8589934592 (4TiB / 512 Bytes) + 4096?

8589934592 + 4096 = 8589938688

I'll add an extra 1GiB between the existing filesystem to the new filesystem.

(((4 TiB) + (1 GiB)) / (512 bytes)) + 4096 = 8592035840

Thus, this is what I think the dd command should be:

dd if=/dev/sdd of=/dev/sdd count=8589938688 seek=8592035840 bs=512

I will then be able to add a GPT and create an entry pointing to 8592035840.
Then if something goes wrong, I should be able to recover using:

dd if=/dev/sdd of=/dev/sdd count=8589938688 skip=8592035840 bs=512

Does this seem correct?
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux