trapexit / mergerfs

a featureful union filesystem

Home Page:http://spawn.link

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Debian12 mergerfs ls&df command displays an exception.

Gloryandel opened this issue · comments

Linux debian 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
mergerfs version: 2.33.5
ArchLinux all functions are normal!

no sudo

ls -la
ls: 无法访问 'pool': 权限不够
总计 72
drwxr-xr-x  7 root root 4096  5月 6日 17:59 .
drwxr-xr-x 18 root root 4096  4月19日 10:00 ..
drwxr-xr-x  1 root root    0  5月 6日 17:26 data01
drwxr-xr-x  1 root root    0  5月 6日 17:25 data02
drwxr-xr-x  1 root root    0  5月 6日 17:25 data03
drwxr-xr-x  1 root root    0  5月 6日 17:18 data04
d?????????  ? ?    ?       ?              ? pool

angel@debian /srv % df -Th
文件系统                    类型      大小  已用  可用 已用% 挂载点
/dev/sdb1                   btrfs     2.0G  3.8M  1.8G    1% /srv/data01
/dev/sde1                   btrfs     2.0G  3.8M  1.8G    1% /srv/data02
/dev/sdc1                   btrfs     2.0G  3.8M  1.8G    1% /srv/data03
/dev/sdd1                   btrfs     2.0G  3.8M  1.8G    1% /srv/data04
Mergerfs mount point not displayed!

use sudo

Everything is normal

angel@debian /srv % sudo ls -la
总计 88
drwxr-xr-x  7 root root 4096  5月 6日 17:59 .
drwxr-xr-x 18 root root 4096  4月19日 10:00 ..
drwxr-xr-x  1 root root    0  5月 6日 17:26 data01
drwxr-xr-x  1 root root    0  5月 6日 17:25 data02
drwxr-xr-x  1 root root    0  5月 6日 17:25 data03
drwxr-xr-x  1 root root    0  5月 6日 17:18 data04
drwxr-xr-x  1 root root    0  5月 6日 17:26 pool
angel@debian /srv % sudo df -Th
文件系统                    类型           大小  已用  可用 已用% 挂载点
/dev/sdb1                   btrfs          2.0G  3.8M  1.8G    1% /srv/data01
1:2:3:4                     fuse.mergerfs  8.0G   16M  7.2G    1% /srv/pool
/dev/sde1                   btrfs          2.0G  3.8M  1.8G    1% /srv/data02
/dev/sdc1                   btrfs          2.0G  3.8M  1.8G    1% /srv/data03
/dev/sdd1                   btrfs          2.0G  3.8M  1.8G    1% /srv/data04

mount default info

$sudo mount
/dev/sdb1 on /srv/data01 type btrfs (rw,noatime,compress=zstd:3,space_cache=v2,subvolid=5,subvol=/)
1:2:3:4 on /srv/pool type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions)
/dev/sde1 on /srv/data02 type btrfs (rw,noatime,compress=zstd:3,space_cache=v2,subvolid=5,subvol=/)
1:2:3:4 on /srv/pool type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions)
/dev/sdc1 on /srv/data03 type btrfs (rw,noatime,compress=zstd:3,space_cache=v2,subvolid=5,subvol=/)
1:2:3:4 on /srv/pool type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions)
/dev/sdd1 on /srv/data04 type btrfs (rw,noatime,compress=zstd:3,space_cache=v2,subvolid=5,subvol=/)
1:2:3:4 on /srv/pool type fuse.mergerfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions)

As requested by the ticket template and the docs... please provide all the details about the setup. Additionally, please use the latest version as requested in the docs. I can't support old versions.

As requested by the ticket template and the docs... please provide all the details about the setup. Additionally, please use the latest version as requested in the docs. I can't support old versions.。

That's the official issue with Debian. The official version of Debian 12 is indeed far behind the current version.
Mergerfs - o ignorepponrename=false, dropcacheonclose=true, movonenospc=true/srv/data01:/srv/data02:/srv/data03:/srv/data04/srv/pool
Each branch is a Btrfs file system

There are no other special configurations, and I think it is no necessary to investigate the outdated version. I simply think using Debian is easier to install, and I estimate that this will not be necessary in the future. 😒

You can close it according to your needs.

Thank you very much, mergerfs is really well suited for NAS filesystems, is there currently an interface that supports events? For example, if the filesystem is idle for a certain period of time, or if there is a write, some events will be triggered to notify snapraid to synchronize, etc.
I think mergerfs is great to use with btrfs, but it is hard to ensure that btrfs subvolume snapshots are taken at the same time. If there is an interface to block writes for a certain period of time, and wait for the relevant subvolumes of the mergerfs pool to take a snapshot, then pseudo-synchronized snapshots of all the subvolumes can be achieved, even though the snapshots will take a very short amount of time. I currently use a script to achieve similar functionality, but it seems to be unsafe when reading and writing.

(There seems to be a problem with machine translation.😒)

I can't do anything if the old version has issues. I can't control what Debian includes. It is simply not a good use of time to check an old version of the software on a distro I can't change.

You still aren't providing enough info. Is it ran as root? You don't have allow_other set.I need all the information about the setup to comment. That's why I ask for it.

No, there is no way to stop the writes. Why would it be unsafe to snapshot while in use? If it was unsafe they wouldn't allow it.

  1. Use mergerfs run by sudo to mount, this is the mount command: sudo mergerfs -o ignorepponrename=false,dropcacheonclose=true,moveonenospc=true /srv/data01:/srv/data02 :/srv/data03:/srv/data04 /srv/pool
  2. With only 2GB of filesystem space available per branch, writing to mergerfs prompts for no free space. default is 4G
getfattr -d /srv/pool/.mergerfs
getfattr: Removing leading '/' from absolute path names
# file: srv/pool/.mergerfs
user.mergerfs.async_read="true"
user.mergerfs.auto_cache="false"
user.mergerfs.branches="/srv/data01=RW:/srv/data02=RW:/srv/data03=RW:/srv/data04=RW"
user.mergerfs.cache.attr="1"
user.mergerfs.cache.entry="1"
user.mergerfs.cache.files="libfuse"
user.mergerfs.cache.negative_entry="0"
user.mergerfs.cache.readdir="false"
user.mergerfs.cache.statfs="0"
user.mergerfs.cache.symlinks="false"
user.mergerfs.cache.writeback="false"
user.mergerfs.category.action="epall"
user.mergerfs.category.create="epmfs"
user.mergerfs.category.search="ff"
user.mergerfs.direct_io="false"
user.mergerfs.dropcacheonclose="true"
user.mergerfs.follow-symlinks="never"
user.mergerfs.fsname="1:2:3:4"
user.mergerfs.func.access="ff"
user.mergerfs.func.chmod="epall"
user.mergerfs.func.chown="epall"
user.mergerfs.func.create="epmfs"
user.mergerfs.func.getattr="ff"
user.mergerfs.func.getxattr="ff"
user.mergerfs.func.link="epall"
user.mergerfs.func.listxattr="ff"
user.mergerfs.func.mkdir="epmfs"
user.mergerfs.func.mknod="epmfs"
user.mergerfs.func.open="ff"
user.mergerfs.func.readlink="ff"
user.mergerfs.func.removexattr="epall"
user.mergerfs.func.rename="epall"
user.mergerfs.func.rmdir="epall"
user.mergerfs.func.setxattr="epall"
user.mergerfs.func.symlink="epmfs"
user.mergerfs.func.truncate="epall"
user.mergerfs.func.unlink="epall"
user.mergerfs.func.utimens="epall"
user.mergerfs.fuse_msg_size="256"
user.mergerfs.ignorepponrename="false"
user.mergerfs.inodecalc="hybrid-hash"
user.mergerfs.kernel_cache="false"
user.mergerfs.link-exdev="passthrough"
user.mergerfs.link_cow="false"
user.mergerfs.log.metrics="false"

user.mergerfs.minfreespace="4294967295" 4G ???

user.mergerfs.mount="/srv/pool"
user.mergerfs.moveonenospc="mfs"
user.mergerfs.nfsopenhack="off"
user.mergerfs.nullrw="false"
user.mergerfs.pid="892"
user.mergerfs.posix_acl="false"
user.mergerfs.readdirplus="false"
user.mergerfs.rename-exdev="passthrough"
user.mergerfs.security_capability="true"
user.mergerfs.srcmounts="/srv/data01:/srv/data02:/srv/data03:/srv/data04"
user.mergerfs.statfs="base"
user.mergerfs.statfs_ignore="none"
user.mergerfs.symlinkify="false"
user.mergerfs.symlinkify_timeout="3600"
user.mergerfs.threads="4"
user.mergerfs.version="2.33.5"
user.mergerfs.xattr="passthrough"
  1. “Why would it be unsafe to snapshot while in use? If it was unsafe they wouldn't allow it.”:I have shared directories for samba created under pool, but these are all btrfs filesystems aggregated from different partitions, which leads to the fact that if a snapshot is taken, if files are modified (albeit for an extremely short period of time) during the time interval between separate snapshots of the subvolumes, there's a chance that files in the shared directories won't be taken at the same time during the snapshot, and it seems like it would be very confusing to do a rollback on snapshots taken from the shared directories.

Blocking for a very small amount of time ensures that no writes are performed for a period of time, so that even though the snapshots are not simultaneous, the lack of writes ensures that the contents of the snapshots for a set of subvolumes are just a moment in time. Implementing same moment snapshots of multiple subvolumes.

Please stick to 1 topic per ticket. It is too difficult to discuss multiple things in one thread.

Re 1) Right, so you don't have allow_other set so it doesn't allow other users to see it. That's by design. If you want anyone to see the share you must add allow_other. You are using old software. You need to read the docs from that version.

So it is, thank you very much!