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

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

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

Postby hankivy » May 11th, '19, 22:52

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? :?:
hankivy
 
Posts: 128
Joined: May 19th, '14, 20:36

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

Postby JoesCat » May 12th, '19, 02:03

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
Last edited by isadora on May 12th, '19, 08:07, edited 1 time in total.
Reason: Placed command-output in between [CODE]-tags for better readability ;)
User avatar
JoesCat
 
Posts: 177
Joined: Sep 15th, '11, 04:27
Location: Richmond, BC, Canada

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

Postby ITA84 » May 13th, '19, 11:04

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.
ITA84
 
Posts: 199
Joined: Mar 5th, '13, 18:15

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

Postby hankivy » May 13th, '19, 20:12

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.
hankivy
 
Posts: 128
Joined: May 19th, '14, 20:36

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

Postby hankivy » May 15th, '19, 06:33

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.
hankivy
 
Posts: 128
Joined: May 19th, '14, 20:36


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron