Centos: Change partition size on the fly?

Hi All,

I've done a quick search and could find an answer to my problem:

I'm running out of disk space, fast. It is the OS's partition running out. I would like to take 1Gb from another partition on that disk and adding it to my OS's partition. On Windows one gets Partition Magic that can do this "on the fly" - thus no re-formating ect.

Is there any command line program that I can use on my centos installation on linode?

Best regards,

TX

5 Replies

The safest way to do this is to shutdown your linode, then edit the disks via the linode manager. You won't have to reformat.

I didn't know it was safe to do it through the Dashboard. So it will only change the size of the partitions and I will not lose any data?

@TungstenX:

So it will only change the size of the partitions and I will not lose any data?
True as long as you have an ext2/3 filesystem on the disk image. If you try to shrink the image too much (smaller than the underlying filesystem), the resize will fail gracefully.

If you created raw disk images and used OS tools inside your Linode to create something non-standard, control panel resizing won't work as expected and may well eat your filesystem/partition(s).

Make a backup.

@pclissold:

If you created raw disk images and used OS tools inside your Linode to create something non-standard, control panel resizing won't work as expected and may well eat your filesystem/partition(s).

Even in that case, the mandatory pre-resize fsck will immediately bomb out with apocalyptic errors when it can't find anything resembling an ext3 filesystem and the resize will fail gracefully. Probably. Most of the time.

> Make a backup.

Always.

Whoot whoot! It worked. The back-uping took the whole day :( but the changing of the partition sizes took less than 5 min.

Thank you to all that helped me!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct