Partitioning mistake fix forgot to add /home

General support questions
Post Reply
The.Ex-pat
Posts: 22
Joined: 2019/06/21 00:07:29

Partitioning mistake fix forgot to add /home

Post by The.Ex-pat » 2020/07/08 15:32:33

Hey, All

I noobed this up something proper.

I ran out of space in the / partition. I have more than enough space over at /home partition.

made a .tar backup of /home
umount /dev/mapper/centos-home and use lvremove to free up the space
Skipped making a NEW, SMALLER /home partition! <~ ROOKIE MOVES, MAN.
lvextend the / to 100%

now I don't have a /home. :(

What I do now for my .ssh/authorized_keys ??

Thanks dudes.

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

Re: Partitioning mistake fix forgot to add /home

Post by TrevorH » 2020/07/08 17:35:22

If your / filesystem uses xfs - the default - the you are stuck as it cannot be shrunk. You'll have to restore the files from your backup directly into the /home directory on / and remove the entry from fstab.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
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

The.Ex-pat
Posts: 22
Joined: 2019/06/21 00:07:29

Re: Partitioning mistake fix forgot to add /home

Post by The.Ex-pat » 2020/07/08 21:00:00

TrevorH wrote:
2020/07/08 17:35:22
If your / filesystem uses xfs - the default - the you are stuck as it cannot be shrunk. You'll have to restore the files from your backup directly into the /home directory on / and remove the entry from fstab.
Yup, xfs. applied the fix.

Which format is the most flexable, for future referance?

edit: 2nd question

for a basic file server, knowing that you may need to adjust the partitions later. Which format and partitions would you set, Trevor? If you don't mind me asking.

edit: some problems now

My command prompt looks odd now,

Code: Select all

-bash-4.2$
Normally it's

Code: Select all

myuser.fqdn
What do I need to do?

Thraex
Posts: 43
Joined: 2019/05/14 19:50:28

Re: Partitioning mistake fix forgot to add /home

Post by Thraex » 2020/07/09 12:04:01

For filesystems, I usually stick with ext4 since they can grow/shrink as needed. As for your bash prompt, that was most likely set in your user's .bashrc file in /home/username/.bashrc and maybe wasn't backed up?

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

Re: Partitioning mistake fix forgot to add /home

Post by TrevorH » 2020/07/09 13:56:40

I believe xfs is a more modern and reliable and generally better filesystem than ext[34] but its one (?) drawback is that it cannot be shrunk.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
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

MartinR
Posts: 611
Joined: 2015/05/11 07:53:27
Location: UK

Re: Partitioning mistake fix forgot to add /home

Post by MartinR » 2020/07/09 14:14:43

XFS was designed for big memory multi-processor systems back in the '90s, so pretty well any desktop by now. For part of the time it was under development by SGI, they owned Cray and there were technology transfers between the two parts. See the Wikipedia entry for more details: https://en.wikipedia.org/wiki/XFS. Note in particular (under disadvantages): "It was felt that for servers, easily growing a filesystem was important but shrinking a filesystem was not."

Post Reply

Return to “CentOS 7 - General Support”