Resizing of centos

soulofangel

Member
Joined
Feb 9, 2013
Messages
234
Reaction score
0
I installed centos using default installation.

Now my /home is 100+gb.

Is it possible to resize it and add " /test " and allocate it 20gb?


Thanks in advance :)
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,301
I installed centos using default installation.

Now my /home is 100+gb.

Is it possible to resize it and add " /test " and allocate it 20gb?


Thanks in advance :)

The beauty of the unix filesystem is the whole filesystem tree is not necessarily just one storage device. You can add another storage node may it be a pseudo filesystem file, or a real hard disk or even a virtual storage device to a remote storage or system or device driver by mounting it to any part of the tree, even replace the whole root if it needs be.

All you need is partition and format a virtual or real disk of 20gb, and mount it to /tree by editing the /etc/fstab file.

For better control, you will need to use LVM. What you can create logical volumes over volume group, which in turn over physical volume. You can then create logical volume of the necessary maximum size, and use it as a device/volume for mounting, hence there is no need to use physical partition or disk for constraint. You manage the constraint using LVM.

There is something called quota, but it is enforced on users and groups instead of filesystem mount points.
 

librarian

Member
Joined
Jan 27, 2015
Messages
144
Reaction score
0
Anyone tried using GParted instead? This is a distribution from Fedora, it is supposed to have a GUI which makes it easier to re-partition the size.

I will prefer using Parted Magic, it used to be free, but you have to pay a fee to download it now.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,301
Anyone tried using GParted instead? This is a distribution from Fedora, it is supposed to have a GUI which makes it easier to re-partition the size.

I will prefer using Parted Magic, it used to be free, but you have to pay a fee to download it now.

Nearly all, if not all, unices can go without the GUI. So what would you like to know about GParted ?
 

librarian

Member
Joined
Jan 27, 2015
Messages
144
Reaction score
0
Nearly all, if not all, unices can go without the GUI. So what would you like to know about GParted ?

Quite sure the GParted works for the non-boot drive, but with GParted installed on the boot drive, will using GParted to resize the boot drive still work.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,301
Quite sure the GParted works for the non-boot drive, but with GParted installed on the boot drive, will using GParted to resize the boot drive still work.

GParted is just an application. It doesn't matter where it is installed. In fact, you can have it installed in an external drive, or over the network storage, and still works.

It should works fine on boot devices, but you will have to take care when changing partitions where boot partitions, MBR may reside. When you save the partition information into the hard disk, there is always risks. Nothing in unices stop the partition from being modified with the right user permissions running the program.

Changing the partition does not change the filesystem, so for filesystems that can support online resize, you will need to do more (boot or non-boot disks)
 

librarian

Member
Joined
Jan 27, 2015
Messages
144
Reaction score
0
GParted is just an application. It doesn't matter where it is installed. In fact, you can have it installed in an external drive, or over the network storage, and still works.

It should works fine on boot devices, but you will have to take care when changing partitions where boot partitions, MBR may reside. When you save the partition information into the hard disk, there is always risks. Nothing in unices stop the partition from being modified with the right user permissions running the program.

Changing the partition does not change the filesystem, so for filesystems that can support online resize, you will need to do more (boot or non-boot disks)

Not touching the MBR, just resizing the partition that contains the "/" folder as it is running out of space.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,301
Not touching the MBR, just resizing the partition that contains the "/" folder as it is running out of space.

"/" is just one of an ordinary partition. The more critical is the /boot partition which distro nowadays put it into a separate partitions.

Just use your gpart increase the size of your root partition and resize the filesystem.

There are also other ways of doing things without increasing the size of your root partition. Find out which path your filesystem that you are using a lot of space, create a new filesystem on another device, hard disk for example, then mount that device under the path

For example, if you find your current device is going to flood, then if I assume it is because your /home requires more space, move everything in /home to another filesystem in another device, then mount that new device under /home

ALSO

It is very usual nowadays distro creates filesystem using Logical Volume Manager(LVM). If so, adding devices to existing volumes are possible and easily achieve without the complexity in shifting mount points to other devices. Read up more on LVM.

Type "lvdisplay", and "mount", show me your disk layout for better advice.
 

szeli

Arch-Supremacy Member
Joined
Mar 24, 2003
Messages
21,376
Reaction score
3,119
if u have LVM, it's easy to resize like what david mentioned. if not, likely u will have a swap partition that might be "blocking" yr resizing. u can just delete that, create a swap file instead then resize yr partitions using gparted. it has a gui so easy to use.
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top