mount挂载目录失败

背景

        因为此次规划的裸设备与之前裸设备重名,/etc/fstab中加载的还是旧的逻辑卷信息,导致mount挂载目录不成功。

问题处理

操作系统版本

[root@guizhou_hp-pop-10-150-57-13 ~]# cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 

 

挂载/data目录,前台不报错,目录也未挂载

[root]# mount /dev/datavg/datavg-lv /data

[root]# df -h
Filesystem                     Size  Used Avail Use% Mounted on
/dev/sdm1                       50G   14G   37G  27% /
devtmpfs                        94G     0   94G   0% /dev
tmpfs                           94G     0   94G   0% /dev/shm
tmpfs                           94G   75M   94G   1% /run
tmpfs                           94G     0   94G   0% /sys/fs/cgroup
/dev/sdm2                      397G  220M  397G   1% /var
tmpfs                           19G     0   19G   0% /run/user/0

 

查看messages日志

[root]# tail -200 /var/log/messages
Dec 23 18:42:30 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:42:30 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' suspended, next retry is Thu Dec 23 18:43:00 2021 [v8.24.0-34.el7 try http://www.rsyslog.com/e/2007 ]
Dec 23 18:42:30 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Ending clean mount
Dec 23 18:42:30 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Ending clean mount
Dec 23 18:42:30 nm05-monitor-10e5e65e16 systemd: Unit data.mount is bound to inactive unit dev-datavg-lv\x2ddata.device. Stopping, too.
Dec 23 18:42:30 nm05-monitor-10e5e65e16 systemd: Unmounting /data...
Dec 23 18:42:30 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Unmounting Filesystem
Dec 23 18:42:30 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Unmounting Filesystem
Dec 23 18:42:30 nm05-monitor-10e5e65e16 systemd: Unmounted /data.

 

查看/etc/fstab,存在一条旧的挂载信息,将此自动挂载信息删除,然后重新加载systemctl

[root]# cat /etc/fstab 
/dev/datavg/datavg-lv                     /data                   xfs     defaults        0 0

 

重新加载systemctl

[root]# systemctl damon-reload 

 

 重新挂载/data目录,目录已成功挂载

[root@nm05-monitor-10e5e65e16 /]# mount /dev/datavg/datavg-lv /data

[root@nm05-monitor-10e5e65e16 /]# df -h
Filesystem                     Size  Used Avail Use% Mounted on
/dev/sdm1                       50G   14G   37G  27% /
devtmpfs                        94G     0   94G   0% /dev
tmpfs                           94G     0   94G   0% /dev/shm
tmpfs                           94G   75M   94G   1% /run
tmpfs                           94G     0   94G   0% /sys/fs/cgroup
/dev/sdm2                      397G  220M  397G   1% /var
tmpfs                           19G     0   19G   0% /run/user/0
/dev/mapper/datavg-datavg--lv  6.3T   33M  6.3T   1% /data

 

查看messages日志,无异常信息

[root]# tail -200 /var/log/messages
Dec 23 18:43:39 nm05-monitor-10e5e65e16 systemd: Reloading.
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' resumed (module 'builtin:omfwd') [v8.24.0-34.el7 try http://www.rsyslog.com/e/2359 ]
Dec 23 18:43:39 nm05-monitor-10e5e65e16 rsyslogd: action 'action 8' suspended, next retry is Thu Dec 23 18:44:09 2021 [v8.24.0-34.el7 try http://www.rsyslog.com/e/2007 ]
Dec 23 18:43:57 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:43:57 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:43:57 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Ending clean mount
Dec 23 18:43:57 nm05-monitor-10e5e65e16 kernel: XFS (dm-0): Ending clean mount

 

上一篇:密码学基础之术语【笔记】


下一篇:「解决」RuntimeError: Couldn‘t detect Bash version, shell completion is not supported