LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-03-2009, 09:43 PM   #1
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
Distribute partition space


Hello all,

I have a machine with the partition table below:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p3      77G   69G  4.4G  95% /
/dev/cciss/c0d0p6      48G  349M   45G   1% /var
/dev/cciss/c0d0p5      67G  3.6G   60G   6% /usr
/dev/cciss/c0d0p1     487M   16M  446M   4% /boot
tmpfs                 2.0G     0  2.0G   0% /dev/shm
Now as you can see the / is almost getting full. Now is there any way to distribute the space from /var or /usr to / without stopping the machine.

Also there is no LVM in place.
 
Old 03-03-2009, 11:22 PM   #2
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
if your partions are layed out on the harddrive as follows:
/boot(primary), swap(primary), /(primary), /usr(logical), /var(logical)

Then you will have to reformat and back up data. EDIT: back up data, then reformat

You 'could' do this using a boot/tools disk and only backing up /usr to restore after the resize. BUT you have to recreate the / partition in EXACTLY the same starting cylinder. AND /var has to be in EXACTLY the same starting cylinder. and if you do one false move you loose /, /var, /usr. It's not too horribly complicated, you just have to know what you are doing.

I would suggest you back up all important data (most likely it is the /home directory) and place it onto it's own partition. If you have been using your system a while, at least you know the approximate sizes all the partitions need to be and can optimize their sizes.

/ 60g - important data to be moved = (on my system 1g) make it 5 gigs if you are paranoid of something unintentionally increasing its size.

/tmp - you really should think about moving this to its own partition. your results may vary. Mine it 5gig because I compile a lot of packages.

/opt - this may be empty or several gigs. separate, symlink, or add to the size of /

/var - 500mb looks like it will be enough. Unless you have a web server and want all data on that partition.

/usr - 5gigs looks like it will be enough but should be large enough for all the programs you want to install. 76

/boot - fedora defaults to 100mb. I've never used more than this for /boot. and if you don't concern your self with more than 5 kernels, you shouldn't either.

/home now has an awesome 180 gigs!... if that's the culprit anyway.
 
Old 03-04-2009, 02:36 PM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
How about if you were to run the command: fdisk -l and post the output so we can see how your drive is set up. It is possible a simple partitioning tool like Gparted can work it out.
 
Old 03-07-2009, 09:17 PM   #4
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
Code:
Disk /dev/cciss/c0d0: 220.1 GB, 220122071040 bytes
255 heads, 63 sectors/track, 26761 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          64      514048+  83  Linux
/dev/cciss/c0d0p2              65        1108     8385930   82  Linux swap / Solaris
/dev/cciss/c0d0p3            1109       11463    83176537+  83  Linux
/dev/cciss/c0d0p4           11464       26761   122881185    5  Extended
/dev/cciss/c0d0p5           11464       20387    71681998+  83  Linux
/dev/cciss/c0d0p6           20388       26761    51199123+  83  Linux
 
Old 03-07-2009, 09:45 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by tanveer View Post
...is there any way to distribute the space from /var or /usr to / without stopping the machine.
No.
On a test system you might try it, but if you want to keep the machine up, one assumes it is production. Don't even think about it.
gparted liveCD is always my solution of choice - but that involved a reboot.
 
Old 03-07-2009, 10:44 PM   #6
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
Thanks for your help guys.

No I am not going to do that in that server and make my life miserable.
Its my fault, I should have considered LVM at the first place.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 12:57 PM
Removing Linux Partition and merging that space with my other Windows Partition RamenBooko Linux - General 3 10-11-2007 02:47 PM
how to set up usb stick and how much space to distribute. playa4002 Debian 3 07-28-2006 11:28 AM
I want to increase my Linux partition.Should I take space from a Windows partition? PrinceBalak Linux - General 1 06-25-2004 05:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:34 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
Open Source Consulting | Domain Registration