1

I have a few big spinning drives that I formatted as EXT4 without adding a GPT first. They work just fine on Linux obviously, but I need to move this drives to a FreeBSD box, and the mount plugin for EXT4 won't support these. These are big drives and copying over the whole contents to another drive be able to wipe them and then transfer back after partitioning would take many days. Is there a way to move the partition forward a bit and add a partition table?

5
  • I understand there is no partition table at all, not even in MBR. Please confirm. Related: Uses of single-partition disk configuration. Commented May 20, 2021 at 20:22
  • @KamilMaciorowski that's correct. There is no partition table whatsoever. The EXT4 partition begins on sector 0. Commented May 20, 2021 at 23:22
  • "move the partition forward a bit and add a partition table?" Could certainly be done after shrinking the filesystem a little, but even then, moving the data on a terabyte disk a little bit to the right essentially means copying them. Which would take exactly the time you don't want to spend (or longer; since copying data from disk A to the same disk A is considerably slower than copying it from one disk to another). Also, you need to have a good backup before you start pushing bits on your disk around, and I guess it would take time to create one. Commented May 21, 2021 at 2:37
  • @A.B it's not possible to use disks >2TB with MBR. (Well it is, but you can't access beyond the 2TB mark.) Handling larger disk sizes is one of the reasons why GPT is necessary. Commented May 24, 2021 at 20:24
  • @roaima indeed. And if using 4k sector size, the 1k spare space isn't enough. So this doesn't work anymore (it does for 512b sectors and disk < 2TB).
    – A.B
    Commented May 24, 2021 at 20:26

1 Answer 1

1

Unfortunately, no, not really.

It should be possible to shrink the filesystem and then move it backwards (gparted can probably do this) by 1 MB to allow for a GPT partition table. However, any interruption to the migration process will destroy your filesystem and all its data. At that point you realise you should have taken a backup. And at this point it's better to take the backup and do the copy properly and safely.

1
  • These are chia plots (cryptocurrency mined by proof of space). There's no point in backing them up, as another drive filled with other data is more valuable than the redundancy even if one of them is lost. I didn't end up moving to freebsd but i still wanted to know if it was possible. Commented May 25, 2021 at 0:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .