Results 1 to 7 of 7

Thread: How to safely shrink an ext4 partition ?

  1. #1
    Join Date
    Jan 2010
    Beans
    419
    Distro
    Ubuntu Development Release

    Question How to safely shrink an ext4 partition ?

    I want it 100 % safe without any loss of data
    like windows 7 query for available space to shrink
    I'll use the live CD because I don't want it to be mounted
    I just don't trust the resize command

  2. #2
    Join Date
    Aug 2008
    Beans
    1,835
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to safely shrink an ext4 partition ?

    Quote Originally Posted by cap10Ibraim View Post
    I want it 100 % safe without any loss of data
    like windows 7 query for available space to shrink
    I'll use the live CD because I don't want it to be mounted
    I just don't trust the resize command
    Well back it up first. There is no other way. After all the power could go off during the resize operation and leave the partition borked.

  3. #3
    Join Date
    Dec 2008
    Location
    UK
    Beans
    586
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to safely shrink an ext4 partition ?

    Using Gparted to do a simple ext4 shrink operation should be very reliable, and if you have a good power supply (e.g. in the UK the power is very reliable in most areas) you are very unlikely to get a power outage (probably more likely that you or your cat/dog/child will pull the power cord out accidentally!).

    Also, if you are shrinking the partition from the end, no actual data is being moved/deleted/copied etc. so if there was a crash, it is highly likely the partition would still be usable and if not, that the testdisk tool would recover it.

    However, there is never a 100% guarantee that *anything* computer related will work correctly. That's why, as alphacrucis2 says, you should back up if you want to be sure.

    Anyhow, regardless of partitioning operations, your hard drive could fail at any time with total data loss. So if you value your data, you will be backing it up regularly already.

  4. #4
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: How to safely shrink an ext4 partition ?

    If you have space (which may not be an option since you are trying shrink something ) you could always use gparted to first copy the partition elsewhere and then shrink the original.

    I've never lost data using gparted but as has been said make sure you have backed up your data one way or the other before shrinking the partition.
    GRUB2

    Retired.

  5. #5
    Join Date
    Jan 2010
    Beans
    419
    Distro
    Ubuntu Development Release

    Re: How to safely shrink an ext4 partition ?

    thanks everyone
    it was successful with gparted mainly because the partition was 30% full only

  6. #6
    Join Date
    Aug 2009
    Beans
    7

    Re: How to safely shrink an ext4 partition ?

    Quote Originally Posted by cap10Ibraim View Post
    thanks everyone
    it was successful with gparted mainly because the partition was 30% full only

    can you post the commands

  7. #7
    Join Date
    Feb 2007
    Beans
    23,290
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to safely shrink an ext4 partition ?

    From the Ubuntu Forums Code of Conduct.
    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.
    Thread closed.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •