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-2026 CODEPRJ.COM