Centos: Change partition size on the fly?
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
@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.
Thank you to all that helped me!