In my centos7 when I add and partition a new disk to the machine and try to make files system on top of it , I get this annoying error message
/dev/sdb is apparently in use by the system; will not make a filesystem here
The point is that the disk is an ISCSI one and it is pretty independent. I have another SATA device as well. I don't know what is keeping this newly partitioned disk busy, and rebooting the server seems pointless and I also tried partprobe
, but no luck!
Here is my fdisk -l
output
Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes`
Disk label type: dos`
Disk identifier: 0x00004776`
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
Disk /dev/mapper/cl-root: 18.2 GB, 18249416704 bytes, 35643392 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/cl-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 1265 MB, 1265734656 bytes, 2472138 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0000a7c3
Device Boot Start End Blocks Id System
/dev/sdb1 2048 2342911 1170432 83 Linux