cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.23k stars 1.11k forks source link

Inconsistent filesystem mount - The filesystem has no permanent mount point - despite that partion is mounted #15148

Open dwrobel opened 3 years ago

dwrobel commented 3 years ago

Cockpit version: 235-1

# rpm -qa | grep -e '^cockpit' | sort
cockpit-235-1.fc33.x86_64
cockpit-bridge-235-1.fc33.x86_64
cockpit-networkmanager-235-1.fc33.noarch
cockpit-packagekit-235-1.fc33.noarch
cockpit-selinux-235-1.fc33.noarch
cockpit-storaged-235-1.fc33.noarch
cockpit-system-235-1.fc33.noarch
cockpit-ws-235-1.fc33.x86_64

OS: FedoraServer 33 x86_64

Please help us out by explaining how to reproduce it.

I have machine where the second disk is mounted using systemd .automount service (as it's detachable and might or might not be connected to the system). System and disk is working fine - meaning once attached it gets properly mounted by the systemd .automount service.

# systemctl status mnt-backup\*
● mnt-backup.automount - Automatically mount /mnt/backup directory
     Loaded: loaded (/etc/systemd/system/mnt-backup.automount; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2021-01-14 19:36:54 CET; 20min ago
   Triggers: ● mnt-backup.mount
      Where: /mnt/backup
       Docs: man:systemd.automount(5)
             man:systemd.mount(5)

Jan 14 19:36:54 localhost.localdomain systemd[1]: Set up automount Automatically mount /mnt/backup directory.

● mnt-backup.mount - Mount /mnt/backup directory
     Loaded: loaded (/etc/systemd/system/mnt-backup.mount; enabled; vendor preset: disabled)
     Active: active (mounted) since Thu 2021-01-14 19:36:59 CET; 20min ago
TriggeredBy: ● mnt-backup.automount
      Where: /mnt/backup
       What: /dev/sdb1
       Docs: man:systemd.automount(5)
             man:systemd.mount(5)
      Tasks: 0 (limit: 9130)
     Memory: 15.1M
        CPU: 241ms
     CGroup: /system.slice/mnt-backup.mount

Jan 14 19:36:54 localhost.localdomain systemd[1]: Mounting Mount /mnt/backup directory...
Jan 14 19:36:59 localhost.localdomain systemd[1]: Mounted Mount /mnt/backup directory.
[root@localhost ~]# mount | grep backup
systemd-1 on /mnt/backup type autofs (rw,relatime,fd=56,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=23777)
/dev/sdb1 on /mnt/backup type btrfs (rw,noatime,nodiratime,compress=zstd:1,space_cache,subvolid=256,subvol=/root)

However, cockpit complains about it saying:

Mount point
    The filesystem has no permanent mount point.
Used
    -
Warning alert:Inconsistent filesystem mount
The filesystem is currently mounted on /mnt/backup but will not be mounted after the next boot.

Screenshot: Screenshot_2021-01-14 Storage - root localhost localdomain

Cockpit is also not able to show properly the mountpoint - so it make impression that it's not mounted: Screenshot_2021-01-14 Storage - root localhost localdomain(1)

martinpitt commented 3 years ago

Thanks for the report! Confirmed that the storage page currently only looks at /etc/fstab, it does not recognize systemd automount units. Please disregard the warning.

@mvollmer, FYI

mvollmer commented 3 years ago

Confirmed that the storage page currently only looks at /etc/fstab, it does not recognize systemd automount units.

Yes, and neither does Cockpit recognize *.mount units...

lfom commented 2 years ago

@martinpitt @mvollmer Sorry, I do not want to open another issue, so I will add my comment here about the same problem... It seems that Cockpit also has some problem parsing fstab since using a quoted UUID also generates the same problem:

LABEL=cloudimg-rootfs                           /               ext4    defaults                0 1
LABEL=UEFI                                      /boot/efi       vfat    umask=0077              0 1
UUID="20d88a65-1c52-4068-93cb-5f3e362d8b96"     /opt            auto    defaults,noatime        0 2

I used "Mount automatically on boot" only to check what was changed, and Cockpit simply added the same entry again in fstab without quotes, what causes error messages from systemd-fstab-generator later...

trianglesis commented 5 months ago

Same here, adding my case, for example:

/dev/sdb1    /home/user/disk_repo/    xfs    defaults     0   0
/dev/sdc1    /home/user/disk_upload/  xfs    defaults     0   0

And NFS exports, too:

/home/user/disk_repo       *(rw,sync,no_root_squash,no_all_squash,no_subtree_check,insecure)
/home/user/disk_upload     *(rw,sync,no_root_squash,no_all_squash,no_subtree_check,insecure)

And actual mounts:

image