Will xfs_growfs succeed on a full file system?
Does xfs_growfs depend on some space left on the file system in order to be able to grow it?
I have a colleague who ran into an issue where a file system resize failed. The file system is 100% full.
Aside from analyzing what happened in his case, should XFS be able to grow a file system that is 100% full?
The device has already been expanded, it is the XFS file system that fails to resize. I just wonder if that is by design, or whether it is an issue.
Signature · 1 line
Geir A. Myrestrand
Quoted 6 lines · Geir A. Myrestrand
Does
xfs_growfsdepend on some space left on the file system in order to be able to grow it?I have a colleague who ran into an issue where a file system resize failed. The file system is 100% full.
Quoted 7 lines
Aside from analyzing what happened in his case, should XFS be able to grow a file system that is 100% full?
The device has already been expanded, it is the XFS file system that fails to resize. I just wonder if that is by design, or whether it is an issue.
Off the top of my head, I think it should work ok even if full, although I could be (and apparently I am) wrong here. How exactly did the growfs fail?
I actually wasn't able to completely fill my filesystem, got stuck at 20k left. :) but growing that from 50M to 100M worked fine for me.
-Eric
Quoted 10 lines · Eric Sandeen
Quoted 8 lines · Geir A. Myrestrand
Does
xfs_growfsdepend on some space left on the file system in order to be able to grow it?I have a colleague who ran into an issue where a file system resize failed. The file system is 100% full.
Aside from analyzing what happened in his case, should XFS be able to grow a file system that is 100% full?
The device has already been expanded, it is the XFS file system that fails to resize. I just wonder if that is by design, or whether it is an issue.
Quoted 8 lines
Off the top of my head, I think it should work ok even if full, although I could be (and apparently I am) wrong here. How exactly did the growfs fail?
I actually wasn't able to completely fill my filesystem, got stuck at 20k left. :) but growing that from 50M to 100M worked fine for me.
-Eric
The only error I saw in his output was this line:
xfs_growfs:XFS_IOC_FSGROWFSDATA xfsctl failed: No space left on device
He claims that the file system is actually resized after it has been re-mounted. He verifies with df:
After expansion (with xfs_growfs):
# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/vbdi6 93504 93504 0 100% /nas/NASDisk-00006
# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/vbdi6 64 6 58 10% /nas/NASDisk-00006
After re-mount:
# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/vbdi6 200000 93516 106484 47% /nas/NASDisk-00006
# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/vbdi6 204800 6 204794 1% /nas/NASDisk-00006
Signature · 1 line
Geir A. Myrestrand
Quoted 2 lines · Geir A. Myrestrand
Does
xfs_growfsdepend on some space left on the file system in order to be able to grow it?
Yes, it does require some space to be left because growing the filesystem can require extending the original last AG to the full size and that means there may be btree work to be journalled and hence we have to reserve blocks for that to succeed in all cases.
Quoted 2 lines
I have a colleague who ran into an issue where a file system resize failed. The file system is 100% full.
Yup, we hit that in QA recently and have an open bug for it.
Quoted 2 lines
Aside from analyzing what happened in his case, should XFS be able to grow a file system that is 100% full?
Yes, it should.
Quoted 3 lines
The device has already been expanded, it is the XFS file system that fails to resize. I just wonder if that is by design, or whether it is an issue.
It's a bug, really, but one you can easily work around by freeing up about 50k of space. If you've got a really large filesystem, then you might need to free more space than that.
At some point in my copious amounts of free time I'll fix it properly...
Cheers,
Dave.
Signature · 3 lines
Dave Chinner Principal Engineer SGI Australian Software Group
Quoted 17 lines · David Chinner
Quoted 1 line · Geir A. Myrestrand
Does
xfs_growfsdepend on some space left on the file system in order to be able to grow it?Yes, it does require some space to be left because growing the filesystem can require extending the original last AG to the full size and that means there may be btree work to be journalled and hence we have to reserve blocks for that to succeed in all cases.
Quoted 1 line
I have a colleague who ran into an issue where a file system resize failed. The file system is 100% full.
Yup, we hit that in QA recently and have an open bug for it.
Quoted 1 line
Aside from analyzing what happened in his case, should XFS be able to grow a file system that is 100% full?
Yes, it should.
Quoted 7 lines
Quoted 1 line
The device has already been expanded, it is the XFS file system that fails to resize. I just wonder if that is by design, or whether it is an issue.
It's a bug, really, but one you can easily work around by freeing up about 50k of space. If you've got a really large filesystem, then you might need to free more space than that.
At some point in my copious amounts of free time I'll fix it properly...
Thanks a lot for your feedback David. We look forward to a fix, but just knowing that it is an issue and that we easily can work around it helps a lot. Thanks again!
Signature · 1 line
Geir A. Myrestrand