October 7, 20232 yr Hello there. I use BTRFS (encrypted) for my cache and array as filesystem. For some reason my disk1 (only 'usable' Array disk in my setup next to a parity drive of the same size, 20TB) is in read-only mode since Oct. 5 (Fix Common Problems Error: 'Unable to write to disk1', when I try to create a file or a folder on a share on disk1 the file manager in Unraid prompts: 'mkdir: cannot create directory ### Read-only file system'). My drive still has a lot of space available, more than 40% is empty. I tried to troubleshoot with some of the old reports and threads of a 'unable to write' message, but my case seems to be different - the cache data SSD seems to be perfectly usable and all of my docker containers (as long as they don't need to write stuff to disk1) are running totally fine. I scrubbed disk1 and there were no errors at all. Currently I'm running an advanced SMART test, which is not yet finished. I was not able to fix my problem with the older threads. I'm not sure whether that's possible or not, but I think that I somehow misconfigured something with the shares or with permissions - I had a very annoying Nextcloud problem with those permission problems, probably this was the starting point... Anyway, I can upload diagnostic files - but which of those .txt files in the .zip are helpful to find the cause of the problem? Currently I'm backing up the files to an unassigned device and this process is running fine so far. But overall I'd like to avoid re-formatting the whole device, especially because I'm not totally sure how to reconfigure everything to get back on track. BTW: I'm not sure whether this can be part of the problem but there was a power outage maybe 2 weeks ago. I had no UPS, so the server died instantly. There seemed to be no immediate issues after the power came back, but now I have some doubts about that... Edit: Interestingly, the Main Tab shows at least some writing operations on disk1 and the parity drive. Which is odd, because the file system is read-only currently?? Edited October 15, 20232 yr by Hmmmm
October 8, 20232 yr Author When I take a look in the syslog, can the following lines help? Quote Oct 6 11:43:20 emhttpd: Mounting disks... Oct 6 11:43:20 emhttpd: mounting /mnt/disk1 Oct 6 11:43:20 emhttpd: shcmd (814): mkdir -p /mnt/disk1 Oct 6 11:43:20 emhttpd: shcmd (815): mount -t btrfs -o noatime,space_cache=v2 /dev/mapper/md1p1 /mnt/disk1 Oct 6 11:43:20 kernel: BTRFS info (device dm-0): using crc32c (crc32c-intel) checksum algorithm Oct 6 11:43:20 kernel: BTRFS info (device dm-0): using free space tree Oct 6 11:43:24 emhttpd: /mnt/disk1: autotrim setxattr error: Read-only file system Oct 6 11:43:24 emhttpd: /mnt/disk1: compression setxattr error: Read-only file system Oct 6 11:43:24 emhttpd: shcmd (816): btrfs filesystem resize 1:max /mnt/disk1 Oct 6 11:43:24 root: Resize device id 1 (/dev/mapper/md1p1) from 18.19TiB to max Oct 6 11:43:24 kernel: BTRFS info (device dm-0): resizing devid 1 Oct 6 11:43:24 emhttpd: mounting /mnt/cache Oct 6 11:43:24 emhttpd: shcmd (817): mkdir -p /mnt/cache Oct 6 11:43:24 emhttpd: shcmd (818): mount -t btrfs -o noatime,space_cache=v2 /dev/mapper/nvme0n1p1 /mnt/cache Oct 6 11:43:24 kernel: BTRFS info (device dm-1): using crc32c (crc32c-intel) checksum algorithm Oct 6 11:43:24 kernel: BTRFS info (device dm-1): using free space tree Oct 6 11:43:24 kernel: BTRFS info (device dm-1): enabling ssd optimizations Oct 6 11:43:24 emhttpd: shcmd (819): mount -o remount,discard=async /mnt/cache Oct 6 11:43:24 kernel: BTRFS info (device dm-1: state M): turning on async discard Oct 6 11:43:25 emhttpd: shcmd (820): /usr/sbin/zfs mount -a Oct 6 11:43:25 emhttpd: shcmd (821): sync Oct 6 11:43:25 emhttpd: shcmd (822): mkdir /mnt/user0 Oct 6 11:43:25 emhttpd: shcmd (823): /usr/local/bin/shfs /mnt/user0 -disks 2 -o default_permissions,allow_other,noatime Oct 6 11:43:25 shfs: FUSE library version 3.12.0 Oct 6 11:43:25 emhttpd: shcmd (824): mkdir /mnt/user Oct 6 11:43:25 emhttpd: shcmd (825): /usr/local/bin/shfs /mnt/user -disks 3 -o default_permissions,allow_other,noatime -o remember=0 Oct 6 11:43:25 shfs: FUSE library version 3.12.0 Oct 6 11:43:25 emhttpd: shcmd (827): /usr/local/sbin/update_cron Oct 6 11:43:25 root: Delaying execution of fix common problems scan for 10 minutes Oct 6 11:43:25 unassigned.devices: Mounting 'Auto Mount' Devices... Oct 6 11:43:25 emhttpd: Starting services... Oct 6 11:43:25 emhttpd: shcmd (829): chmod 0777 '/mnt/user/ShareName' Oct 6 11:43:25 root: chmod: changing permissions of '/mnt/user/ShareName': Read-only file system Oct 6 11:43:25 emhttpd: shcmd (829): exit status: 1 Thanks! Edited October 8, 20232 yr by Hmmmm
October 8, 20232 yr Author Thanks in advance for taking the time to help me! Edited October 15, 20232 yr by Hmmmm
October 9, 20232 yr Community Expert I'm not seeing any filesystem issues with disk1, post the output of touch /mnt/disk1/a
October 9, 20232 yr Author 21 minutes ago, JorgeB said: I'm not seeing any filesystem issues with disk1, post the output of touch /mnt/disk1/a I get: Quote touch: cannot touch '/mnt/disk1/a': Read-only file system
October 9, 20232 yr Author On 10/9/2023 at 11:49 AM, JorgeB said: Post new diags. Thanks for your your time. New diags: Edited October 15, 20232 yr by Hmmmm
October 9, 20232 yr Community Expert Strange, I still don't see anything about the filesystem going/being read-only, start the array in maintenance mode and post the output of: btrfs check /dev/md1p1
October 9, 20232 yr Author 2 hours ago, JorgeB said: Strange, I still don't see anything about the filesystem going/being read-only, start the array in maintenance mode and post the output of: btrfs check /dev/md1p1 I get the following output: Quote Opening filesystem to check... No valid Btrfs found on /dev/md1p1 ERROR: cannot open file system Seems to be problematic? What can I do now? Edited October 9, 20232 yr by Hmmmm
October 9, 20232 yr Community Expert That was my bad, since you are using encryption it's btrfs check /dev/mapper/md1p1
October 9, 20232 yr Author 31 minutes ago, JorgeB said: That was my bad, since you are using encryption it's btrfs check /dev/mapper/md1p1 Done. I get no errors after the check: Quote Opening filesystem to check... Checking filesystem on /dev/mapper/md1p1 UUID: b711ac89-966d-4f12-aa22-f2442bfb3c45 [1/7] checking root items [2/7] checking extents [3/7] checking free space tree [4/7] checking fs roots [5/7] checking only csums items (without verifying data) [6/7] checking root refs [7/7] checking quota groups skipped (not enabled on this FS) found 11872221880320 bytes used, no error found total csum bytes: 11578121992 total tree bytes: 14077476864 total fs tree bytes: 198164480 total extent tree bytes: 99139584 btree space waste bytes: 2111403791 file data blocks allocated: 12019447185408 referenced 11862261993472
October 9, 20232 yr Author I totally messed up now, my cache drive is now unmountable, I attached new logs... The cache now says "not mountable: not supported or no filesystem" Problem is that I don't have any backups of this cache drive. It started with the error message: luks error 5. I then (maybe this was a big mistake) shutdown the array and removed the cache from the cache slot, started the array and tried to put the cache back in the slot. Now I have the error message above. Damn... Edit: will a reboot fix this problem that Unraid can't detect the filesystem? I tried to btrfs check the cache, but was unable to (altough in the maintenance mode, the cache drive seems to be mounted (??)) Reboot seems to have fixed the problem. Sorry for the confusion. The array disk 1 non writable problem still is there though... Edited October 15, 20232 yr by Hmmmm
October 10, 20232 yr Author Can I do something with the parity to solve the problem of being unable to write to disk 1?
October 10, 20232 yr Community Expert Solution Sorry, missed your reply, I can't see why the filesystem is read-only, so would recommend backing up and recreating that disk.
October 10, 20232 yr Author 47 minutes ago, JorgeB said: Sorry, missed your reply, I can't see why the filesystem is read-only, so would recommend backing up and recreating that disk. Thanks for your answer, no problem! Since I haven't done this at all in Unraid: can you point me to a tutorial/manual about this? Do I have to stop the array and take the disk out of slot 1 and put it back in so that I can reformat it? Will parity be affected or is it still available as 'last resort' when the backup and restore process from that unassigned disk fails for some reason? There is no option to 'backup' the shares (settings etc.), is it? One last question: which Filesystem should I choose for the fresh start? BTRFS seems quite fragile, is there a better one for complete disk encryption? Thanks for your time, Jorge! Edited October 10, 20232 yr by Hmmmm
October 10, 20232 yr Community Expert 2 minutes ago, Hmmmm said: Do I have to stop the array and take the disk out of slot 1 and put it back in so that I can reformat it? After the backup you just need to stop the array, click on disk1, change the fs to a different one, start array and format, you can leave it like that or if you want to use btrfs again just change back and format again. 3 minutes ago, Hmmmm said: Will parity be affected or is it still available as 'last resort' when the backup and restore process from that unassigned disk fails for some reason? Parity will remain valid, but once you format the disk parity will be updated to reflect that. 4 minutes ago, Hmmmm said: There is no option to 'backup' the shares (settings etc.), is it? You'd need to do it manually, unless you have a large enough pool, in that case you could use the mover. 5 minutes ago, Hmmmm said: One last question: which Filesystem should I choose for the fresh start? BTRFS seems quite fragile, is there a better one for complete disk encryption? Unraid uses LUKS encryption for any filesystem, so in that regard they will all be the same, regarding the fs xfs would probably the best option for the typical user.
October 10, 20232 yr Author 15 minutes ago, JorgeB said: After the backup you just need to stop the array, click on disk1, change the fs to a different one, start array and format, you can leave it like that or if you want to use btrfs again just change back and format again. Parity will remain valid, but once you format the disk parity will be updated to reflect that. You'd need to do it manually, unless you have a large enough pool, in that case you could use the mover. Unraid uses LUKS encryption for any filesystem, so in that regard they will all be the same, regarding the fs xfs would probably the best option for the typical user. Thanks. I will do the recreating after the backup is completed. Is ZFS a valid option? I saw some videos of SpaceInvaderOne and it seemed interesting. Would like to have a good mix between stability and features, although stability is slightly more important to me.
October 10, 20232 yr Community Expert 54 minutes ago, Hmmmm said: Is ZFS a valid option? It is, but currently there's a write performance issue when it's used in the array (not as a polo), so it will slower than it should, but it works and once that's fixed it would work at normal speeds.
October 15, 20232 yr Author On 10/10/2023 at 1:43 PM, JorgeB said: Sorry, missed your reply, I can't see why the filesystem is read-only, so would recommend backing up and recreating that disk. Just wanted to say that I recreated the disk and that the restore of the backup is nearly finished. Thanks, it seems to work now. Fingers crossed that I don't get this strange problem again...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.