其他分享
首页 > 其他分享> > Device or resource busy

Device or resource busy

作者:互联网

格式化磁盘显示忙碌,如何解决呢?

[root@jp33e503-11-8 ~]# mkfs.xfs /dev/sdc
mkfs.xfs: cannot open /dev/sdc: Device or resource busy

# 怀疑有程序占用磁盘

[root@jp33e503-11-8 ~]# lsblk
NAME                                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                                   8:0    0   223G  0 disk
├─sda1                                8:1    0   500M  0 part  /boot
└─sda2                                8:2    0 222.5G  0 part
  ├─zstack-root                     253:0    0 220.5G  0 lvm   /
  └─zstack-swap                     253:1    0     2G  0 lvm   [SWAP]
sdb                                   8:16   0   1.8T  0 disk
└─364cd98f027eef000254d7d7804e26c4d 253:2    0   1.8T  0 mpath /vmssddata
sdc                                   8:32   0 837.8G  0 disk
└─364cd98f027eef000255fe83d0493dd21 253:3    0 837.8G  0 mpath
sr0                                  11:0    1  1024M  0 rom

# sdc ==> 364cd98f027eef000255fe83d0493dd21

[root@jp33e503-11-8 ~]# dmsetup ls
zstack-swap    (253:1)
zstack-root    (253:0)
364cd98f027eef000255fe83d0493dd21    (253:3)
364cd98f027eef000254d7d7804e26c4d    (253:2)

# 发现 364cd98f027eef000255fe83d0493dd21

#解除占用
[root@jp33e503-11-8 ~]# dmsetup remove 364cd98f027eef000255fe83d0493dd21

# 重新初始化
[root@jp33e503-11-8 ~]# mkfs.xfs /dev/sdc
meta-data=/dev/sdc               isize=512    agcount=4, agsize=54902784 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=0, sparse=0
data     =                       bsize=4096   blocks=219611136, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=107232, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

 

标签:11,busy,resource,jp33e503,364cd98f027eef000255fe83d0493dd21,sdc,Device,253,root
来源: https://www.cnblogs.com/cptao/p/12849834.html