Centos下无法格式化硬盘/dev/sd* is apparently in use by the system; will not make a filesystem here!
来源:互联网 发布:编程麻将机 编辑:程序博客网 时间:2024/06/06 18:23
环境说明
Centos 6.8
问题说明
新装的Linux系统,两块硬盘,一块作为系统磁盘,另一块作为数据磁盘,安装完系统后,由于该数据磁盘中包含之前残余的LVM信息,无法对数据磁盘无法进行操作。
新系统启动后,通过fdisk -l查看磁盘信息如下
[root@ovirt-host ~]# fdisk -lDisk /dev/sda: 999.7 GB, 999653638144 bytes255 heads, 63 sectors/track, 121534 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000d16e8 Device Boot Start End Blocks Id System/dev/sda1 * 1 131 1048576 83 LinuxPartition 1 does not end on cylinder boundary./dev/sda2 131 4211 32768000 82 Linux swap / Solaris/dev/sda3 4211 121535 942406656 83 LinuxDisk /dev/sdb: 999.7 GB, 999653638144 bytes255 heads, 63 sectors/track, 121534 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000a65a6 Device Boot Start End Blocks Id System/dev/sdb1 1 121534 976221823+ 83 LinuxDisk /dev/mapper/3600508e00000000017cd3aa6870c460a: 999.7 GB, 999653638144 bytes255 heads, 63 sectors/track, 121534 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000a65a6 Device Boot Start End Blocks Id System/dev/mapper/3600508e00000000017cd3aa6870c460ap1 1 121534 976221823+ 83 Linux
对sdb1进行格式化,无法进行格式化,提示如下
[root@ovirt-host ~]# mkfs.ext4 /dev/sdb1mke2fs 1.41.12 (17-May-2010)/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
解决方法
通过dm解决问题,查看dm状态,显示dm设备信息
[root@ovirt-host ~]# dmsetup status3600508e00000000017cd3aa6870c460a: 0 1952448512 multipath 2 0 0 0 1 1 A 0 1 0 8:16 A 0
[root@ovirt-host ~]# dmsetup remove_all[root@ovirt-host ~]# dmsetup statusNo devices found
此次dm已经找不到设备,再次通过fdisk查看磁盘信息,已经没有dm设备信息了
[root@ovirt-host ~]# fdisk -l;Disk /dev/sda: 999.7 GB, 999653638144 bytes255 heads, 63 sectors/track, 121534 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000d16e8 Device Boot Start End Blocks Id System/dev/sda1 * 1 131 1048576 83 LinuxPartition 1 does not end on cylinder boundary./dev/sda2 131 4211 32768000 82 Linux swap / Solaris/dev/sda3 4211 121535 942406656 83 LinuxDisk /dev/sdb: 999.7 GB, 999653638144 bytes255 heads, 63 sectors/track, 121534 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000a65a6 Device Boot Start End Blocks Id System/dev/sdb1 1 121534 976221823+ 83 Linux
此时在对sdb1进行格式化操作
[root@ovirt-host ~]# mkfs.xfs /dev/sdb1meta-data=/dev/sdb1 isize=256 agcount=4, agsize=61013864 blks = sectsz=512 attr=2, projid32bit=0data = bsize=4096 blocks=244055455, imaxpct=25 = sunit=0 swidth=0 blksnaming =version 2 bsize=4096 ascii-ci=0log =internal log bsize=4096 blocks=119167, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0
0 0
- Centos下无法格式化硬盘/dev/sd* is apparently in use by the system; will not make a filesystem here!
- 分区无法格式化?/dev/sda2 is apparently in use by the system; will not make a filesystem here!
- /dev/hdb1 is apparently in use by the system; will not make a filesystem here!解决方法
- /dev/sdc is apparently in use by the system; will not make a filesystem here
- /dev/sdc1 is apparently in use by the system; will not make a filesystem here!
- /dev/hdb1 is apparently in use by the system; will not make a filesystem here!解决方法
- /dev/sdxx is apparently in use by the system; will not make a filesystem here! 解决方法
- /dev/sdb1 is apparently in use by the system; will not make a filesystem here
- /dev/sdc1 is apparently in use by the system; will not make a filesystem here!
- /dev/XXX is apparently in use by the system; will not make a filesystem here!
- fedora 18格式化磁盘报“/dev/sdb is apparently in use by the system; will not make a filesystem here!”解决办法
- 挂载磁盘的问题(/dev/sdb1 is apparently in use by the system; will not make a 文件系统 here!)
- mkfs -t ext3 错误/dev/sdxx is apparently in use by the system; 解决方法
- widnows:The signal HUP is in use by the JVM and will not work correctly on this platform
- centos下xxx is not in the sudoers file.this incident will be reported
- centos 修改xxx is not in the sudoers file. This incident will be reported
- centos:is not in the sudoers file.This incident will be reported
- CentOS xueliang is not in the sudoers file. This incident will be reported
- SQLL基础知识记录
- 南阳理工OJ 题目42 一笔画问题
- 如何用easyUI做Oracle的分页
- HDU 2066 一个人的旅行(Dijkstra算法)
- ns3--Making Plots using the Gnuplot Class
- Centos下无法格式化硬盘/dev/sd* is apparently in use by the system; will not make a filesystem here!
- PowerShell由进程名获取PID
- nginx配置location总结及rewrite规则写法(转发)
- Redis字符串类型的操作(二)
- decodeURIComponent()
- shell 杀死指定进程名称的进程方法
- 2017年搜狐内推 面试题——谈谈面试中的算法
- ubuntu下配置git和github初体验
- 分层实现JSP通过JDBC操作数据库