selfmor.blogg.se

Change file system without format
Change file system without format




change file system without format

With a tool such as ddrescue which can copy in reverse, you could simplify this slightly: Resize the file system again so it occupies all the partition.

change file system without format

You’ll need to calculate the offsets and sizes based on what you did in step 2, but the target is easy ( /dev/sdX1). Copy the raw blocks from the second half of the disk to the newly-created partition, again using dd or something similar.Use GPT for this you’ll be overwriting blocks at the start and end of the disk, so the copy of the file system at the start of the disk is now toast. Partition the disk, creating one partition which is slightly larger than the file system (500G).

change file system without format

  • Copy the blocks to the second half of the disk, using dd or a similar tool.
  • Ideally you should reduce the file system as much as possible, that will reduce the amount of data you need to copy around in subsequent steps. fits within the first 499G’s worth of blocks on the disk. This ensures that all the data, file system structure etc.
  • Resize the ext4 file system to 499G (erring on the safe side).
  • Working with a terabyte disk, I would proceed as follows. Partition tables (at least in MBR or GPT style) live at the start and/or end of disks, so you can introduce them if you can free the required space.






    Change file system without format