Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Your best bet might be to find out what is filling up /. It could be something in /home/username that you could put in a new directory on a new partition. Or it could be old .rpm files from upgrades that can be deleted. Those cylinders you want to add, don't look like a lot of space (maybe 1.5 G); so if you have filled up 40Gb already, it won't take long to fill that up too.
You can't just add those cylinders to / because they are part of an extended partition.
That said, you can make a new partition of those cylinders and format it so that it can be used. Then mount it where appropriate and move some files over to it. Check first to see how big /home/username is:
Code:
cd ~
du -h
See what the bottom line is on it. You can do this with other directories as well. Or to see them all:
Code:
cd /
du -h --max-depth=1
It will take a while to do them all especially /usr.
You might try using gparted. Since you want to expand sda3 with unused blocks at the beginning of sda4, it may be able move the start of the extended partition sda4 to make room to expand sda3.
Your best bet might be to find out what is filling up /. It could be something in /home/username that you could put in a new directory on a new partition. Or it could be old .rpm files from upgrades that can be deleted. Those cylinders you want to add, don't look like a lot of space (maybe 1.5 G); so if you have filled up 40Gb already, it won't take long to fill that up too.
You can't just add those cylinders to / because they are part of an extended partition.
That said, you can make a new partition of those cylinders and format it so that it can be used. Then mount it where appropriate and move some files over to it. Check first to see how big /home/username is:
Code:
cd ~
du -h
See what the bottom line is on it. You can do this with other directories as well. Or to see them all:
Code:
cd /
du -h --max-depth=1
It will take a while to do them all especially /usr.
I can make a new drive and mount that 1.5GB,but I wanted to know wheather as mentioned above (adding that space to root) can be done or not....
ext2online will only resize the filesystem and not the partition. As stated the unused space is part of the extended partition and you will need to use gparted
to shrink and move the extended and logical partitions before you can resize the root partition.
However, your extended partition only contains swap so it would be easier to turn off swap, delete the extended / swap partitions and then resize your root partition as required. Recreate hdc4 as swap and turn it back on. If you do use hdc4 as swap make sure you change your /etc/fstab settings.
I suggest running gparted from a liveCD and make sure any important data is copied or backed up.
LVM is one method to combine multiple partitions to look like one.
You are wrong avaloni,it worked in RHEL4 with help of 'ext2online' but in RHEL5 it's removed....
In addition to what michaelk says, in RHEL5 it is called resize2fs (btw I see it in RHEL4 as well).
So he is right that being just after your root partition you can just delete dhc4 and hdc5 (swapoff /dev/hdc5 and remove the entry from fstab first). Then delete hdc3 and recreate it. Just be sure the recreated partition starts at the same place and is >= to the original one. Then resize2fs once you're rebooted.
partition works should be *something like*:
Code:
# fdisk
d
3
d
4
d
5
n
3
<choose all space>
w
Make sure to backup all your data.
As well another option would be to to find out what is taking so much space and separate it out in another partition/disk. It should be some user data because the OS cannot/should not eat up so much space.
In addition to what michaelk says, in RHEL5 it is called resize2fs (btw I see it in RHEL4 as well).
So he is right that being just after your root partition you can just delete dhc4 and hdc5 (swapoff /dev/hdc5 and remove the entry from fstab first). Then delete hdc3 and recreate it. Just be sure the recreated partition starts at the same place and is >= to the original one. Then resize2fs once you're rebooted.
partition works should be *something like*:
Code:
# fdisk
d
3
d
4
d
5
n
3
<choose all space>
w
Make sure to backup all your data.
As well another option would be to to find out what is taking so much space and separate it out in another partition/disk. It should be some user data because the OS cannot/should not eat up so much space.
Ya,avalonit I've already done that with resize2fs in my rhel5
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.