1

The simplest way to ensure that a filesystem listed in fstab is really mounted is to include the attribute _netdev in the relevant line. Unfortunately it doesn't always work! If the mount operation depends on something else being already mounted, the _netdev attribute is insufficient. This situation is discussed a length in how to setup ubuntu that fstab runs after network is connected?.

But that solution looks fairly complex to me. So is there a simple way to check if a filesystem is surely mounted that works under all circumstances -- in other words, provides a foolproof way of achieving what _netdev tries to achieve?

Paul A.
  • 2,141
  • Does the mount need to exist before a login? If not, then having a script run at login that checks if a device/location is mounted and taking an appropriate action may be one way to ensure everything is in place – matigo May 28 '21 at 23:09
  • Read man mountpoint. – waltinator May 28 '21 at 23:44

1 Answers1

0

Try

lsblk 

You should see the NAME of the device in the first column and the MOUNTPOINT in the last column.

As a bonus, you get some other columns such as SIZE and TYPE in a human readable format.

mondotofu
  • 777