amazon web services - EBS Backed Root Partition Too Small - How Do I use full EBS capacity? -
i started new instance using debian-jessie-amd64-hvm-2015-04-25-23-22-ebs (ami-0d5b6c3d) , 80gb ebs root volume. here's problem seeing:
admin@ip-xxxxxx:~$ df -h filesystem size used avail use% mounted on /dev/xvda1 7.8g 1.3g 6.1g 17% / udev 10m 0 10m 0% /dev tmpfs 200m 4.3m 196m 3% /run tmpfs 500m 0 500m 0% /dev/shm tmpfs 5.0m 0 5.0m 0% /run/lock tmpfs 500m 0 500m 0% /sys/fs/cgroup admin@ip-xxxxxxx:~$ lsblk name maj:min rm size ro type mountpoint xvda 202:0 0 80g 0 disk └─xvda1 202:1 0 8g 0 part /
why this? it's silly default me 8gb , not give me easy way resize partition. watch this:
admin@ip-xxxxx:~$ sudo resize2fs /dev/xvda1 resize2fs 1.42.12 (29-aug-2014) filesystem 2096128 (4k) blocks long. nothing do!
i've seen guides online don't seem work me. tried taking snapshot , started secondary instance different(new) primary ebs. attached vole created snapshot, kept booting snapshot volume, not new 1 created instance.
first, want know possible - , more importantly, how?
my reservations are, if make me jump through many hoops setup, there better way manage data growth on site? better have small root ebs, , add volume mysql data dir , site uploads? not sure go here.
when create ebs volume ebs snapshot bigger original ebs snapshot (like you're doing), file-system held on volume still report original size.
it's standard behaviour , must use resize2fs
in order expand file-system occupy entire new size volume.
http://docs.aws.amazon.com/awsec2/latest/userguide/ebs-expand-volume.html
this because aws knows ebs volumes data blocks; not know file-systems stored. example, aws not know file-system ext3, ext4, xfs, or ntfs. not know want partition take entire volume or if want add new partition. these decide , manage yourself.
as follow-up question, it's best put data on secondary volume , mount within file-system. way, can add space mounting more volumes and/or unmounting existing volumes.
Comments
Post a Comment