[PLUG] I hate the mount command

Cathy Smith Cathy.Smith at pnnl.gov
Tue Nov 15 21:35:45 UTC 2022


Hi

I'm coming in at the middle of this conversation.  I apologize if I am reiterating anything or if I'm missing the question

Here is some information about mdstat.  It's not a command.  It's a special file for software raid.
	https://www.unixtutorial.org/mdstat/

The mdadm command is used to manage software raid devices.

I don't see anything below that lists the entry in the /etc/fstab.  It should look something like this:	
	UUID=a3bcc2f3-3777-4714-8a52-bf3f6fbc6725 /raid ext4 defaults,rw,x-gvfs-show,nofail,x-systemd.device-timeout=30s 0 2
This is for a mount point named /raid on the device specified by the UUID.  The file system type is ext4.

Generally I mount file systems, not devices.  So I'd execute
	mount /raid
The fstab files specifies the device and the mount options.  Otherwise, that needs to be specified with the mount command.

Then I verify the successful mount with either cd'ing to the directory or running the df command:
	root at grumpy:/etc# df -h /raid
	Filesystem      Size  Used Avail Use% Mounted on
	/dev/nvme1n1p1  7.0T   89M  6.6T   1% /raid	

If the filesystem is busy, you won't be able to unmount it.  You can find out what or who is using the file system with the lsof command:
	https://www.ithands-on.com/2020/12/linux-101-lsof-umount-device-is-busy.html

The dmesg command will show you the hardware devices that your system sees.

The lsblk command will show you, among other things lists the available devices.



Regards,


Cathy
-- 
Cathy L. Smith
IT Engineer

Pacific Northwest National Laboratory
Operated by Battelle for the 
U.S. Department of Energy

Phone: 509.375.2687
Fax:       509.375.4399
Email: cathy.smith at pnnl.gov

-----Original Message-----
From: PLUG <plug-bounces at pdxlinux.org> On Behalf Of John Jason Jordan
Sent: Tuesday, November 15, 2022 12:34 PM
To: plug at pdxlinux.org
Subject: Re: [PLUG] I hate the mount command

Check twice before you click! This email originated from outside PNNL.


On Tue, 15 Nov 2022 01:46:13 -0800
Russell Senior <russell at personaltelco.net> dijo:

>It says it's already mounted. Can you post the results of a plain mount 
>command? That is, show what the system thinks is mounted.

Here's the plain mount command:

$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs
(rw,nosuid,relatime,size=16099964k,nr_inodes=4024991,mode=755,inode64)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=3227136k,mode=755,inode64)
/dev/nvme4n1p1 on / type ext4 (rw,relatime) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64) tmpfs on /run/lock type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=5120k,inode64) cgroup2 on /sys/fs/cgroup type cgroup2
(rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=27752)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M) debugfs on /sys/kernel/debug type debugfs
(rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime) tracefs on /sys/kernel/debug/tracing type tracefs
(rw,nosuid,nodev,noexec,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime) configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime) none on /run/credentials/systemd-sysusers.service type ramfs
(ro,nosuid,nodev,noexec,relatime,mode=700) nfsd on /proc/fs/nfsd type nfsd (rw,relatime) /var/lib/snapd/snaps/bare_5.snap on /snap/bare/5 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/core_13741.snap on /snap/core/13741 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/core_13886.snap on /snap/core/13886 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/core18_2566.snap on /snap/core18/2566 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_145.snap on
/snap/gnome-3-28-1804/145 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-28-1804_161.snap on
/snap/gnome-3-28-1804/161 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-38-2004_115.snap on
/snap/gnome-3-38-2004/115 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-38-2004_119.snap on
/snap/gnome-3-38-2004/119 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1534.snap on
/snap/gtk-common-themes/1534 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1535.snap on
/snap/gtk-common-themes/1535 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/hunspell-dictionaries-1-7-2004_2.snap on
/snap/hunspell-dictionaries-1-7-2004/2 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/meteo_108.snap on /snap/meteo/108 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/meteo_111.snap on /snap/meteo/111 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/tesseract_2504.snap on /snap/tesseract/2504 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/vobsub2srt_34.snap on /snap/vobsub2srt/34 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) /dev/nvme4n1p1 on /var/snap/firefox/common/host-hunspell type ext4 (ro,noexec,noatime)
/dev/nvme4n1p2 on /home type ext4 (rw,relatime) /dev/sda1 on /media/jjj/Data type ext4
(rw,nosuid,nodev,noexec,relatime,errors=remount-ro,user) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,nosuid,nodev,noexec,relatime) sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime) net_cls on /sys/fs/cgroup/net_cls type cgroup
(rw,relatime,net_cls) 192.168.1.164:/volume1/Synology on
/media/jjj/Synology2 type nfs
(rw,nosuid,nodev,noexec,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.164,mountvers=3,mountport=892,mountproto=tcp,local_lock=none,addr=192.168.1.164,user)
tmpfs on /run/user/1000 type tmpfs
(rw,nosuid,nodev,relatime,size=3227132k,nr_inodes=806783,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000) portal on /run/user/1000/doc type fuse.portal
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000) tmpfs on /run/snapd/ns type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=3227136k,mode=755,inode64) nsfs on /run/snapd/ns/chromium.mnt type nsfs (rw) /var/lib/snapd/snaps/cups_836.snap on /snap/cups/836 type squashfs
(ro,nodev,relatime,errors=continue,x-gdu.hide) nsfs on /run/snapd/ns/cups.mnt type nsfs (rw) /var/lib/snapd/snaps/chromium_2168.snap on /snap/chromium/2168 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/core20_1634.snap on /snap/core20/1634 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide) nsfs on /run/snapd/ns/firefox.mnt type nsfs (rw) /var/lib/snapd/snaps/core18_2620.snap on /snap/core18/2620 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/firefox_2067.snap on /snap/firefox/2067 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/core20_1695.snap on /snap/core20/1695 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/chromium_2188.snap on /snap/chromium/2188 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/firefox_2088.snap on /snap/firefox/2088 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)

Sorry, most lines can't fit in my mail client window. And I should add that /dev/nvme4n1p1 and /dev/nvme4n1p2 are / and /home, respectively.
They are on a drive inside the laptop and never a problem. Inside the laptop there is also a 1TB SSD that is mounted at /media/jjj/Data, used nightly to make an rsync mirror of / and /home, also never a problem.
And 192.168.1.164 is the address for a 32TB Synology enclosure that I use to make a mirror of the problem device with rsync. It is also never a problem.

You said that the problem enclosure is mounted, but I don't see it in the results of the mount command above. GUI file managers list it in the left side window, but if I click on it the main window displays nothing.

I should add that the problem device is an external enclosure containing two PCI cards, each with two 8TB nvme drives, with all four in a 32TB
RAID0 array with mdadm. This enclosure is connected to Thunderbolt 3 port on a Lenovo dock, which has 120V external power from the wall, and the enclosure is also connected to 120V from the wall and the dock, in turn, is connected to a TB3 port on the laptop.

Here is $ cat /proc/mdstat
Personalities : [raid0] [linear] [multipath] [raid1] [raid6] [raid5] [raid4] [raid10] md0 : active raid0 nvme2n1[2] nvme0n1[0] nvme3n1[3] nvme1n1[1] 30005334016 blocks super 1.2 512k chunks unused devices: <none>

I'm not sure what the results of /proc/mdstat mean. The devices are definitely the four nvme drives in the problem array, and it says they are active. Apparently there is no man page for mdstat, but from a web page I gather that the results indicate no problem with /dev/md0. Yet I can't mount it:

sudo mount UUID=09ed8807-e45a-4dac-8f4b-5ad9a07be90a
/media/jjj/Movies
mount: /media/jjj/Movies: /dev/md0p1 already mounted or mount point busy.

Same results if I change the UUID to /dev/md0. And I can't umount it either.

sudo umount /dev/md0
umount: /dev/md0: not mounted.
sudo umount /media/jjj/Movies
umount: /media/jjj/Movies: not mounted.

Since the device is connected with Thunderbolt 3 I tried just pulling the plug, waiting a few minutes, and plugging it back it. The enclosure knows if it has no TB3 connection, so it turns off its lights and fan, and then turns them back on when the TG3 connection is restored. That is what happened when I pulled the plug and then plugged it back in.

Still scratching my head.



More information about the PLUG mailing list