#取消挂载
[root@localhost /]# umount /opt
umount: /opt: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
#强制取消挂载
[root@localhost /]# umount /opt -f
umount2: 设备或资源忙
umount: /opt: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount2: 设备或资源忙
#查看哪些进程占用该文件夹
[root@localhost /]# fuser -m /opt
/opt: 189688c189820c190111c190117c
#杀掉
[root@localhost /]# kill -9 189688 189820 190111 190117
[root@localhost /]# fuser -m /opt
[root@localhost /]# umount /opt
#mke2fs: inode数量小于 2^32 = 4294967296
[root@localhost /]# mke2fs -O 64bit,has_journal,extents,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize -i 4194304 /dev/sdb -N 4294967295
mke2fs 1.43.3 (04-Sep-2016)
/dev/sdb 有一个 ext4 文件系统
创建含有 7324216320 个块(每块 4k)和 4291545600 个inode的文件系统
文件系统UUID:db805a53-64a2-46d4-9f92-38e97c99e092
超级块的备份存储于下列块:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
2560000000, 3855122432, 5804752896
正在分配组表: 完成
正在写入inode表: 完成
创建日志(262144 个块)完成
写入超级块和文件系统账户统计信息: 已完成
[root@localhost /]# mkdir /opt/disk
[root@localhost /]# chown -R nwom:nwom /opt/disk
[root@localhost /]# vi /etc/fstab
#
# /etc/fstab
# Created by anaconda on Thu Sep 1 21:10:23 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
UUID=472161e5-934c-4fe0-8a0c-8108c6504287 /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_home /home ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sdb /opt ext4 defaults 1 2
[root@localhost /]# mount /dev/sdb /opt/disk
[root@localhost /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 50G 4.6G 43G 10% /
tmpfs 48G 228K 48G 1% /dev/shm
/dev/sda1 485M 40M 420M 9% /boot
/dev/mapper/VolGroup-lv_home 221G 13G 198G 6% /home
/dev/sdb 27T 1.1G 25T 1% /opt
[root@localhost /]# df -ia
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root 3276800 115048 3161752 4% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
devpts 0 0 0 - /dev/pts
tmpfs 12376269 6 12376263 1% /dev/shm
/dev/sda1 128016 39 127977 1% /boot
/dev/mapper/VolGroup-lv_home 14680064 40378 14639686 1% /home
none 0 0 0 - /proc/sys/fs/binfmt_misc
gvfs-fuse-daemon 0 0 0 - /root/.gvfs
/dev/sdb 4291545600 11 4291545589 1% /opt