Previous title: write "not supported" on cache=yes shares - only 1 level of directory made each write request
For a $share that has cache=yes and a directory that doesn't exist on /mnt/cache/$share, when a write request is given, instead of making all the parent directories to the request, only the first non-existant directory is made. So for /mnt/cache/$share/1/2/3/file, 4 write requests are required. The directory is made instantly, and no more directories are made no longer how much time passes. Until then, both on the server and via SMB, errors are given:
Quoteroot@tower:/mnt/user/Archive/FamilyPhotoVideo/Kids/2020/# touch a
touch: cannot touch 'a': Operation not supported
Explicit setup instructions to reproduce:
Create a new share, test. Set cache=yes. Execute these commands
## no compression, no issue
root@Tower:/mnt/user/test# rm -rf /mnt/user/test/1;
root@Tower:/mnt/user/test# rm -rf /mnt/cache/test/1 # should be no-op, but just in case
root@Tower:/mnt/user/test# cd /mnt/disk1/test
root@Tower:/mnt/disk1/test# v
total 0
root@Tower:/mnt/disk1/test# btrfs property get .
root@Tower:/mnt/disk1/test# ## no compression, no issue
root@Tower:/mnt/disk1/test# mkdir -p 1/2/3
root@Tower:/mnt/disk1/test# cd /mnt/user/test/1/2/3/
root@Tower:/mnt/user/test/1/2/3# touch a
root@Tower:/mnt/user/test/1/2/3# v /mnt/cache/test/1/2/3/a
-rw-rw-rw- 1 root root 0 Jan 31 18:13 /mnt/cache/test/1/2/3/a
root@Tower:/mnt/user/test/1/2/3# cd /mnt/user/test
## re-do test with compression
root@Tower:/mnt/user/test# rm -rf /mnt/user/test/1;
root@Tower:/mnt/user/test# rm -rf /mnt/cache/test/1 # should be no-op, but just in case
root@Tower:/mnt/user/test# cd /mnt/disk1/test
root@Tower:/mnt/disk1/test# btrfs property get .
root@Tower:/mnt/disk1/test# btrfs property set . compression zstd
root@t1000:/mnt/disk1/test# btrfs property get .
compression=zlib
root@Tower:/mnt/disk1/test# mkdir -p 1/2/3
root@Tower:/mnt/disk1/test# cd /mnt/user/test/1/2/3/
root@Tower:/mnt/user/test/1/2/3# touch a
touch: cannot touch 'a': Operation not supported
root@Tower:/mnt/user/test/1/2/3# tree /mnt/cache/test/
/mnt/cache/test/
└── 1
1 directory, 0 files
root@Tower:/mnt/user/test/1/2/3# touch a
touch: cannot touch 'a': Operation not supported
root@Tower:/mnt/user/test/1/2/3# tree /mnt/cache/test/
/mnt/cache/test/
└── 1
└── 2
2 directories, 0 files
Occurs with zlib, std, lzo.
Workaround: Does NOT occur with mount -o remount,compress-force, updating this to annoyance
Outdated Test command:
Quoteroot@tower:/mnt/user/Archive/1/2/3/4/5/6/7/8/9# while (true); do tree /mnt/cache/Archive; touch a; tree /mnt/cache/Archive; echo "Sleeping for 5 seconds..."; sleep 5; done
output:
20200119_unraid_cache_write_issue.log
- Occurs on any share with cache=yes on any directory that does not exist on /mnt/cache
- Occurs in safe mode
- Array disks are Btrfs-encrypted
- cache is xfs-encrypted
- ample free space
- drives spun up
- Docker Safe New Permissions has no effect.
- This was not necessarily introduced in 6.8.1, this is my first unRAID setup, starting in 6.8.0, and only added a cache drive with 6.8.1
- occurs on 6.8.2, 6.10.3, 6.11.5, potentially worked on 6.9.0-beta as per this comment
Diagnostics from safe mode:
tower-diagnostics-20200119-2337.zip
Diagnostics from 6.11.5:
t1000-diagnostics-20230211-1611.zip
Recommended Comments
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.