Query
I wanted to extend an XFS formatted disk in Linux which is backed by an EBS volume. The mount point is called mydata
To extend the volume in AWS:
Goto Compute -> EC2 -> EBS -> Volumes -> {Select Volume} -> Modify Volume -> {change size}
On the Linux device
ec2-user]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 10G 0 disk └─xvda1 202:1 0 10G 0 part / xvdf 202:80 0 7G 0 disk
ec2-user]# df -h
Filesystem Size Used Avail Use% Mounted on devtmpfs 475M 0 475M 0% /dev tmpfs 492M 0 492M 0% /dev/shm tmpfs 492M 396K 492M 1% /run tmpfs 492M 0 492M 0% /sys/fs/cgroup /dev/xvda1 10G 2.1G 8.0G 21% / tmpfs 99M 0 99M 0% /run/user/1000 /dev/xvdf 7.0G 40M 7.0G 1% /mydata
ec2-user]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 10G 0 disk └─xvda1 202:1 0 10G 0 part / xvdf 202:80 0 9G 0 disk /mydata
ec2-user]# xfs_growfs -d /mydata
meta-data=/dev/xvdf isize=512 agcount=4, agsize=458752 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1 spinodes=0
data = bsize=4096 blocks=1835008, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 1835008 to 2359296
ec2-user]# df -h
Filesystem Size Used Avail Use% Mounted on devtmpfs 475M 0 475M 0% /dev tmpfs 492M 0 492M 0% /dev/shm tmpfs 492M 396K 492M 1% /run tmpfs 492M 0 492M 0% /sys/fs/cgroup /dev/xvda1 10G 2.1G 8.0G 21% / tmpfs 99M 0 99M 0% /run/user/1000 /dev/xvdf 9.0G 44M 9.0G 1% /jordansphere1