1829958 Members
1980 Online
109998 Solutions
New Discussion

Re: increase partition

 
Fadia Almarei
Super Advisor

increase partition

Dear All
i have redhat9 linux server,I want to increase the one of my partition ,kindly send me a deeply detail to increse my partition.
BR,
Fadia
fadia.marei
6 REPLIES 6
Vitaly Karasik_1
Honored Contributor

Re: increase partition

Unfortunately, there is no way for increasing size on-the-fly;
you should create new bigger partition and move all data.
Fadia Almarei
Super Advisor

Re: increase partition

so why there is a parted command and resize command
fadia.marei
Bruce Copeland
Trusted Contributor

Re: increase partition

You can use parted to do this if you have an unused (or partially used) partition next to the one you want to increase. This is reasonably safe if it is an unused partition AFTER the one you want to increase. It is somewhat dangerous in all other cases because it means parted has to move a lot of data around on one (or more) partition(s).

Bruce
dirk dierickx
Honored Contributor

Re: increase partition

is there any chance you are using LVM? then you can also extend your filesystems fairly simple.
Manuel Wolfshant
Trusted Contributor

Re: increase partition

As Vitaly has said, linux does not really support resize-on-the-fly. You can increase the size of a partition using parted, assuming you have free space after it, but you will almost certainly have problems when trying to use the extra [previoulsy unformated] space.
Do not even think of using the windows version of Partition Magic. So far I have never met anyone who used that tool on linux partitions and still have valid data after that.
The recommended solution is to backup your data, repartition the disk (for instance delete a partition adjacent to the one you want to increase, as well as that one and than create a single larger partition) and after formatting the new partition, restore the data. One candidate for delete & reformat could be the swap partition.
Rick Garland
Honored Contributor

Re: increase partition

If you have LVM on the partition, you can unmount the partition and issue the commands such as lvextend and fsextend.

Without LVM, the partitions are static and you will need to do some moving of data or create a new partition or (at worse) reload the OS making the partition larger.