LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 05-23-2007, 11:43 AM   #1
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
move extra space from one partition to another


I was wondering if there was a reasonably safe way to reallocate space from one partition that has too much space to another partition that needs more space. I need 5G extra on / I was wondering if there is a way to reduce /var by 5G and reallocate that space to /. I am guessing that is not really possible due to /var being on SDA6 and / being on SDA3. Other discussion I have read on this refer to partitions that are next to each other, I suspect that is the only reasonable way to accomplis this. But if someone knows a way that I can accomplish this I would appreciate the howto. Thanks.

Systems current partitions if this helps.
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext3 4.9G 3.2G 1.5G 69% /
/dev/sda1 ext3 198M 16M 172M 9% /boot
/dev/sda2 ext3 26G 18G 7.3G 71% /home
none tmpfs 1014M 0 1014M 0% /dev/shm
/dev/sda6 ext3 36G 13G 21G 38% /var

Thanks for any assistance or advice,
George
 
Old 05-23-2007, 01:38 PM   #2
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Is it correct that sda3 and sda6 are separated only by sda5? What is on sda5 and what is its size? Any free space on it?

btw, which distro are you using? That would be good to know because I have noted that some have little tolerance for experiments with the disk layout.
 
Old 05-23-2007, 02:15 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
fdisk -l
to see all of the partitions

df
to how full they are

You can re-size any partition and then re-size another one to use the space that is freed up. Backup any important data first.

good tools for re-sizing include GParted and QTParted
 
Old 05-23-2007, 02:27 PM   #4
lein
Member
 
Registered: Jul 2006
Location: Australia
Distribution: Mint 14/16 & Raspbian
Posts: 73

Rep: Reputation: 23
I'm just looking at what you have there. Is sda5 your swap partition?
Code:
sda1 /boot
sda2 /home
sda3 /
sda5 /swap?
sda6 /var
If you had somewhere you could copy the contents of sda6 (BACKUP) to you could possibly make it smaller and then just shuffle sda5 along, making your logical partitions smaller. But you very well could (will?) loose data from sda6. It might just be easier to backup up /var remove sda5 & 6 use gparted to make root(sda3) bigger then just put /var back in a smaller logical partition - being sure to have it still located at /sda6 you don't want things looking for it there if it ends up in another partition.
 
Old 05-24-2007, 11:57 AM   #5
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by lein
I'm just looking at what you have there. Is sda5 your swap partition?
Code:
sda1 /boot
sda2 /home
sda3 /
sda5 /swap?
sda6 /var
If you had somewhere you could copy the contents of sda6 (BACKUP) to you could possibly make it smaller and then just shuffle sda5 along, making your logical partitions smaller. But you very well could (will?) loose data from sda6. It might just be easier to backup up /var remove sda5 & 6 use gparted to make root(sda3) bigger then just put /var back in a smaller logical partition - being sure to have it still located at /sda6 you don't want things looking for it there if it ends up in another partition.
SDA 5 is swap. The system is FC4, we decided that we are going to update the system to RHEL4 and use our NAS for the extra space needed (it does not actually have to be on / as I originally thought). It is just going to be too much trouble and too big of a risk to resize partitions. Thanks for all the help if I do have to resize partitions on a system in the future this will be helpful.

George
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Install XP in extra space jdmml Linux - Newbie 4 08-31-2004 01:42 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM
How to move space from one partition to another? Rgamboa Linux - Newbie 3 05-16-2003 04:39 PM
How to move space from one partition to another? Rgamboa Linux - Software 1 05-16-2003 04:02 PM
extra hd space? adam_boz Linux - Newbie 2 10-24-2002 02:08 AM


All times are GMT -5. The time now is 05:07 PM.

Main Menu
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