IT/Programming
AWS 리눅스 파일 시스템 용량 확장
Hotman
2015. 11. 26. 18:29
디스크 사이즈보다 작게 파티션이 할당된 경우 남은 용량을 이용하여 resizing이 가능
로 파일 시스템 정보 확인
$df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 7.8G 1.5G 92G 2% /
tmpfs 3.7G 0 3.7G 0% /dev/shm
$fdisk -l
Disk /dev/xvda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 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
$sudo resize2fs /dev/xvda
Disk /dev/xvda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 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
재접속 해서 확인
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 99G 1.5G 92G 2% /
tmpfs 3.7G 0 3.7G 0% /dev/shm