How to resize root partition removing default /home

Issues related to applications and software problems and general support
satimis
Posts: 151
Joined: 2006/11/14 14:24:08

Re: How to resize root partition removing default /home

Post by satimis » 2021/04/14 13:25:39

Hi jlehtone,

You're right, better performing the steps on TEXT mode as root.

Now I got it done as follows;
# lvremove /dev/cs/home

Code: Select all

Do you really want to remove active logical volume cs/home? [y/n]: y
Logical volume "home" successfully removed
# lvs

Code: Select all

  LV   VG Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root cs -wi-ao---- 70.00g                                                    
  swap cs -wi-ao----  7.80g  
  
# lvextend -L+39G /dev/cs/root

Code: Select all

  Size of logical volume cs/root changed from 70.00 GiB (17920 extents) to 109.00 GiB (27904 extents).
  Logical volume cs/root successfully resized.
# xfs_growfs /dev/mapper/cs-root

Code: Select all

meta-data=/dev/mapper/cs-root    isize=512    agcount=4, agsize=4587520 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=18350080, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=8960, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 18350080 to 28573696
# cp -a /temp/home /
# rm -rf /temp
# dracut --regenerate-all --force

# lvs

Code: Select all

  LV   VG Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root cs -wi-ao---- 109.00g                                                    
  swap cs -wi-ao----   7.80g
Size of SSD is 120G

Reboot PC. Now this time I can login as user. I can't explain.

On /etc/fstab

Code: Select all

# /dev/mapper/cs-home     /home                   xfs     defaults        0 0
This line is still commented out.

My next adventure will be installing cPanel

Regards

satimis
Posts: 151
Joined: 2006/11/14 14:24:08

Re: How to resize root partition removing default /home

Post by satimis » 2021/04/15 16:47:01

Hi all,

How to boot to Text mode at booting ???

I can't su to root

$ su

Code: Select all

bash /usr/bin/su Permission denied
Ctrl+Alt+F2 without response. CentOS 8 can't connect network, NetworkManager is NOT enabled. I need to run;

Code: Select all

# systemctl enable NetworkManager
Wired Connected option disappeared on right top corner.

It was caused while playing around on installing cPanel. Firefox suddenly collapsed. I have contacted cPanel Forum without result

Thanks

Regards

User avatar
TrevorH
Forum Moderator
Posts: 30640
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to resize root partition removing default /home

Post by TrevorH » 2021/04/15 17:44:08

It was caused while playing around on installing cPanel. Firefox suddenly collapsed. I have contacted cPanel Forum without result
We do not support cpanel systems for precisely those reasons. They change the group and permission on the su executable so that only people in that selected group can run it. They do other stuff like that and also add exclude= to yum.conf and replace CentOS packages with their own.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

satimis
Posts: 151
Joined: 2006/11/14 14:24:08

Re: How to resize root partition removing default /home

Post by satimis » 2021/04/17 22:36:56

Hi TrevorH

I'm prepared to make another test to install CentOS 8 server on another 120G SSD, connected on the same old PC. Please advise whether I can run the same USB boot stick to do the job? What will be the steps to install server?

Thanks

Regards

Post Reply

Return to “CentOS 8 - General Support”