格式化硬盤出現/dev/sdb5 is apparently in use by the system錯誤

錯誤以下:node

[root@hpf-linux~]# mke2fs -t ext3 -b 2048 -m 3 /dev/sdb5
mke2fs 1.41.12 (17-May-2010)
/dev/sdb5 is apparently in use by the system; will not make a 文件系統 here!


提示/dev/sdb5  正在被使用。 /dev/sdb5 正在被DM管理,因此咱們建立文件系統時提示報錯,咱們手工的移除,就能夠正常的建立文件系統,操做以下:
linux

[root@hpf-linux~]# cat /proc/partitions 
major minor  #blocks  name
   8        0   20971520 sda
   8        1     204800 sda1
   8        2    5120000 sda2
   8        3    2048000 sda3
   8        4          1 sda4
   8        5   13596672 sda5
   8       16   20971520 sdb
   8       17    5253223 sdb1
   8       18    2104515 sdb2
   8       19    3156772 sdb3
   8       20          1 sdb4
   8       21    2104483 sdb5
   8       32   18874368 sdc
 253        0    5253223 dm-0
 253        1    2104515 dm-1
 253        2    3156772 dm-2
 253        3          1 dm-3
 253        4    2104483 dm-4

從上面能夠看到dm工具確實在用。
bash

[root@hpf-linux~]# dmsetup status
sdb3: 0 6313545 linear 
sdb2: 0 4209030 linear 
sdb1: 0 10506447 linear 
sdb5: 0 4208967 linear 
sdb4: 0 2 linear 
[root@hpf-linux~]# dmsetup remove_all
[root@hpf-linux~]# dmsetup status
No devices found
[root@hpf-linux~]# mke2fs -t ext3 -b 2048 -m 3 /dev/sdb5
mke2fs 1.41.12 (17-May-2010)
文件系統標籤=
操做系統:Linux
塊大小=2048 (log=1)
分塊大小=2048 (log=1)
Stride=0 blocks, Stripe width=0 blocks
131560 inodes, 1052240 blocks
31567 blocks (3.00%) reserved for the super user
第一個數據塊=0
Maximum filesystem blocks=538968064
65 block groups
16384 blocks per group, 16384 fragments per group
2024 inodes per group
Superblock backups stored on blocks: 
16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816
正在寫入inode表: 完成                            
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
相關文章
相關標籤/搜索