If there is some data in the file system does it has to be moved?
1 Answer
why don't you try? fallocate -l 2G img; mkfs.xfs img; sudo mount -o loop img /mnt; fallocate -l 4G img; sudo xfs_growfs /mnt should do that and give you an instant answer.
Anyways, no, growing modern filesystems, and especially XFS, is not a heavy operation. There's no data to be moved – there's just new free space; a couple of data structures need to be updated / created (if the new size implies more allocation groups). All in all, nearly no work.
- Well, your command line test does not involve having any data in the filesystem, so it does not test that case, but I suppose you know anyway.jarno– jarno2025-05-24 20:18:00 +00:00Commented May 24 at 20:18
- @jarno yep, but your can add as many files as you want after mounting it, to make the test more representative of what you have :) But I think you've known that, as well :)Marcus Müller– Marcus Müller2025-05-25 09:50:54 +00:00Commented May 25 at 9:50