1 (edited by egparadigm 2014-09-30 11:52:46)

Topic: Cancelled Partition Move – Verify if Corrupted?

Hi,

I have a hackintosh. I had elected to move my home partition on my home HDD (HFS+) to the right to create unallocated space. I used a GParted live disc I burnt several years ago. I didn't realise the first part was just a simulation, and would have cancelled during that because I changed my mind. However I thought it safer to let it run. Then I saw it start again and realised the real move would take 4.5 hours and I didn't want to wait for that to complete, figured I would just restore from a backup if necessary.

Upon rebooting, everything seems to work as it did before. Is it safe to assume that all my files are unaffected by this aborted partition move?

I am contemplating restoring vital files from a backup if there is any chance of corruption. I have yet to find any corrupted files. The move had completed 6GB of transfer out of 450.

Thanks for your time!

2

Re: Cancelled Partition Move – Verify if Corrupted?

Hi,

Question: How far to the right were you moving your home partition?
Assuming more than 6 GiB, as noted below.


When moving a partition to the right, if there are no intervening partitions, GParted does the following:

  1. Grow the partition to the right to include the new location;

  2. Copy the partition to the right, starting at the end of the original location working towards the beginning;

  3. Shrink the partition from the left to just cover the new location.


Status:
Assuming you were moving your home partition more that 6 GiB to the right, and you cancelled the operation after only 6 GiB had been copied the situation will be:

  1. Original file system is intact at the start of the larger partition;

  2. Partition is larger that 450 GiB by the amount you started to move the partition to the right.


Suggested actions:

  1. Get yourself the latest GParted Live CD, 0.19.1.  Because:

    • It displays unallocated space when the file system doesn't fill the partition;

    • When operations are cancelled it undoes the cancelled operation, restoring the previous state, including for partition move operations.

  2. View your home partition.  It will show an amount of unallocated space at the end of the partition.  This confirms status (1) above.  Do *not* check the file system as the warning message recommends.

  3. Resize your home partition to shrink it back to the original size.  It will check the file system first and then shrink the partition to the desired size.


Glad to see you have backups.  You were fortunate.

Thanks,
Mike

3

Re: Cancelled Partition Move – Verify if Corrupted?

Hi and thanks for replying!

The partition was the same size as the disk, i.e. 1TB. The content was around 450GB, and 6GB was how much had been copied.

I'm dl'ing the latest disc now. Good idea!

Given the info I've given, i.e. partition size, will following your suggested actions help me to tell if my files are safe?

I'll boot the disc and report what I find. Really appreciate the response. smile

4

Re: Cancelled Partition Move – Verify if Corrupted?

I booted the new Live CD.

This is what I found:

http://i.imgur.com/SpiV9nc.jpg

This was very suprising, because previous to this I had resized/grown the partition back to its original size. Therefore I thought I had undone the creation of unallocated space using Disk Utility in Mac OS X. Yet there it is again...?

I then ran gptsync on both my drives (Mac system and home). This is because a Windows installer had possibly put the GPT out of sync. I was trying to create unallocated space for a windows installation. However, I have now decided to use a separate HDD to ensure I have enough space for the OS and any applications.

Finally, I tried to grow the partition back to its original size, but it won't let me! The partition cannot be resized more than one MiB and can only be moved. What is the reason for this? I rebooted into Mac OS X and Disc utility cannot do it either

Thanks very much for your time and sorry for being silly! I am mainly worried about the integrity of my files and am quite happy to restore from backup (time machine) to be on the safe side.

5

Re: Cancelled Partition Move – Verify if Corrupted?

Disk Util error:

http://i.imgur.com/cCLGnxD.png

6

Re: Cancelled Partition Move – Verify if Corrupted?

Unfortunately GParted can only shrink HFS+ partitions, not grow.  See GParted Features page.  If you are aware of any free software tools to grow HFS+ then please let us know.

If your desire is to grow the HFS+ partition, then after ensuring your backup is good my recommendation would be to delete the existing partition, create a new HFS+ partition of the size you desire, and then restore your files from backup.

7

Re: Cancelled Partition Move – Verify if Corrupted?

Thanks for the info. I went ahead and restored. All working fine. smile

8

Re: Cancelled Partition Move – Verify if Corrupted?

'Glad to hear it.  Backups are good to have.  smile