Shrinking Support: Difference between revisions
No edit summary |
m mod_speling; https upgrades |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Currently XFS Filesystems can't be shrunk. | Currently XFS Filesystems can't be shrunk. | ||
To | To support shrinking XFS filesystems a few things needs to be implemented, based on a list by Dave Chinner [https://marc.info/?l=linux-xfs&m=118091640624488&]: | ||
* A way to check space is available for shrink | * A way to check space is available for shrink | ||
Line 10: | Line 10: | ||
* A variant of the xfs_fsr tool to support moving data out of the filesystem areas that go away. | * A variant of the xfs_fsr tool to support moving data out of the filesystem areas that go away. | ||
* Some way to move out orphan metadata out of the AGs truncated off | * Some way to move out orphan metadata out of the AGs truncated off | ||
Line 17: | Line 15: | ||
* A transaction to shrink the filesystem. | * A transaction to shrink the filesystem. | ||
At that point, we'll | At that point, we'll have a "working" shrink that will allow | ||
shrinking to only 50% of the original size because the log will | shrinking to only 50% of the original size because the log | ||
get in the way. To fix that, we'll need to implement transactions | (in the middle of the filesystem) will | ||
get in the way. To fix that, we'll need to implement transactions | |||
to move the log... | to move the log... | ||
Line 25: | Line 24: | ||
== Available pieces == | == Available pieces == | ||
* A script from Ruben Porras to check if enough free space is available to support shrinking [ | * A script from Ruben Porras to check if enough free space is available to support shrinking.[https://marc.info/?l=linux-xfs&m=118581682117599] | ||
* A patch from Ruben Porras to allow / disallow allocation from an allocation group [ | * A patch from Ruben Porras to allow / disallow allocation from an allocation group [https://marc.info/?l=linux-xfs&m=118302806818420] plus userspace support for setting / clearing it [https://marc.info/?l=linux-xfs&m=118881137031101] | ||
* The xfs_fsr tool in xfsprogs | * The xfs_fsr tool in xfsprogs | ||
* The xfs_reno | * The xfs_reno tool, see [[Unfinished_work#The_xfs_reno_tool]] | ||
* An untested patch from Dave Chinner for a xfs_swap_inodes ioctl that allows to not just defragment extents but moving the whole inode [ | * An untested patch from Dave Chinner for a xfs_swap_inodes ioctl that allows to not just defragment extents but moving the whole inode [https://marc.info/?l=linux-xfs&m=119552278931942] and a patch to xfs_reno to use it from Ruben Porras [https://marc.info/?l=linux-xfs&m=119582841808985] |
Latest revision as of 21:41, 10 March 2019
Currently XFS Filesystems can't be shrunk.
To support shrinking XFS filesystems a few things needs to be implemented, based on a list by Dave Chinner [1]:
- A way to check space is available for shrink
- An ioctl or similar interface to prevent new allocations from a given allocation group.
- A variant of the xfs_reno tool to support moving inodes out of filesystem areas that go away.
- A variant of the xfs_fsr tool to support moving data out of the filesystem areas that go away.
- Some way to move out orphan metadata out of the AGs truncated off
- A transaction to shrink the filesystem.
At that point, we'll have a "working" shrink that will allow shrinking to only 50% of the original size because the log (in the middle of the filesystem) will get in the way. To fix that, we'll need to implement transactions to move the log...
Available pieces[edit | edit source]
- A script from Ruben Porras to check if enough free space is available to support shrinking.[2]
- A patch from Ruben Porras to allow / disallow allocation from an allocation group [3] plus userspace support for setting / clearing it [4]
- The xfs_fsr tool in xfsprogs
- The xfs_reno tool, see Unfinished_work#The_xfs_reno_tool