I'm trying to figure out the way to extend my partition without losing any data. I've created a video to explain my problem.



From the information provided in your question, extending a partition alone is always safe. Moving and shrinking other partitions may be unsafe, however, because of small amounts of fragmentation that naturally occur.

In order to determine the rate of fragmentation, you can use sudo fsck -fn /dev/sdXn on your partition even when it is mounted as the -n option makes no changes.

291595/1222992 files (0.2% non-contiguous), 1927790/4882432 blocks

If the amount of non-contiguous is too close to ~1%, you may damage or permanently lose data when shrinking (or possibly moving) the filesystem. fsck will tell you the total number of files (first number in x/y), for 300,000 files even 1% non-contiguous is 3,000 files that might be important to you or the operating system.

From your video: you will need to use an external Live USB (preferably one with GParted on it, like Ubuntu Live USB or Slax) in order to move Linux's partitions around as this can't (shouldn't...) be done while the system is running.

Your Linux installation is inside an extended partition, which is a virtual partition table (Logical Volume Management) that allows an MBR to have more than 4 partitions. This shouldn't prevent you from increasing the size of the extended partition / Linux partition with the unallocated space from outside the LVM.

At a later time I can try to study the video closely and give exact steps or fdisk commands to partition your disk, but hopefully this can give you a starting point.

Here are some other questions you might have overlooked when asking:

How do I resize a partition in Ubuntu linux without losing data?

How to reduce and remove Physical Volume from active Logical Volume?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.