I would like to shrink the size of a partition containing an Ubuntu distribution and files. Is it safe to assume that I will not lose or corrupt any of the files as long as I don't make the partition smaller than the amount of data that is currently on it? I am planning to use GParted from the Ubuntu LiveCD.
4 Answers
As always, backup your data before. But, I have used GParted many, many times. When used correctly, and with care, you should not lose any data at all.
-
1Same here, I've used GParted... well, several times (10-20 probably) and I've always found it to be exceptionally reliable. (FWIW, I'm always careful not to try things like shrinking a partition to less than the size of the data on it)– David ZMay 7, 2009 at 21:00
-
I agree I've only had success when using GParted, but you should always have a backup of any data you prefer not to lose.– Steve TMay 7, 2009 at 21:55
-
2+1, though it's 'lose', not 'loose'. See ericpinder.com/html/lose.html– romandasAug 14, 2009 at 13:32
-
Read the information on the link you provided; thank you. Corrected.– user1797Aug 14, 2009 at 23:35
-
You can back up the whole machine using CloneZilla before you attempt it. Jun 3, 2010 at 15:32
As @David_Collantes said, make sure do backups beforehand, just in case. That said, I've never lost data using it, but I would also recommend that you not try and shrink too close to the amount of data on the partition - leave at least 10% free if you can. This will help the filesystem deal with fragmentation and also allow for the reserved 'system space' to not be immediately in use.
Watch out that GParted doesn't change the start of the block while you are resizing the end!
I'm not sure why this happens but it might be the "round to sector" option. Double check before you hit OK.
I've had this happen twice now and it's seared painfully in my mind - it turns a 2 second operation into hours of data shifting and increases the risk of further problems. It'd be a serious pain to move back.
Never attempt to modify partitions without a proper backup, unless you're doing it to try to recover from a disaster that already happened where there is no backup. But then you'd do a copy of the entire disk first anyway ^^
To add some weight to this, I've lost data on partition resize with various utilities including GParted. It happens, even if it's supposedly rarely (yes I've had backups).