View previous topic :: View next topic |
Author |
Message |
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3334 Location: Rasi, Finland
|
Posted: Sun Oct 24, 2021 12:39 pm Post subject: xfsprogs 5.12 - shrinking support - anyone made any tests? |
|
|
xfs finally got shrinking support. Yay! Eric Sandeen wrote: | *snip*
The condensed changelog since 5.11.0 is:
xfsprogs-5.12.0-rc1 (07 May 2021)
- mkfs: don't default to too-large physical sector size (Jeff Moyer)
- repair: phase 6 speedups (Dave Chinner, Gao Xiang)
- man: Add dax mount option to man xfs(5) (Carlos Maiolino)
- xfs_admin: pick up log arguments correctly (Darrick Wong)
- xfs_growfs: support shrinking unused space (Gao Xiang)
- libfrog: report inobtcount in geometry (Darrick Wong)
- xfs_logprint: Fix buffer overflow printing quotaoff (Carlos Maiolino)
- xfsprogs: include <signal.h> for platform_crash (Leah Neukirchen)
- xfsprogs: remove BMV_IF_NO_DMAPI_READ flag (Anthony Iliopoulos)
- workqueue: bound maximum queue depth (Dave Chinner)
xfsprogs-5.12.0-rc0 (12 Apr 2021)
- libxfs changes merged from kernel 5.12
*snip* | Anyone here tested it? On lvm? _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Oct 24, 2021 4:16 pm Post subject: |
|
|
You mean like
Code: |
lvresize --resizefs -L <new-reduced-size> /dev/vg/lv
|
That is so cool..
I will create an xfs lv just for testing and be back...
UNFORUNATELY it doesnt seem to work with sys-fs/xfsprogs-5.13.0 and 5.14.1-gentoo
Code: |
lvresize --resizefs -L 1G /dev/test/test
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
- scan filesystem freespace and inode maps...
- found root inode chunk
Phase 3 - for each AG...
- scan (but don't clear) agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
- agno = 1
- agno = 2
- agno = 3
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...
- setting up duplicate extent list...
- check for inodes claiming duplicate blocks...
- agno = 1
- agno = 2
- agno = 3
- agno = 0
No modify flag set, skipping phase 5
Phase 6 - check inode connectivity...
- traversing filesystem ...
- traversal finished ...
- moving disconnected inodes to lost+found ...
Phase 7 - verify link counts...
No modify flag set, skipping filesystem flush and exiting.
fsadm: Xfs filesystem shrinking is unsupported.
/sbin/fsadm failed: 1
Filesystem resize failed.
|
when not mounted.
and
Code: |
fsadm: Xfs filesystem shrinking is unsupported.
/sbin/fsadm failed: 1
Filesystem resize failed.
|
when mounted. _________________
|
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3334 Location: Rasi, Finland
|
Posted: Sun Oct 24, 2021 5:06 pm Post subject: |
|
|
I believe lvm just doesn't support it yet. Doing it "by hand", using xfs_growfs first to reduce the fs size then making sure it's aligned correctly and then finally using lvm to shrink the lv but leave the fs alone.
This operation, however is too prone to user errors, that I wouldn't try it on "real" data. :P
I guess we'll have to wait a little more for things to mature. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
tholin Apprentice
Joined: 04 Oct 2008 Posts: 203
|
|
Back to top |
|
|
|