LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2008, 05:27 AM   #1
cghcgh
Member
 
Registered: Mar 2008
Posts: 69

Rep: Reputation: 15
How to expand disk space


hi,
i has this situation where i need to expand / ....Is there any way to do it? I cant use lvm to do it. Pls kindly assist

[root@sins476037 usr]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p3 2.0G 1.5G 391M 80% /
/dev/cciss/c0d0p1 99M 25M 70M 26% /boot
none 2.0G 0 2.0G 0% /dev/shm
/dev/mapper/Volume00-home
2.0G 36M 1.9G 2% /home
/dev/mapper/Volume00-opt
2.0G 619M 1.3G 33% /opt
/dev/mapper/Volume00-usr
6.0G 1.2G 4.5G 20% /usr
/dev/mapper/Volume00-var
4.0G 84M 3.7G 3% /var
 
Old 07-04-2008, 06:16 AM   #2
ktgajowniczek
LQ Newbie
 
Registered: Oct 2007
Location: Warsaw, Poland
Distribution: Debian
Posts: 7

Rep: Reputation: 0
resize /

Quote:
Originally Posted by cghcgh View Post
hi,
i has this situation where i need to expand / ....Is there any way to do it? I cant use lvm to do it. Pls kindly assist

...
What filesystem do you have installed on your /? Have you tried Gparted?
 
Old 07-04-2008, 01:58 PM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
You can also just mount another partition or disk as a sub directory of /. This will not give you added contiguous space but can open up space. I copied my /home over to a separate drive, deleted the contents of /home on first drive(after verification that everything worked), then mounted the new drive to /home. This opened up a ton of space on /.
 
Old 07-04-2008, 05:59 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,840

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
What does "fdisk -l" show ?.
 
Old 07-08-2008, 02:29 AM   #5
cghcgh
Member
 
Registered: Mar 2008
Posts: 69

Original Poster
Rep: Reputation: 15
Hi, my phsycial hardisk is actually 144 gb, but when they staged the server, they only make use of this little space.
Pls let me know if you need any information.
Can i just go to the lvm to expand? or i need to go to other utility? Pls kindly write down the steps if possible. appreciate your help.




[root@sins476037 ~]# fdisk -l

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 274 2096482+ 82 Linux swap
/dev/cciss/c0d0p3 275 535 2096482+ 83 Linux
/dev/cciss/c0d0p4 536 17844 139034542+ 5 Extended
/dev/cciss/c0d0p5 536 17844 139034511 8e Linux LVM


[root@sins476037 ~]# more /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/Volume00/home /home ext3 defaults 1 2
/dev/Volume00/opt /opt ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/Volume00/usr /usr ext3 defaults 1 2
/dev/Volume00/var /var ext3 defaults 1 2
LABEL=SW-cciss/c0d0p2 swap swap defaults 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,ma
naged 0 0
 
Old 07-08-2008, 02:45 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Before you do anything back everything up.

You got lucky in one sense, p3 is right next to p4(and p5), if you wanted to expand p1 it would have been much more difficult (shuffle things around).


You should be able to boot to a separate gparted disk(you cannot work on a mounted FS). You should be able to shrink p4 (and therby p5) and then expand p3 using gparted(using the space you gained from shrinking p4). Make sure you shrink p4 by moving it up, otherwise you will have made space for a p6.


http://gparted.sourceforge.net/livecd.php

Last edited by lazlow; 07-08-2008 at 02:47 AM.
 
Old 07-08-2008, 03:04 AM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
I was just adding things up again and you have two separate issues.

1. You are running out of space on p3 (/). I would suggest you change it from 2gb to 10gb(as described above).

2. This is screwy. Your p4(and therefore p5) size shows as 139gb, but if you add up your LVM sizes listed, they total 14gb. This is one of the many reasons I HATE LVM. Pretty much I will not be able to help with the LVM issue (I would like to keep what little hair I have left).
 
Old 07-08-2008, 10:09 AM   #8
dmangal
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Rep: Reputation: 0
cghcgh,

Let me know if you run into any problems with using the gparted boot disk. The other route to take would be using a standard linux boot disk extending the / partition appropriately using something like pvextend along with resizefs. I may be able to help you with lvm but as lazlow stated earlier, this will require you to boot into something other than your ordinary /boot partition since it mounts the / directory by default. This simplest route to take is just boot using gparted.
 
  


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
Problem with freeing disk space on a two hard disk Fedora Core 4 box favadalikhan Linux - Server 1 04-29-2008 10:04 PM
add space to / when from spare space on disk ctsiow Linux - General 4 11-07-2007 08:55 AM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 07:19 PM
expand root partition to occupy whole disk JohnGalt007 Linux - Software 4 01-09-2007 07:03 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM


All times are GMT -5. The time now is 01:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration