pvcreate出错: Can't open /dev/sdb7 exclusively. Mounted filesystem?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pvcreate出错: Can't open /dev/sdb7 exclusively. Mounted filesystem?相关的知识,希望对你有一定的参考价值。
环境:VMware Workstation
Centos7.2 x64
出现故障:
在两块磁盘上划分两个分区做PV(Physical Volume):
修改两个分区ID为8e
pvcreate /dev/sdb7 /dev/sdc7
Can‘t open /dev/sdb7 exclusively. Mounted filesystem?
因为这两块磁盘之前用来做过软Raid5,所以先卸载Raid5,然后删除。
umount /dev/md5
mdadm -S /dev/md5 //停止md5
rm /dev/md5 //删除md5
再次
pvcreate /dev/sdb7 /dev/sdc7
Can‘t open /dev/sdb7 exclusively. Mounted filesystem?
检查/etc/fstab文件,发现在该文件中有/dev/md5的项目,删除该项目
pvcreate /dev/sdb7 /dev/sdc7
WARNING: linux_raid_member signature detected on /dev/sdb7 at offset 4096. Wipe it? [y/n]: y
Wiping linux_raid_member signature on /dev/sdb7.
Physical volume "/dev/sdb7" successfully created
创建成功!
还有很多问题不明白,在停止md5,rm /dev/md5以后,使用命令cat /proc/mdstat还可以看到Raid信息,期望大神看到可以解答一下,万分感谢!
本文出自 “玩Linux” 博客,请务必保留此出处http://xiaolizi007.blog.51cto.com/4006583/1881988
以上是关于pvcreate出错: Can't open /dev/sdb7 exclusively. Mounted filesystem?的主要内容,如果未能解决你的问题,请参考以下文章
出错:(unicode error) 'unicodeescape' codec can't decode bytes in position 8-9: malformed (
Python3中UnicodeEncodeError: 'gbk' codec can't encode character出错信息处理
rosbag遍历数据出错:(unicode error) 'utf-8' codec can't decode byte 0xcd in position 31: invali
mysql出错ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
logging error. UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1
Fatal error: Can't use function return value in write context