How do some volumes mount?

Hi all. I hope that this, my first post in this forum, is posted in the correct place.

I am a newbie and no problem with saying as much. One of my VMs which are running in KVM/QEMU has three mounted volumes, vdb, vdc and vdd.

I don’t know what I did for vdc1 but it is not mounted through FSTAB, but the other two are.

My question is, just how the heck is vdc1 mounting to /mnt/path-to-volume/ and not via /etc/fstab?

Thanks much.

First, findmnt might reveal a bit more than mount.

There are at least four systems that could define (auto)mounts:

  • /etc/fstab
  • autofs
  • GUI desktop
  • kernel command line

Thanks jlehtone, I did not find any autofs mount but I did find it referenced in findmnt as well as in /etc/mtab/ .

I just don’t know how I set this one up differently than vdb1 and vdd1 where I mapped them in fstab.

Its fine that the file systems all mount properly, but it bugs me that I don’t know what I did nor how to configure all file systems to mount in the same manner for consistency.

Oh, now that I think of it, there might be one more place: the initramfs.
Some filesystems (e.g. the root) have to be mounted before we have access to content, like /etc/fstab …
While kernel command-line definitely handles the root, the rest have to be configured somewhere.

Do you see fstab in sudo lsinitrd?

You did not show where you mount to the mystery fs, so it is hard to guess whether it is “special”.

PS. I’ve seen a cloud image (i.e. a VM) where the /etc/fstab says that root has XFS, but the filesystem is actually ext4, so the /etc/fstab can be happily ignored in some cases.

LOL, the mystry fs. No secrets worth protecting in this case. From mtab:
/dev/vdc1 /mnt/The\040Simpsons xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0

From $sudo lsinitrd | grep fstab

-rw-r--r--   1 root     root            0 Apr  6 07:46 etc/fstab.empty
-rwxr-xr-x   1 root     root        45864 Apr  6 07:46 usr/lib/systemd/system-generators/systemd-fstab-generator

I think that I see what you mean about root fs being shown as xfs in fstab.

I was hoping to align all volumes to mount the same way. I have a lot to learn still, but assumed that for now, anyway, mounting my three data volumes through fstab would be okay and consistent.

If your fstab has no rule about that … can you unplug the /dev/vdc? How does the system boot then?

PS. When writing entries to fstab it is better to identify filesystem by their UUID, rather than names like “/dev/vda2”. You can see the UUID’s with: blkid

Thanks again, jlehtone. The problem if the genesis of this thread. When I add the mount point in fstab, using the unique id from blkid, the directory under /mnt/The\040Simpsons is empty. That is what bothers me, it mounts in a way that I don’t understand and that I don’t know how to make it mount the same way as the other two (vdb1 and vdd1).

Did you try to mount to some less scary mount point?
(The \040 in a name gives an eerie feeling.)

Say, add to fstab: UUID=... /mnt/test xfs defaults 0 0
and then manually (to test immediately):

mkdir /mnt/test
mount -v /mnt/test
ls -la /mnt/test
df -h /mnt/test

Not wishing to disagree with jlehtone but add to it: as well as UUID= there is also an option to use LABEL= for mounting. Personally, I find it easier to use the filesystem labels that a UUID, but I know some people disagree with me. :wink: In any case, do as suggested and avoid /dev/vdb1 and friends.

Since I am still unclear how vdc1 is mounting, I did create a new directory, /mnt/TheSimpsons, then in fstab I added that line via:

UUID=c5ec13f3-b7df-4bae-91ef-2d3642a9f953 /mnt/TheSimpsons xfs defaults 0 0

Upon mount -a as well as a reboot, the directory is empty. In fact, /mnt/The\040Simpsons is also now empty.

I actually want to get rid of this mount as I reorganize content. The volume is too small.

Those symptoms are hard to explain.

Can you show output of lsblk?

Here is that output

sr0                 11:0    1 1024M  0 rom  
vda                252:0    0  128G  0 disk 
├─vda1             252:1    0    1G  0 part /boot
└─vda2             252:2    0  127G  0 part 
  ├─almalinux-root 253:0    0   70G  0 lvm  /
  ├─almalinux-swap 253:1    0    4G  0 lvm  [SWAP]
  └─almalinux-home 253:2    0   53G  0 lvm  /home
vdb                252:16   0  512G  0 disk 
└─vdb1             252:17   0  512G  0 part /mnt/plexmovies1
vdc                252:32   0  128G  0 disk 
└─vdc1             252:33   0  128G  0 part /mnt/TheSimpsons
vdd                252:48   0  512G  0 disk 
└─vdd1             252:49   0  512G  0 part /mnt/plexmovies2
vde                252:64   0  256G  0 disk 
└─vde1             252:65   0  256G  0 part /mnt/plexseries1

/mnt/TheSimpsons remains empty while /mnt/The Simpsons is populated despite the fact that this is drive vdc1.

Inexplicably, the contents of ‘The Simpsons’ (with a space) file system is still present regardless.

[plex@almaplex1 mnt]$ ls '/mnt/The Simpsons'/
'Season 7'  'Season 8'

That is baffling. I’m out of ideas. :confused:

I am going to really show what a newbie that I am, because I just figured out what the heck I was doing wrong.

There was no file system mounted at ‘\mnt\The Simpsons’, rather it was just a folder that was consuming space in the / root partition. After mounting vdc1 with its UUID in fstab I decided to execure the following which showed me what I should have realized all along…

[plex@almaplex1 ~]$ df -h '/mnt/The Simpsons'/
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/almalinux-root   70G   56G   15G  79% /

It was self-evident that I had simply created a folder and never used it to mount a file system. I am very sorry for wasting so much of your time but I sure do appreciate it and the support you have shown. I learned some things in the process, for what that is worth.