Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a 70 GB filesystem mounted from a loopback file that needed more space. I increased the size of the file from 75161928000 to 75200000000 (starting conservative) via

sudo truncate -s 75170000000 preproduction-7.1.1.xfs

But attempting to grow the xfs filesystem with just "xfs_growfs /mnt/doc.neu/" had no effect, with the "-d" flag it returned "data size unchanged, skipping", and using the -D flag just adding one block to it, it says it's too large

$ sudo xfs_growfs -D 18350081 /mnt/doc.neu/
meta-data=/dev/loop0             isize=256    agcount=5, agsize=3932160 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=18350080, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal               bsize=4096   blocks=7680, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data size 18350081 too large, maximum is 18350080

Am I missing something?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you are using losetup you need to use

losetup -c /dev/loopX

to have the block device's size updated to the size of the file backing it. From the manpage:

-c, --set-capacity loopdev
force loop driver to reread size of the file associated with the specified loop device

share|improve this answer
    
That was it, thanks! –  Kevin G. May 15 '13 at 22:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.