mergerfs:add_a_new_data_disk
Table of Contents
MergerFS - Add a new data disk
View the current setup
Install the xattr utility tool:
apt install python-xattr
Assuming the root of the mergerfs filesystem is /storage, use xattrs to view the pseudo .mergerfs file:
cd /storage xattr -l .mergerfs
returns:
user.mergerfs.srcmounts: /mnt/data/disk01:/mnt/data/disk02:/mnt/data/disk03 user.mergerfs.minfreespace: 21474836480 user.mergerfs.moveonenospc: true user.mergerfs.policies: all,eplfs,eplus,epmfs,erofs,ff,lfs,lus,mfs,newest,rand user.mergerfs.version: 2.13.1 user.mergerfs.pid: 91089 user.mergerfs.category.action: all user.mergerfs.category.create: eplfs user.mergerfs.category.search: ff user.mergerfs.func.access: ff user.mergerfs.func.chmod: all user.mergerfs.func.chown: all user.mergerfs.func.create: eplfs user.mergerfs.func.getattr: ff user.mergerfs.func.getxattr: ff user.mergerfs.func.link: all user.mergerfs.func.listxattr: ff user.mergerfs.func.mkdir: eplfs user.mergerfs.func.mknod: eplfs user.mergerfs.func.open: ff user.mergerfs.func.readlink: ff user.mergerfs.func.removexattr: all user.mergerfs.func.rename: all user.mergerfs.func.rmdir: all user.mergerfs.func.setxattr: all user.mergerfs.func.symlink: eplfs user.mergerfs.func.truncate: all user.mergerfs.func.unlink: all user.mergerfs.func.utimens: all
NOTE: This shows that there are 3 disks in the pool, namely:
- /mnt/data/disk01
- /mnt/data/disk02
- /mnt/data/disk03
All of options shown can be set in real time without unmounting and re-mounting the mergerfs pool via the runtime options.
Add a disk
From within the root of the mergerfs filesystem (eg. /storage)
xattr -w user.mergerfs.srcmounts '+>/mnt/data/disk04' .mergerfs or, for adding two disks use: xattr -w user.mergerfs.srcmounts '+>/mnt/data/disk04:/mnt/data/disk05' .mergerfs
NOTE: This will append disk04 and disk05 onto the end of the current srcmounts.
mergerfs/add_a_new_data_disk.txt · Last modified: 2025/05/12 21:58 by peter