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


你可能感兴趣的:(Linux系统)