Walt Mankowski via plug on 1 May 2021 04:23:18 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
[PLUG] Mounting /usr/share vs symlinking |
Hi, Last weekend, while updating Ubuntu to 21.04, I noticed that my /usr partition was nearly full. It looked like the culprit was /usr/share, so I moved it to a partition called /storage that had a lot of free space, and symlinked /usr/share to /storage/usr_share. That mostly worked. I noticed a few odd things, but there are always a few odd things after an Ubuntu update and I didn't think much about it. Then yesterday I discovered that both man(1) and file(1) were broken. man reported a bizarre error: $ man man man: command exited with status 1: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=218n -rLT=218n -Tutf8) Whenever I ran file (e.g. to check if /usr/bin/man was actually a shell script) it printed /etc/magic, 4: Warning: using regular magic file `/usr/share/misc/magic' and reported that everything I tried it on was either data or ASCII text. I tried reinstalling man and file but that didn't help. After doing some searching, I found a site that suggested I replace the symlink with a mount. So I added this line to /etc/fstab: /storage/usr_share /usr/share none bind 0 0 replaced the symlink with a directory, and mounted /usr/share. It worked! But *why* did it work? Why do man and file (and presumably other commands I hadn't discovered yet) care if their data files are mounted or symlinked? Walt
Attachment:
signature.asc
Description: PGP signature
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug