本文主要是介绍磁盘重新格式化报错 is apparently in use by the system; will not make a filesystem here!,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
现象:
部署服务的时候发现磁盘格式不对,需要重新格式化磁盘格式
根据报错,定位到正在被系统使用
[root@handsome_ta wps]# mkfs.ext4 /dev/sdb
mke2fs 1.42.9 (28-Dec-2013)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
/dev/sdb is apparently in use by the system; will not make a filesystem here!
解决:
设备繁忙使用,强制杀掉占用/dev/sdb的进程
[root@handsome_ta data]# fuser -km /dev/sdb
执行完重新格式化
效果:
[root@handsome_ta data]# fuser -km /dev/sdb
/dev/sdb: 863e 1096e 1124e 1743e 1773e 1819e 1828e 1859e 1882e 1910e 1919e 1949m 1991e 2000e 2002m 2015m 2040e 2078e 2121e 2128e 2171e 2177e 2187e 2203e 2232e 2285e 2316e 2326cm 2335e 2378e 2433e 2444e 2480cm 2501cm 2502e 2504e 2508e 2532e 2545m 2608e 2616cm 2617m 2618m 2644m 2646e 2651e 2653m 2661e 2669m 2677e 2714m 2734m 2766e 2777m 2781e 2802m 2813m 2866e 2904e 2992m 3032m 3090m 3093m 3100cm 3109m 3111m 3131m 3132m 3133m 3134m 3136m 3137m 3138m 3162m 3172m 3188m 3190cm 3193m 3209m 3214m 3235m 3247m 3254m 3255m 3301m 3302m 3304m 3357m 3358m 3644m 3677m 3731m 3732m 3733m 3734m 3735m 3736m 3737m 3762m 3763m 3764m 3765m 3839e 3846cm 3847cm 3935m 4020m 4061m 4080cm 4083m 4084cm 4101m 4128m 4132m 4140m 4268m 4275m 4468m 4534m 4538m 4548m 4551m 4555m 4592m 4630m 4633m 4634m 4637m 4638m 4639m 4645m 4649m 4655m 4657m 4663m 4664m 4665m 4666m 4667m 4672m 4673m 4719m 4720m 4721m 4722m 4729m 4730m 4731m 4732m 4733m 4734m 4735m 4739m 4740m 4741m 4742m 4743m 4744m 4745m 4746m 4748m 4750m 4752m 4823m 4825ce 4827cm 4828ce 4830cm 4831cm 4835cm 4836cm 4849m 4850m 4875m 4876m 4986e 5008m 5010m 5041m 5048m 5091m 5126m 5131m 5186m 5207m 5627m 5628m 5629m 5630m 5631m 5632m 5633m 5634m 5635m 5637m 5661cm 5662cm 5684ce 5747e 5767e 5792m 5806m 5834e 5863m 5889e 5923e 5935m 5971e 5975m 6018m 6512cm 6513cm 6514cm 6515cm 6616cm 6620cm 6899cm 7094cm 7319cm 14072cm 15320cm 15321cm 15322cm
Could not kill process 4827: No such process
Could not kill process 4830: No such process
Could not kill process 4849: No such process
Could not kill process 6513: No such process
Could not kill process 6514: No such process
Could not kill process 6515: No such process
[root@handsome_ta data]# mkfs.ext4 -F /dev/sdb
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
13107200 inodes, 52428800 blocks
2621440 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2199912448
1600 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
ok
这篇关于磁盘重新格式化报错 is apparently in use by the system; will not make a filesystem here!的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!