Page 1 of 1

Partitioning mistake fix forgot to add /home

Posted: 2020/07/08 15:32:33
by The.Ex-pat
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.

Re: Partitioning mistake fix forgot to add /home

Posted: 2020/07/08 17:35:22
by TrevorH
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.

Re: Partitioning mistake fix forgot to add /home

Posted: 2020/07/08 21:00:00
by The.Ex-pat
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?

Re: Partitioning mistake fix forgot to add /home

Posted: 2020/07/09 12:04:01
by Thraex
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?

Re: Partitioning mistake fix forgot to add /home

Posted: 2020/07/09 13:56:40
by TrevorH
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.

Re: Partitioning mistake fix forgot to add /home

Posted: 2020/07/09 14:14:43
by MartinR
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."