报错:
linux扩展磁盘,格式化分区时候,如果报错:
警告:重新读取分区表失败,错误 16:设备或资源忙。
[root@ly host0]# fdisk /dev/sda -l
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
解决办法:
同步:
centos6
[root@ly ~]# partprobe /dev/sdb # centos6有bug不好使
[root@ly ~]# partx -a /dev/sdb # 增加分区
[root@ly ~]# partx -d --nr 5-7 /dev/sdb # -d删除分区,--nr 6 指定范围
centos5,7:
partprobe