The backups of the company's development, testing, and quasi-production databases are all nfs-mounted nas disks and local disks of backup hosts. Recently, after the nas permission is adjusted, the nfs mount point is dropped. Df-h does not see the mounted nas and causes hang operation.
1. 'df-H' hang
[Root @ develop119 ~] # Df-h
File System capacity used available % mount point
/Dev/sda5 34G 10G 22G 32%/
/Dev/sda7 76G 68G 4.1G 95%/oradata
/Dev/sda3 34G 29G 2.9G 91%/u01
/Dev/sda2 48G 24G 22G 52%/bakcup
/Dev/sda1 145 M 12 M 126 M 9%/boot
Tmpfs 3.9G 0 3.9G 0%/dev/shm
192.168.101.119:/nfs_backup
197G, 89G, 99G, 48%/bakcup/expdp_bk/dmp
After df-h, you cannot view the mount point when operating hang. After checking/etc/fatab, you find that automatic mounting is not set at startup.
Solution:
View mount points:
[Root @ develop119 ~] # Cat/proc/mounts
Rootfs/rootfs rw 0 0
/Dev/root/ext3 rw, data = ordered 0 0
/Dev tmpfs rw 0 0
/Proc rw 0 0
/Sys sysfs rw 0 0
/Proc/bus/usb usbfs rw 0 0
Devpts/dev/pts devpts rw 0 0
/Dev/sda7/oradata ext3 rw, data = ordered 0 0
/Dev/sda3/u01 ext3 rw, data = ordered 0 0
/Dev/sda2/bakcup ext3 rw, data = ordered 0 0
/Dev/sda1/boot ext3 rw, data = ordered 0 0
Tmpfs/dev/shm tmpfs rw 0 0
None/proc/sys/fs/binfmt_misc rw 0 0
Sunrpc/var/lib/nfs/rpc_pipefs rw 0 0
/Etc/auto. misc/misc autofs rw, fd = 7, pgrp = 2854, timeout = 300, minproto = 5, maxproto = 5, indirect 0 0
-Hosts/net autofs rw, fd = 13, pgrp = 2854, timeout = 300, minproto = 5, maxproto = 5, indirect 0 0
192.168.101.119:/nfs_backup/bakcup/expdp_bk/dmp nfs rw, vers = 3, rsize = 262144, wsize = 262144, hard, proto = tcp, timeo = 600, retrans = 2, sec = sys, addr = 192.168.101.119 0 0
172.16.7.241:/db_bak/mnt nfs rw, vers = 3, rsize = 32768, wsize = 32768, hard, proto = tcp, timeo = 600, retrans = 2, sec = sys, addr = 172.16.7.241 0 0
The directory where the nas disk is mounted Is/mnt.
Umount mount point
[Root @ develop119 ~] # Umount-lf/mnt
[Root @ develop119 ~] # Df-h
File System capacity used available % mount point
/Dev/sda5 34G 10G 22G 32%/
/Dev/sda7 76G 68G 4.1G 95%/oradata
/Dev/sda3 34G 29G 2.9G 91%/u01
/Dev/sda2 48G 24G 22G 52%/bakcup
/Dev/sda1 145 M 12 M 126 M 9%/boot
Tmpfs 3.9G 0 3.9G 0%/dev/shm
192.168.101.119:/nfs_backup
197G, 89G, 99G, 48%/bakcup/expdp_bk/dmp
[Root @ develop119 ~] #
Ii. umount 'device is busy'
[Root @ mysql10 ~] # Umount/mnt/
Umount:/mnt: device is busy
Umount:/mnt: device is busy
Solve device is busy:
[Root @ mysql10 ~] # Fuser-k/mnt/-- fuser command shows the PID of the process accessing a file.-k is the process that uses kill to access the file.
[Root @ mysql10 ~] # Umount/mnt/
[Root @ mysql10 ~] # Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/mapper/VolGroup00-LogVol00
229 GB 111G 107G 51%/
/Dev/sda1 99 M 13 M 82 M 14%/boot
Tmpfs 3.9G 0 3.9G 0%/dev/shm
Iii. Restart portmap and nfs on the nfs server and then re-mount
/Etc/init. d/portmap restart or service portmap restart
/Etc/init. d/nfs restart or service nfs restart
Install NFS server in Ubuntu 12.04
Install and configure the NFS server to share the Ubuntu 12.04 and ARM files.
Build an nfs server in Ubuntu
File Server NFS configuration details
Build an NFS Network File System server in Ubuntu
Heartbeat_ldirector + LB + NFS for HA, LB, and file sharing
How to Configure NFS server in CentOS 5.5
Install and use NFS in Ubuntu 12.10