Mounting

Notes for mounting filesystems on Linux/RHEL systems.

Use this page when checking mounted filesystems, mounting a disk, troubleshooting /etc/fstab, or investigating why a mount is missing after reboot.


Safety rule

Before mounting or unmounting anything, check:

1. Am I on the correct server?
2. Is this production or test?
3. What filesystem or mount point is affected?
4. Is the mount used by an application, database, or cluster?
5. Is this a local disk, SAN disk, NFS mount, or cluster-managed mount?
6. Is Veritas or another cluster tool managing this mount?
7. Do I have approval to unmount or remount?

Do not manually mount or unmount filesystems that are controlled by Veritas or another cluster manager unless you know the correct procedure.


Basic mount checks

Show mounted filesystems

mount

Cleaner view:

findmnt

Show one mount point

findmnt /mount/point

Example:

findmnt /data

Show disk usage

df -h

Show filesystem type too:

df -Th

Show block devices

lsblk

With filesystem information:

lsblk -f

Show filesystem UUIDs

blkid

Check /etc/fstab

/etc/fstab controls filesystems that should mount automatically.

View fstab

cat /etc/fstab

Example fstab line

UUID=xxxx-xxxx  /data  xfs  defaults  0  0

Fields:

device/UUID   mountpoint   filesystem   options   dump   fsck

Example with generic values:

UUID=1111-2222  /data  xfs  defaults  0  0

Mount from fstab

If the filesystem is already configured in /etc/fstab:

sudo mount /mount/point

Example:

sudo mount /data

Mount all fstab entries

sudo mount -a

Use carefully. This tests /etc/fstab without rebooting.

If /etc/fstab has a bad entry, it may show an error.


Manually mount a device

Basic syntax:

sudo mount /dev/DEVICE /mount/point

Example:

sudo mount /dev/sdb1 /data

Create a mount point

sudo mkdir -p /mount/point

Example:

sudo mkdir -p /data

Unmount a filesystem

sudo umount /mount/point

Example:

sudo umount /data

If unmount says "target is busy"

Check what is using the mount:

sudo lsof +f -- /mount/point

Alternative:

sudo fuser -vm /mount/point

Example:

sudo fuser -vm /data

Do not kill processes unless you understand the impact.


Remount a filesystem

Example: remount read-only:

sudo mount -o remount,ro /mount/point

Example: remount read-write:

sudo mount -o remount,rw /mount/point

Use carefully, especially on production systems.


NFS mounts

Show NFS mounts

mount | grep nfs

or:

findmnt -t nfs,nfs4

Mount an NFS share manually

sudo mount -t nfs NFS_SERVER:/export/path /mount/point

Example:

sudo mount -t nfs server01:/exports/data /mnt/data

Example NFS fstab line

server01:/exports/data  /mnt/data  nfs  defaults  0  0

Check if mount is controlled by cluster

Before manually changing mounts, check if this server is clustered.

Possible Veritas checks:

hastatus -sum
hagrp -state
hares -state

If the mount belongs to a Veritas service group, do not manually mount/unmount unless you know the approved process.


Common mount problems

Mount point does not exist

Error may look like:

mount: mount point /data does not exist

Fix:

sudo mkdir -p /data

Then retry:

sudo mount /data

Filesystem type wrong

Check filesystem type:

lsblk -f
blkid
df -Th

Then verify /etc/fstab.


UUID wrong in fstab

Check real UUID:

blkid

Compare with:

cat /etc/fstab

Filesystem did not mount after reboot

Check:

findmnt /mount/point
df -h
systemctl --failed
journalctl -b -p err
cat /etc/fstab

Then test:

sudo mount -a

First command set for mount issues

hostnamectl
df -h
df -Th
findmnt
lsblk
lsblk -f
blkid
cat /etc/fstab
systemctl --failed
journalctl -b -p err

Dangerous actions

Be careful with:

umount on production filesystems
mount -o remount,rw
editing /etc/fstab
mount -a on production
mkfs
wipefs
fdisk
parted
changing cluster-managed mounts

These can break applications, databases, or boot.


Personal notes

Add sanitized notes here.

Examples:

- Mount was missing after reboot because fstab UUID was wrong.
- Mount point did not exist.
- NFS server was unreachable.
- Filesystem was controlled by Veritas, so manual mount was not safe.