Page 1 of 1

[Help] file system stay in "read only" after rebuild my RAID

Posted: 21 Jul 2026, 06:41
by darkhades80
Hello,

I have an F5-221 NAS running version 5.1.67 with one 8TB RAID5 (BTRSF file format) with 4 disk 3TB.

after i change my disk out of service and rebuild my RAID, my file system/sharing stay in "read only" (except /homes)

How to re enable/activate "read write" file system/sharing ? plz :)

I look forward to reading you.

Have a nice day.

Best regards,
Darkhades80

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 21 Jul 2026, 09:14
by TMzethar
Please verify that your RAID 5 rebuild completed successfully after swapping the drive.

If the sync seems stuck or fails, there might be more than one bad drive involved.

If the rebuild finished fine, then the file system may have already been corrupted by the failing drive before you replaced it. You can try fixing it using the steps linked here:
viewtopic.php?t=2575

In addition, if you are using Btrfs, when the volume reaches its capacity limit, Btrfs will force the volume into read-only mode to protect existing data. At this point, you will not be able to delete or write data unless you increase the storage capacity.

We look forward to receiving more information from you or the results of your follow-up attempts.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 22 Jul 2026, 03:45
by darkhades80
Hello TMzethar,

thanks for your reply.

on read only for my volume :

mount | grep Volume1
/dev/mapper/vg0-lv0 on /Volume1 type btrfs (ro,relatime,nodatasum,nodatacow,nobarrier,space_cache=v2,autodefrag,subvolid=5,subvol=/)

and error one sda disk :

for d in sda sdb sdc sdd; do echo "== $d =="; smartctl -a /dev/$d | grep -E "Reallocated|Pending|UDMA_CRC|Result|PASSED|FAILED"; done
== sda ==
SMART overall-health self-assessment test result: PASSED
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 099 099 036 Pre-fail Always - 99
197 Current_Pending_Sector 0x0012 100 091 000 Old_age Always - 69
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
== sdb ==
SMART overall-health self-assessment test result: PASSED
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
== sdc ==
SMART overall-health self-assessment test result: PASSED
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
== sdd ==
SMART overall-health self-assessment test result: PASSED
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0


dmesg | grep -i -E "ata[0-9]|sd[a-z]:|exception Emask|I/O error"
[ 0.871892] ata1: SATA max UDMA/133 abar m2048@0x91417000 port 0x91417100 irq 124
[ 0.871987] ata2: SATA max UDMA/133 abar m2048@0x91417000 port 0x91417180 irq 124
[ 0.873453] ata3: SATA max UDMA/133 abar m512@0x91200000 port 0x91200100 irq 125
[ 0.873550] ata4: SATA max UDMA/133 abar m512@0x91200000 port 0x91200180 irq 125
[ 0.879632] ata5: SATA max UDMA/133 abar m512@0x91100000 port 0x91100100 irq 126
[ 0.879728] ata6: SATA max UDMA/133 abar m512@0x91100000 port 0x91100180 irq 126
[ 1.193513] ata5: SATA link down (SStatus 0 SControl 300)
[ 1.338477] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1.339547] ata3.00: ATA-9: WDC WD30EURX-63T0FY0, 80.00A80, max UDMA/133
[ 1.340370] ata3.00: ATA Identify Device Log not supported
[ 1.340488] ata3.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 32), AA
[ 1.342432] ata3.00: ATA Identify Device Log not supported
[ 1.342562] ata3.00: configured for UDMA/133
[ 1.346472] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1.347723] ata2.00: ATA-9: WDC WD30EURX-63T0FY0, 80.00A80, max UDMA/133
[ 1.348439] ata2.00: ATA Identify Device Log not supported
[ 1.348562] ata2.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 32), AA
[ 1.350236] ata2.00: ATA Identify Device Log not supported
[ 1.350357] ata2.00: configured for UDMA/133
[ 1.398463] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1.399711] ata1.00: supports DRM functions and may not be fully accessible
[ 1.399823] ata1.00: ATA-8: ST33000651NS, G009, max UDMA/133
[ 1.399923] ata1.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 32)
[ 1.400481] ata1.00: ATA Identify Device Log not supported
[ 1.400595] ata1.00: Security Log not supported
[ 1.401817] ata1.00: supports DRM functions and may not be fully accessible
[ 1.402380] ata1.00: ATA Identify Device Log not supported
[ 1.402491] ata1.00: Security Log not supported
[ 1.402595] ata1.00: configured for UDMA/133
[ 1.442330] sda: sda1 sda2 sda3 sda4
[ 1.507456] sdb: sdb1 sdb2 sdb3 sdb4
[ 1.513784] sdc: sdc1 sdc2 sdc3 sdc4
[ 1.874467] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 1.875363] ata4.00: ATA-9: WDC WD30EURX-63T0FY0, 80.00A80, max UDMA/133
[ 1.876029] ata4.00: ATA Identify Device Log not supported
[ 1.876141] ata4.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 32), AA
[ 1.877662] ata4.00: ATA Identify Device Log not supported
[ 1.877790] ata4.00: configured for UDMA/133
[ 1.973706] sdd: sdd1 sdd2 sdd3 sdd4
[ 2.194438] ata6: SATA link down (SStatus 0 SControl 300)
[ 2.547053] sde: sde1

Do you recommend I replace the disk?

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 22 Jul 2026, 09:39
by TMzethar
The drive associated with sda appears to exhibit a substantial number of physical bad sectors. You previously indicated that you had replaced the defective drive — if the drive in question was not this sda, it would imply the presence of two faulty drives.
If that's the case, we'd suggest backuping data first while the file system is still readable. After you've got your data safe, go ahead and replace the bad sda drive.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 23 Jul 2026, 06:32
by darkhades80
Hello,


ive replace sda HDD and i've same problem.

i send your report generate with claude :


Incident Report — TerraMaster F5-221 / TOS 5.1.67

Summary

After replacing a failed disk and rebuilding the RAID5 array, the data volume /Volume1 remains stuck in read-only mode (forced readonly) on every boot, despite fully healthy hardware, RAID, LVM, and BTRFS metadata. The lockup is perfectly reproducible: it occurs systematically ~48 to 50 seconds after mount, with no visible triggering event in the logs.

Configuration
Model: TerraMaster F5-221
Firmware: TOS 5.1.67
Storage stack: RAID5 (mdadm, md0, 4 disks) → LVM (vg0/lv0) → BTRFS (/Volume1)
BTRFS mount options: nodatasum,nodatacow,nobarrier,space_cache=v2,autodefrag

Incident timeline
Disk failure (initially identified as sda via SMART: Reallocated_Sector_Ct=99, Current_Pending_Sector=69).
Disk replaced, RAID5 successfully rebuilt.
Since then, /Volume1 mounts read-only; all shared folders except /homes are inaccessible for writing.
Replaced sda with a new disk (WD30EFRX) + reboot → the problem persists identically, ruling out the disk as the sole cause.

Checks performed (all clean/healthy)
Check Result
Unix permissions / ACLs Correct (RW via interface, RWX via SSH)
SMART on all 4 disks (post-replacement) All clean, no anomalies
cat /proc/mdstat md0 healthy and fully synced [UUUU], no ongoing rebuild
pvs / vgs / lvs / dmsetup No anomalies, LV active, no read-only flag on the LVM side
btrfs check --readonly --force "no error found" — metadata structurally sound (only a stale free-space cache to rebuild, harmless)
fuser -m / ps (process holding the mount) No identifiable process

Key kernel log (reproducible on every boot, near-identical timing)
[ 71-75s] BTRFS info (device dm-0): using free space tree / has skinny extents
... no events logged for ~48s ...
[ 121-123s] BTRFS error (device dm-0): bdev /dev/mapper/vg0-lv0 errs: wr 1, rd 0, flush 0, corrupt 0, gen 0
[ 121-123s] BTRFS: error (device dm-0) in btrfs_commit_transaction:2438: errno=-5 IO failure (Error while writing out transaction)
[ 121-123s] BTRFS info (device dm-0): forced readonly
[ 121-123s] BTRFS warning (device dm-0): Skipping commit of aborted transaction.
[ 121-123s] BTRFS: error (device dm-0) in cleanup_transaction:2011: errno=-5 IO failure

Every subsequent attempt to remount read-write (hot remount, fresh umount/mount, lazy umount + clear_cache/nospace_cache options) fails with:

BTRFS error (device dm-0): Remounting read-write after error is not allowed

Current status
/Volume1 is mounted read-only and the data is accessible and not at risk (backup completed).
No hardware, RAID, LVM, or metadata corruption cause could be identified despite thorough SSH-level investigation.
The behavior points to an issue in TOS 5.1.67's mount orchestration for this volume (RAID5 + LVM + BTRFS sequencing at boot), rather than an actual hardware fault or real corruption.


Question for support
Is there an official TOS procedure to clear this "forced readonly" flag without risking the data (beyond the attempts already made above)?
Does this reproducible timing (~48s post-mount) match a known bug in the storage boot sequence for this TOS version?



Looking forward to reading you.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 23 Jul 2026, 14:30
by TMzethar
The Btrfs error is likely caused by missing or corrupted data on the RAID from the two earlier failed drives — Btrfs went read‑only to protect your data.
Since the RAID has now been fully synchronized and you have a backup, you can try restarting the NAS — this will allow the system to attempt auto‑mounting the Volume1 Btrfs file system again.
If that doesn't help, you could try repairing the file system. If it goes well, you should be able to mount it normally instead of read‑only.
Another option is to rebuild the volume and restore your backup to the RAID.
I can't tell you exactly what Btrfs is doing during those 50 seconds.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 23 Jul 2026, 15:22
by darkhades80
Hello Zethar,

I’Ve restart the NAS and its stay in « read only » .
What is the command to repairing plz ? :)
Same for destroy my Volume1 and rebuid it ? :)

Thanks for your help.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 23 Jul 2026, 16:36
by TMzethar
Here's the guide for Btrfs file system repair (with commands on Terminal):
viewtopic.php?t=2575
Alternatively, in Storage Manager app, you can delete the Volume and create a new one.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 23 Jul 2026, 17:00
by darkhades80
Hello Zethar,

Repaid is out :
umount /Volume1
umount: /Volume1: target is busy.
umount -l /Volume1
btrfs check --repair --force /dev/mapper/vg0-lv0
enabling repair mode
Opening filesystem to check...
Checking filesystem on /dev/mapper/vg0-lv0
UUID: 0fd07bd9-fc65-4d1e-b1be-1419d03e03c3
[1/7] checking root items
Fixed 0 roots.
[2/7] checking extents
ERROR: failed to write super block for devid 1: flush error: Input/output error
failed to write new super block err -5
failed to repair damaged filesystem, aborting

i've only solution Delete volume and re create ?


thanks for your help.

Re: [Help] file system stay in "read only" after rebuild my RAID

Posted: 23 Jul 2026, 17:13
by TMzethar
Looks like the Volume didn't unmount properly. Based solely on the repair command output, it seems the repair isn't possible.
I'm afraid you may be left with only one final option —— Delete and recreate the Volume.