Chinaunix首页 | 论坛 | 博客
  • 博客访问: 279881
  • 博文数量: 56
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 642
  • 用 户 组: 普通用户
  • 注册时间: 2013-12-16 15:11
文章分类

全部博文(56)

文章存档

2017年(6)

2015年(3)

2014年(41)

2013年(6)

我的朋友

分类: LINUX

2015-03-20 11:45:40

If you met the following issue, but you found device does NOT mount or use by anything.
mkfs.xfs -i size=512 /dev/sdb1 mkfs.xfs: cannot open /dev/sdb1: Device or resource busy
mkfs.ext4 /dev/sdb1
mke2fs 1.42.7 (21-Jan-2013)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!

check lsof, and you will find that multipathd is using it.
# lsof /dev/sdb
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
multipath 375 root   10r   BLK   8,16      0t0 7174 /dev/sdb

How to resolve it.
You can add sd* to blacklist, then restart multipathd
cat >> /etc/multipath.conf << EOF
blacklist {
        devnode "^sd[a-z]"
}
EOF

service multipathd restart
阅读(15440) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~