CentOS7-1810和Ubuntu18.04支持的格式化命令
mkfs mkfs.cramfs mkfs.ext3 mkfs.fat mkfs .msdos mkfs.xfs
mkfs.btrfs mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat
一、 将磁盘格式化为 XFS 格式
[root@172 yaml]# mkfs -t xfs -f /dev/vdb
meta-data=/dev/vdb isize=512 agcount=4, agsize=13107200 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=52428800, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=25600, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
-t 为文件类型 -f 强制执行
二、将磁盘格式化为 EXT4 格式
[root@172 yaml]# mkfs.ext4 /dev/vdb #-f 强制执行 mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks
。。。。。。。
三、磁盘卸载问题
问题描述:有服务或者进程占用
[root@172 ~]# mkfs.ext4 /dev/centos/mnt_dis4 mke2fs 1.42.9 (28-Dec-2013) /dev/centos/mnt_dis4 is apparently in use by the system; will not make a filesystem here!
处理方法
[root@172 ~]# fuser –k -m /mnt/disk4 Specified filename –k does not exist. /mnt/disk4: 11058c 12713c [root@172 ~]# ps -ef | grep 11058 root 11058 11034 0 15:58 pts/3 00:00:00 -bash [root@172 ~]# ps -ef | grep 12713 mysql 12713 1 0 15:59 ? 00:00:04 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid [root@172 ~]# kill -9 12713 [root@172 ~]# kill -9 11058 [root@172 ~]# umount /mnt/disk4
浙公网安备 33010602011771号