Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
resize partition in gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
andytheg
n00b
n00b


Joined: 23 Nov 2011
Posts: 71
Location: BASEL

PostPosted: Tue May 08, 2012 12:43 pm    Post subject: resize partition in gentoo Reply with quote

Hi all,

I would like to resize my partition under /
and add more space.

Code:
Filesystem             Size   Used  Avail Use% Mounted on
rootfs                  16G    15G   598M  97% /
/dev/sda5               16G    15G   598M  97% /
rc-svcdir              1.1M    91k   959k   9% /lib/rc/init.d
udev                    11M   185k    11M   2% /dev
none                   1.6G      0   1.6G   0% /dev/shm
/dev/sda1              132M    44M    89M  33% /boot


finally it should be this:

Code:
Filesystem             Size   Used  Avail Use% Mounted on
rootfs                  30G    15G   15G  97% /
/dev/sda5               30G    15G   15G  97% /
rc-svcdir              1.1M    91k   959k   9% /lib/rc/init.d
udev                    11M   185k    11M   2% /dev
none                   1.6G      0   1.6G   0% /dev/shm
/dev/sda1              132M    44M    89M  33% /boot



Thanks..
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8710
Location: ~Brussels - Belgique

PostPosted: Tue May 08, 2012 12:44 pm    Post subject: Reply with quote

which filesystem?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
andytheg
n00b
n00b


Joined: 23 Nov 2011
Posts: 71
Location: BASEL

PostPosted: Tue May 08, 2012 12:55 pm    Post subject: Reply with quote

/dev/sda5

I was trying to unmount it, but got:
Code:

umount2: Device or resource busy
umount: /: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
umount2: Device or resource busy
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8710
Location: ~Brussels - Belgique

PostPosted: Tue May 08, 2012 1:01 pm    Post subject: Reply with quote

No, my question is not "which partition", but "which filesystem" : ext, btrfs, xfs, reiser... ?

Some filesystems accept to be resized, some other not.

The best way is to boot a live CD (e.g. SystemRescueCD) and resize the partitions (e.g. with gparted).
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
andytheg
n00b
n00b


Joined: 23 Nov 2011
Posts: 71
Location: BASEL

PostPosted: Tue May 08, 2012 1:08 pm    Post subject: Reply with quote

ext3
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8710
Location: ~Brussels - Belgique

PostPosted: Tue May 08, 2012 1:10 pm    Post subject: Reply with quote

ext3 can be resized, you are happy ;)

IMHO I prefer the solution of "backup/restore", which is sometimes much faster than move a partition.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
andytheg
n00b
n00b


Joined: 23 Nov 2011
Posts: 71
Location: BASEL

PostPosted: Tue May 08, 2012 1:16 pm    Post subject: Reply with quote

uffff :lol:

my system runs on a virtual disk i could resize, but my home directory still has 16 gb left.
I was reading about resize the partition but i dont know the steps i have to do exactly... :roll:
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8710
Location: ~Brussels - Belgique

PostPosted: Tue May 08, 2012 1:21 pm    Post subject: Reply with quote

boot a linux LiveCD, for example SystemRescueCD and resize the partition to adjust to the disk.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
andytheg
n00b
n00b


Joined: 23 Nov 2011
Posts: 71
Location: BASEL

PostPosted: Tue May 08, 2012 2:36 pm    Post subject: Reply with quote

well I can't use a cd rom the gentoo is running on a xen server (virtual system) Is there a tool out I can use for change the partition?
emerge?

Thanks...
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8710
Location: ~Brussels - Belgique

PostPosted: Tue May 08, 2012 5:52 pm    Post subject: Reply with quote

Hello,

It is really not recommended to resize the root partition when it runs. You need to start an other system to resize it.

Use the ISO image of the CD-ROM
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Tue May 08, 2012 6:06 pm    Post subject: Reply with quote

andytheg,

Resizing a filesystem is a two step process, maybe three step process.

First, you need some free space physically located at the end of the partition to be grown
Now you can resize the partition to include that free space. You cannot do this while the filesystem is mouted and you may need a reboot to get the kernel to see the new size anyway.
Once the additional space is in the partition, the filesystem can be grown into it. Ths step can be done on the live in use filesystem

If you want to make a habit of this sort of thing, you should use Logical Volume Manager, which is designed to expand and shrink logical volumes while they are in use - provided always the filesystems support grow/shrink. You cannot add LVM now - its an install time oprion.

To create space on root, you could move /usr/portage to /home/portage. Thats simpler and less risky than a partition resize.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
djdunn
l33t
l33t


Joined: 26 Dec 2004
Posts: 810

PostPosted: Thu May 10, 2012 2:21 am    Post subject: Reply with quote

you can always add LVM or luks or whatever, you just need an intermediary device to store your hard drive information on while you reset it up
_________________
“Music is a moral law. It gives a soul to the Universe, wings to the mind, flight to the imagination, a charm to sadness, gaiety and life to everything. It is the essence of order, and leads to all that is good and just and beautiful.”

― Plato
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum