"Structure needs cleaning"/"Orphan file not empty on read-only fs" when snapshotting an ext4 fs via LVM #1126
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#1126
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Snapshot and mount my in-use ext4-on-LVM data fs; via borgmatic and manually, via LVM.
Steps to reproduce
Actual behavior
r/o snapshot:
EXT4-fs (dm-7): write access unavailable, skipping orphan cleanup
EXT4-fs (dm-7): recovery complete
EXT4-fs error (device dm-7): ext4_mark_recovery_complete:6262: comm mount: Orphan file not empty on read-only fs.
EXT4-fs (dm-7): mount failed
r/w snapshot:
EXT4-fs (dm-7): orphan cleanup on readonly fs
EXT4-fs (dm-7): 130 orphan inodes deleted
EXT4-fs (dm-7): recovery complete
EXT4-fs (dm-7): mounted filesystem 32ce7327-b2f0-4375-ae1b-23292898722a ro with ordered data mode. Quota mode: none.
Expected behavior
Snapshot as r/w by default, or check if needed beforehand (eg. sudo debugfs -R features /dev/data/data 2>&1 | grep needs_recovery)
Other notes / implementation ideas
Edit /usr/lib/python3.13/site-packages/borgmatic/hooks/data_source/lvm.py, line 107:
--- 'r', # Read-only.
+++ 'rw', # Read-write.
as quick fix; does not survive a package upgrade ofc
borgmatic version
2.0.7
borgmatic installation method
Official Arch repos
Borg version
borg 1.4.1
Python version
Python 3.13.5
Database version (if applicable)
No response
Operating system and version
NAME="Arch Linux" (latest testing packages)
"Orphan file not empty on read-only fs" when snapshotting an ext4 fs via LVMto "Structure needs cleaning"/"Orphan file not empty on read-only fs" when snapshotting an ext4 fs via LVMThanks for filing this and providing all the detail! I went ahead and went with your
r->rwsolution for simplicity. This is changed in main and will be part of the next release.Released in borgmatic 2.0.8!