LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 05-03-2008, 11:14 PM   #1
MasterChief1234
LQ Newbie
 
Registered: Mar 2006
Distribution: Archlinux
Posts: 18

Rep: Reputation: 0
Resizing partitions


I am not new to Linux but I have been out of the loop for a while. I need to resize multiple partitions and put the space into my home partition.

Code:
Fstab: 
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
LABEL=/home             /home                   ext3    defaults        1 2
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=/usr              /usr                    ext3    defaults        1 2
LABEL=/var              /var                    ext3    defaults        1 2
LABEL=SWAP-hda7         swap                    swap    defaults        0 0
Code:
Df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5             2.0G  596M  1.3G  32% /
/dev/hda1              76M   24M   49M  33% /boot
tmpfs                 250M     0  250M   0% /dev/shm
/dev/hda8              14G  7.8G  5.4G  60% /home
/dev/hda6             996M   34M  911M   4% /tmp
/dev/hda3             9.7G  1.8G  7.5G  20% /usr
/dev/hda2             9.7G  267M  9.0G   3% /var
I am running centos and this is a remote server, is there a way I can resize some of these partitions and gain some extra space ? Thanks.
 
Old 05-04-2008, 04:14 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
just remember that you cannot resize a partition from its beginning.. you can only adjust the end sectors.. for example from hda8, if there are other partitions after that partition, you can delete them or move them first on other hds then resize your hda8 partition.. then create a fs after hda8 similar as the moved partitions then copy the files there.

you can use gparted to resize your partition.
 
Old 05-07-2008, 05:54 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

Rep: Reputation: Disabled
Quote:
Originally Posted by konsolebox View Post
just remember that you cannot resize a partition from its beginning.. you can only adjust the end sectors. ... you can use gparted to resize your partition.
Not entirely correct. You can shrink any partition from the beginning or from the end. You have to move the partitions with the higher numbers to make room for increasing the size of a particular partition.

As stated, use either gparted or q(t?)parted to achieve this. They are graphical tools and you'll see what is going on. Worked for me flawlessly but takes its time.
 
Old 05-07-2008, 06:20 AM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I think the output of
Code:
fdisk -l
would help us to understand the partition layout better.

To start with there is no information on hda7.

We don't know how big the disk size or if there is unallocated space after the extended partition hda4 which enclosing the /home in hda8.
 
Old 05-07-2008, 08:41 PM   #5
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,245
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by JZL240I-U View Post
Not entirely correct. You can shrink any partition from the beginning or from the end. You have to move the partitions with the higher numbers to make room for increasing the size of a particular partition.

As stated, use either gparted or q(t?)parted to achieve this. They are graphical tools and you'll see what is going on. Worked for me flawlessly but takes its time.
sorry.. you're correct.. theoretically it's possible.., perhaps moving data to the end portions of the partition then creating a new table there.. it won't be easy and it's more dangerous though.

anyways.. my apologies :-)
 
Old 05-08-2008, 01:27 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,665

Rep: Reputation: Disabled
No apologies needed . As a matter of fact, I used gparted to move 4 partitions, so as to be able to enlarge the /boot partition for a newer kernel. No shifting of data on my own needed, it's all done by gparted: moving of data (in two passes) new geometry of the partition and correcting the partition table (and qtparted does it as well). Nifty things, those *parted(s) .
 
  


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
Resizing Partitions bamfsnyder Linux - Newbie 6 03-04-2008 10:27 AM
Resizing Partitions dokunut Linux - Newbie 2 06-18-2005 08:56 PM
Resizing partitions ?? sachinh Linux - General 1 04-04-2005 06:01 AM
resizing partitions jayakrishnan Linux - General 5 05-06-2002 01:32 AM
Resizing partitions..can it be done? dj_relentless Linux - General 5 01-27-2002 05:16 PM


All times are GMT -5. The time now is 05:51 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