Operating System - Linux
1752822 Members
4385 Online
108789 Solutions
New Discussion юеВ

Re: linux partition extend

 
pratapvfr
Advisor

linux partition extend

I have RHEL 4, which having two hdd sda and sdb.
in sda there are three partition 1) /root 2) /boot 3) /data

its not in vg/lvm

found that /data partition lacking of space and need to extend.

in same hdd (sda) there is around 20gb free unaloccated space, can someone suggest me how to extend /data parition. its not in logical volume.
7 REPLIES 7
Goran┬аKoruga
Honored Contributor

Re: linux partition extend

Hello.

Tools like parted/gparted can do that for you - there's even a live CD with gparted on their site.

Regards,
Goran
pratapvfr
Advisor

Re: linux partition extend

yes i have parted tool, just want to confirmed can we extend partition or not? since its not in LVM?
Matti_Kurkela
Honored Contributor

Re: linux partition extend

Yes you can... but when you use parted or a similar tool, you must unmount the filesystem first.

Filesystem extension is not at all tied to LVM: if you can first extend the underlying storage unit (be it a partition, a LV or a LUN in a SAN with no partitioning at all), then you can use the filesystem resizing tools to extend it.

A traditional partition can be extended only if the partition and free disk space are contiguous on disk; this makes it much less flexible than LVM. But it sounds like this might not be a problem in your case. (Seeing the output of "fdisk -l /dev/sda" would help in verifying this.)

Extending a traditional partition will often require unmounting it, because partition table changes can take effect only when the partitions are unmounted. On a system disk, you may have to reboot to make the partition changes effective.

On RHEL 5, the "partprobe" command can make (some?) partition table changes effective while a disk still has some partitions mounted; I'm not sure about RHEL 4.

MK
MK
wobbe
Respected Contributor

Re: linux partition extend

Even if the space is noncontiguous you should be able to extend with gparted. But in those cases you need to move the data to the "left" or "right" this is a bit more risky and can take a lot of time. So make a good backup, and get a decent size change window.
Goran┬аKoruga
Honored Contributor

Re: linux partition extend

Hello.

Sure you can - in fact, even if you have LVM, it only does part of the job.

The other part is handled by filesystem specific tools/libraries, i.e. resize2fs and the likes.

Regards,
Goran
venugopalanramraj
Occasional Contributor

Re: linux partition extend

u can use the grow command to increase the size of your space
Alan_152
Honored Contributor

Re: linux partition extend

gparted livecd is my choice on how to do this kind of thing....