-
-
Save bruvv/d9edd4ad6d5548b724d44896abfd9f3f to your computer and use it in GitHub Desktop.
btrfs fi show -d | |
(/dev/mapper/vg1000-lv) | |
syno_poweroff_task -d | |
(or: umount /volume1) | |
(or2: umount /volume1 -f -k) | |
Check to see if all us unmounted: | |
df -h | |
mdadm --stop /dev/vg1000/lv | |
btrfsck /dev/vg1000/lv | |
btrfs check --repair /dev/vg1000/lv | |
btrfs rescue super-recover -v /dev/vg1000/lv | |
vgchange -ay | |
e2fsck -nvf -C 0 /dev/vg1000/lv | |
fsck.ext4 -pvf -C 0 /dev/vg1000/lv | |
(or: e2fsck -pvf -C 0 /dev/vg1000/lv -C O) | |
(do not do this: -C fd) |
If
btrfs check --repair
errors out with "couldn't open RDWR because of unsupported option features", you can try clearing the space cache withbtrfs check --clear-space-cache v2
orbtrfs check --clear-space-cache v1
, and retrying thebtrfs check --repair
.YMMV. If you break it, you own the pieces, and by the time you need
--repair
chances are that it broke beyond repair already :-)
👍 ah!!!!! thanks a lot !
This is an excellent gist. Thank you!
syno_poweroff_task -d
is replaced by this in DSM 7:
sudo synostgvolume --unmount -p volume1
But that shuts down ssh so… working on that.
Hi everyone!
I find this interesting guide for EXT4.
This part could be interesting for unmount
synosetkeyvalue /etc/synoinfo.conf disable_volumes volume1
Just as a quick guide for most synology running on 7.x version and with just one volume with brtfs , jsut run the below commands
unmount forcefully the read only partition
umount -f -k /volume1
clear the cache on brtfs so it can then repair
btrfs check --clear-space-cache v2 /dev/mapper/cachedev_0
#run the repair and wait for it to complete
btrfs check --repair /dev/mapper/cachedev_0
reboot the machine and it should be back in 2 minutes.
reboot
after it has rebooted, execute immediately a data scrub on the volume !
If
btrfs check --repair
errors out with "couldn't open RDWR because of unsupported option features", you can try clearing the space cache withbtrfs check --clear-space-cache v2
orbtrfs check --clear-space-cache v1
, and retrying thebtrfs check --repair
.YMMV. If you break it, you own the pieces, and by the time you need
--repair
chances are that it broke beyond repair already :-)
I've been battling this issue for literally weeks. Clearing the space caches and doing a repair fixed my issue with no data loss!
Thank you SO much!
Greetings from 2024 with a DS1819+ running DSM 7.2.1-69057 Update 3
.
Had some corrupted leaves and managed to get btrfs check /dev/mapper/cachedev_0
running by unmounting via synostgvolume --unmount -p /volume1
as mentioned in this xpenology thread and above. It did not shut down SSH for me.
Additionally, I couldn't run btrfs
on /dev/vg1000/lv
or /dev/md2
, only /dev/mapper/cachedev_0
worked properly for unknown reasons. Good luck to you all.
Hey i can not do the btrfs repair couse of that 👍 root@Mediaserver:~# btrfs check --clear-space-cache v2 /dev/vg2/volume_2
Syno caseless feature on.
Clear free space cache v2
parent transid verify failed on 1456623927296 wanted 43243 found 41147
parent transid verify failed on 1456623927296 wanted 43243 found 41147
parent transid verify failed on 1456623927296 wanted 43243 found 41147
parent transid verify failed on 1456623927296 wanted 43243 found 41147
Ignoring transid failure
parent transid verify failed on 2113744257024 wanted 41691 found 38109
parent transid verify failed on 2113744257024 wanted 41691 found 38109
parent transid verify failed on 3351185145856 wanted 42474 found 10785
parent transid verify failed on 3351185145856 wanted 42474 found 10785
leaf parent key incorrect 1456561242112
ERROR: failed to clear free space cache v2: -1
btrfs: transaction.h:41: btrfs_start_transaction: Assertion `!(root->commit_root)' failed.
Aborted (core dumped)
what should i do ? can you help me ?