mount挂载目录失败


背景

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

问题处理

操作系统版本

[root]# 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 192.168.1.100 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:42:30 192.168.1.100 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:42:30 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 kernel: XFS (dm-0): Ending clean mount
Dec 23 18:42:30 192.168.1.100 kernel: XFS (dm-0): Ending clean mount
Dec 23 18:42:30 192.168.1.100 systemd: Unit data.mount is bound to inactive unit dev-datavg-lv\x2ddata.device. Stopping, too.
Dec 23 18:42:30 192.168.1.100 systemd: Unmounting /data...
Dec 23 18:42:30 192.168.1.100 kernel: XFS (dm-0): Unmounting Filesystem
Dec 23 18:42:30 192.168.1.100 kernel: XFS (dm-0): Unmounting Filesystem
Dec 23 18:42:30 192.168.1.100 systemd: Unmounted /data.

 

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

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

 

重新加载systemctl

[root]# systemctl daemon-reload

 

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

[root]# 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 192.168.1.100 systemd: Reloading.
Dec 23 18:43:39 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 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 192.168.1.100 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:43:57 192.168.1.100 kernel: XFS (dm-0): Mounting V5 Filesystem
Dec 23 18:43:57 192.168.1.100 kernel: XFS (dm-0): Ending clean mount
Dec 23 18:43:57 192.168.1.100 kernel: XFS (dm-0): Ending clean mount

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM