Does the device mount on the mount-point with symlink?
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
Issue
- Unable to mount device onto a symbolic link.
- The device is currently mounted on "/run" instead of the expected location "/var/run.
Resolution
- Mount the actual directory, not the symbolic link.
Root Cause
- The device will be mounted on an actual directory rather than a symbolic link.
Diagnostic Steps
- Let's reproduce the issue as below :
[rl7-server var]# ls -l /var/run
lrwxrwxrwx. 1 root root 6 Aug 17 19:17 /var/run -> ../run
[rl7-server var]# ls -ld /run
drwxr-xr-x 2 root root 6 Feb 14 07:36 /run
- Mount the device on /var/run
[rl7-server ~]# mount -t xfs /dev/mapper/test-lv1 /var/run
- After mounting check the df status, device is showing mounted on a /run instead of /var/run
[rl7-server ~ ]# df -h /run
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/test-lv1 1014M 33M 982M 4% /run
[rl7-server var]# mount | grep -i run
/dev/mapper/test-lv1 on /run type xfs (rw,relatime,attr2,inode64,noquota)
[rl7-server var]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vdb 253:16 0 5G 0 disk
└─vdb1 253:17 0 5G 0 part
└─test-lv1 252:0 0 1G 0 lvm /run
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments