LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 06-12-2009, 08:47 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,356

Rep: Reputation: 135Reputation: 135
adding space to root mount point


This is output my fdisk -l:
Code:
Disk /dev/hdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1        3187    25599546    7  HPFS/NTFS
/dev/hdc2            3188        3225      305235   83  Linux
/dev/hdc3            3226        9408    49664947+  83  Linux
/dev/hdc4            9409        9729     2578432+   5  Extended
/dev/hdc5            9629        9729      811282+  82  Linux swap / Solaris
This is output of my df -h:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdc3              46G   40G  3.9G  92% /
/dev/hdc2             289M   15M  259M   6% /boot
tmpfs                 379M     0  379M   0% /dev/shm
I am using RHEL5 server,as I am running outof space on my root mount point (92%),I want to add cylynder(9409-9628) to /,is this possible and how ??
 
Old 06-12-2009, 10:50 AM   #2
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 217

Rep: Reputation: 46
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.
 
Old 06-12-2009, 10:55 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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.
 
Old 06-12-2009, 12:48 PM   #4
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,356

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by ajlewis2 View Post
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....
 
Old 06-15-2009, 08:13 AM   #5
avalonit
Member
 
Registered: Jun 2008
Posts: 71

Rep: Reputation: 17
Quote:
Originally Posted by divyashree View Post
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....
No, you can't. If you were using LVM you would have been able to add space from an arbitrary locations but you are not.
 
Old 07-04-2009, 01:57 PM   #6
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,356

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by avalonit View Post
No, you can't. If you were using LVM you would have been able to add space from an arbitrary locations but you are not.
You are wrong avaloni,it worked in RHEL4 with help of 'ext2online' but in RHEL5 it's removed....
 
Old 07-04-2009, 02:41 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,152

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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.
 
Old 07-05-2009, 12:39 AM   #8
avalonit
Member
 
Registered: Jun 2008
Posts: 71

Rep: Reputation: 17
Quote:
Originally Posted by divyashree View Post
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.
 
Old 07-05-2009, 05:43 AM   #9
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,356

Original Poster
Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by avalonit View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 11:03 AM
Mount point space jayraj005 General 15 05-29-2009 09:31 AM
Increase space for mount point . . . eng_mohammedmostafa Linux - Software 7 03-26-2009 01:12 AM
Adding a disk to an exsisting mount point rlbewick Linux - General 3 11-02-2004 09:33 PM
Need more space to a mount point salmjuh Linux - Software 0 10-18-2004 06:03 AM


All times are GMT -5. The time now is 08:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration