Score:0

Cannot resize XFS partition after volume increase

us flag

I have increased the size of my volume from 8GB to 16GB. After resizing the volume, I would like to expand the partition to take on the additional space.

However, this operation is failing with data size unchanged, skipping.

$ lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  16G  0 disk
└─xvda1 202:1    0  16G  0 part /
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        482M     0  482M   0% /dev
tmpfs           492M     0  492M   0% /dev/shm
tmpfs           492M  408K  492M   1% /run
tmpfs           492M     0  492M   0% /sys/fs/cgroup
/dev/xvda1       16G  7.6G  8.5G  48% /
tmpfs            99M     0   99M   0% /run/user/1000
$ sudo xfs_growfs -d /
meta-data=/dev/xvda1             isize=512    agcount=9, agsize=524159 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1 spinodes=0
data     =                       bsize=4096   blocks=4193787, 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 size unchanged, skipping

The partition in question is /dev/xvda1. As you can see, the operation is "skipping" and the Avail parameter remains 8GB. What could be the issue?

Score:4
cz flag

You can't resize the filesystem to 16 GB because it has already been resized to 16 GB.

Many Linux distributions' cloud images automatically resize partitions and filesystems each time the instance is booted.

Score:0
us flag

@bkr879 In the output of the commands #lsblk and #df -h, you can see already xvda1 SIZE (!!!) is 16G. You should check the "SIZE" (not the Used or Avail) column and not the "AVAIL" column. So somehow the partition was resized (either by reboot or by commands).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.