Page 1 of 1

File systems /var and /usr refuse to unmount on shutdown

PostPosted: May 11th, '19, 22:52
by hankivy
My system, Mageia 6, has 7 file systems (partitions) on the hard drives. They are all mounted as software RAID1 partitions. The file systems are: /, /usr, /boot, /var, /bulk, /tmp, and /home. After I log off, and select "Shutdown" at the initial login screen, I can see the log messages during the shut down, and I observe that /var and /usr fail to unmount. Presumably some application still has one or more files open on these file systems.

Do you have advice on tracking down the cause of these unmount failures? :?:

Re: File systems /var and /usr refuse to unmount on shutdown

PostPosted: May 12th, '19, 02:03
by JoesCat
If you go to the command line, you will see 3 links that explain why you cannot unmount "/usr", just type:
Code: Select all
$ ls -l /
lrwxrwxrwx   1 root root         7 Feb 11  2016 bin -> usr/bin/
lrwxrwxrwx   1 root root         7 Feb 11  2016 lib -> usr/lib/
lrwxrwxrwx   1 root root         8 Feb 11  2016 sbin -> usr/sbin/


On older linux versions I think they tended to be actual separate directories, on Mageia 6, I see that they simply point into /usr
mount is expected to be seen in /bin, but since it is actually in /usr/bin, you cannot umount /usr
This is not ideal, but might help:
What you can do, is run a live distro, and remove the 3 symlinks in / and then create three real /bin, /lib, and /sbin, and then copy the contents of /usr/bin, /usr/lib and /usr/sbin directories into the real /bin, /lib and /sbin, and then in /usr, create three symlinks: /usrbin -> /bin, /usr/lib -> /lib and /usr/sbin -> /sbin

/var holds log files, so if you run into errors, like trying to unmount /var, you would probably want to log the error in file /var/log/some-log-file.log

there seems to be similar questions, this is recent:
https://unix.stackexchange.com/question ... g-shutdown

Re: File systems /var and /usr refuse to unmount on shutdown

PostPosted: May 13th, '19, 11:04
by ITA84
For the /var issue a journald fix was recently issued upstream (if you're interested, I suggest you read the whole thread):

https://github.com/systemd/systemd/issues/867

Not sure when it'll be released and whether it'll make Mageia 7 or not.

Re: File systems /var and /usr refuse to unmount on shutdown

PostPosted: May 13th, '19, 20:12
by hankivy
I want to thank both users, ITA84, and JoesCat for their very professional, courteous, timely, and on-point posts. Two thumbs up for both users. I will have to wait for an upstream fix for the /var file system issue with journald/systemd. I have implemented the /usr fix recommended in Re: File systems /var and /usr refuse to unmount on shutdown.

P.S. 64 bit systems also need a similar fix for the /usr/lib64 folder.

Re: File systems /var and /usr refuse to unmount on shutdown

PostPosted: May 15th, '19, 06:33
by hankivy
This is just an observation. Some else might have this problem. But I fixed it.

PokerTH said it could not find configuration files in /share/pokerth, and some minor things were not displayed.

I also had to add a link /share -> /usr/share I am not sure if I messed something up fixing /usr.