fdisk分完区保存之后,系统提示:
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)
意思是内核还用的旧的分区表信息,新的分区表会在重启或者执行partprobe或者kpartx之后使用,
握了棵草,分个区还要重启?果断使用命令加载吧。

先查看一下现在的分区情况:

  1. fdisk -l


  2. Disk /dev/xvda: 107.4 GB, 107374182400 bytes

  3. 255 heads, 63 sectors/track, 13054 cylinders

  4. Units = cylinders of 16065 * 512 = 8225280 bytes

  5. Sector size (logical/physical): 512 bytes / 512 bytes

  6. I/O size (minimum/optimal): 512 bytes / 512 bytes

  7. Disk identifier: 0x000c516f


  8.     Device Boot Start End Blocks Id System

  9. /dev/xvda1 * 1 64 512000 83 Linux

  10. Partition 1 does not end on cylinder boundary.

  11. /dev/xvda2 64 2611 20458496 8e Linux LVM

  12. /dev/xvda3 2612 10445 62926605 8e Linux LVM

再看看内存的分区表:

  1. cat /proc/partitions

  2. major minor #blocks name



  3.  202 0 104857600 xvda

  4.  202 1 512000 xvda1

  5.  202 2 20458496 xvda2

  6.  253 0 18358272 dm-0

  7.  253 1 2097152 dm-1

说明没把新增的xvda3这个分区加载进去。

然后我运行了partprobe命令,提示:
Warning: WARNING: the kernel failed to re-read the partition table on /dev/xvda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.

最后问了一下人,用
partx -a /dev/xvda 这个命令,执行之后,看看内核分区表:

  1. cat /proc/partitions

  2. major minor #blocks name


  3.  202 0 104857600 xvda

  4.  202 1 512000 xvda1

  5.  202 2 20458496 xvda2

  6.  202 3 62926605 xvda3

  7.  253 0 18358272 dm-0

  8.  253 1 2097152 dm-1


已经成功加载进去了