[root@test ~]# fdisk /dev/sda
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): n
Partition number (4-128, default 4):
First sector (34-1873045470, default 1017546752):
Last sector, +sectors or +size{K,M,G,T,P} (1017546752-1873045470, default 1873045470):
Created partition 4
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.
fdisk -l看不到磁盘分区,
执行命令刷新,使用fdisk工具只是将分区信息写到磁盘,如果需要mkfs磁盘分区则需要重启系统,
而使用partprobe则可以使kernel重新读取分区 信息,从而避免重启系统。
[root@test ~]# partprobe
版权声明:本文为博主原创文章,未经博主允许不得转载。
linux
- 上一篇:查理芒格子女:父亲芒格教给我们的7条人生法则
- 下一篇:datax巡检使用到的脚本