LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 07:47 AM   #1
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 09:50 AM   #2
ajlewis2
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 218

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, 09:55 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 11:48 AM   #4
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 07:13 AM   #5
avalonit
Member
 
Registered: Jun 2008
Posts: 81

Rep: Reputation: 19
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, 12:57 PM   #6
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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, 01:41 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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-04-2009, 11:39 PM   #8
avalonit
Member
 
Registered: Jun 2008
Posts: 81

Rep: Reputation: 19
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, 04:43 AM   #9
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

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



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 10:03 AM
Mount point space jayraj005 General 15 05-29-2009 08:31 AM
Increase space for mount point . . . eng_mohammedmostafa Linux - Software 7 03-26-2009 12:12 AM
Adding a disk to an exsisting mount point rlbewick Linux - General 3 11-02-2004 08:33 PM
Need more space to a mount point salmjuh Linux - Software 0 10-18-2004 05:03 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:42 PM.

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
Open Source Consulting | Domain Registration