开发者社区> 问答> 正文

磁盘扩容失败

用fdisk -l 显示有214.7GB


Disk /dev/xvdb: 214.7 GB, 214748364800 bytes
240 heads, 16 sectors/track, 109226 cylinders, total 419430400 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 identifier: 0xb44b349c


    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1            2048   314572799   157285376   83  Linux


用fdisk 删除分区后显示只有161.1GB



Command (m for help): p


Disk /dev/xvdb1: 161.1 GB, 161060225024 bytes
1 heads, 32 sectors/track, 9830336 cylinders, total 314570752 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 identifier: 0xbb8a20bd


      Device Boot      Start         End      Blocks   Id  System



Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-314570751, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-314570751, default 314570751):
Using default value 314570751


Command (m for help): wq
The partition table has been altered!


Calling ioctl() to re-read partition table.


WARNING: Re-reading the partition table failed with error 22: Invalid argument.
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.


无论怎么重新创建新的分区,大小只有161.1GB
我已经按照这个操作过了,没有任何作用:
helpcdn.aliyun.com/knowledge_detail/41348.html
help.aliyun.com/document_detail/25452.html?spm=5176.doc35095.2.5.rnNj0b

展开
收起
fdisk失败 2017-04-02 16:07:52 3568 0
3 条回答
写回答
取消 提交回答
  • 看样子应该是可以了;
    2017-04-05 06:16:54
    赞同 展开评论 打赏
  • 论坛总版主
    那可以了吗?
    2017-04-02 16:24:45
    赞同 展开评论 打赏
  • Re磁盘扩容失败
    我自己弄错磁盘名称了,应该是fdisk /dev/xvdb, 而不是 fdisk /dev/xvdb1
    2017-04-02 16:19:41
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载