aws ec2硬盘扩容

问题:

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvde             9.9G  7.6G  1.8G  82% /

tmpfs                 1.7G     0  1.7G   0% /dev/shm

------------------------------------------------------------

# fdisk -l


Disk /dev/xvde: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

解决:

# resize2fs /dev/xvde
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/xvde is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 16
Performing an on-line resize of /dev/xvde to 65536000 (4k) blocks.


The filesystem on /dev/xvde is now 65536000 blocks long.

------------------------------------------------------------

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvde            258030980   7958132 236968784   4% /
tmpfs                  1769892         0   1769892   0% /dev/shm
[root@ip-172-31-8-243 /]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvde             247G  7.6G  226G   4% /

tmpfs                 1.7G     0  1.7G   0% /dev/shm

参照:

https://serverfault.com/questions/414983/ec2-drive-not-ebs-volume-size


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值