Score:1

RHEL 8.2 cannot change/remove /home directory

us flag

In my RHEL 8.2 box I want to remove the disk space from /home (/dev/VGSYSTEM/LVHOME).

I umount /home, mount /dev/VGSYSTEM/LVHOME in /mnt and try to move the only home directory in /mnt to /home... but Operation not permitted

# umount /home
# mkdir /home/example
mkdir: cannot create directory '/home/example': Operation not permitted
# ls -ld /home
drwxr-xr-x. 2 root root 6 Sep 18  2020 /home
# getenforce
Disabled
# lsattr -l /home  # output is empty
# chmod 000 /home
chmod: changing permissions of '/home': Operation not permitted
# mkdir /example   # No error

The root file system type is XFS.

Any ideas?

update: this issue happens with /opt, too

Matthew Ife avatar
jo flag
Is "/" immutable?
us flag
If "/" were immutable, `mkdir /example` would have failed, wouldn't it?
Matthew Ife avatar
jo flag
Yes, I missed that! Is /opt a separate mountpoint too? Can you provide the output of `cat /proc/self/mountinfo`
us flag
@Matthew Ife, thanks anyway for your help and interest
in flag
Please don't edit the solution into your question, post it as an answer instead and accept it when you are allowed to. Otherwise the question will stay in the system as unsolved forever.
us flag
@GeraldSchneider Thanks
Score:1
us flag

/home and /opt actually ARE immutable but I did not realize because I assumed lsattr -l /home and lsattr /home would show the attributes of /home -- big wrong assumption

lsattr -d /home /opt does show the actual attributes

# lsattr -d /home /opt
----i--------------- /home
----i--------------- /opt
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.