Difference between revisions of "SnapRAID / MergerFS"

From Briki
Jump to: navigation, search
(Adding a new data disk to mergerfs)
(SnapRAID / MergerFS)
Line 18: Line 18:
 
From within the root of the mergerfs filesystem (eg. /srv)
 
From within the root of the mergerfs filesystem (eg. /srv)
 
   xattr -w user.mergerfs.srcmounts '+>/mnt/data/disk4/srv' .mergerfs
 
   xattr -w user.mergerfs.srcmounts '+>/mnt/data/disk4/srv' .mergerfs
 +
 +
== Removing a data disk from mergerfs ==
 +
From within the root of the mergerfs filesystem (eg. /srv)
 +
  xattr -w user.mergerfs.srcmounts '-/mnt/data/disk4/srv' .mergerfs
  
 
== Forcing a resync ==
 
== Forcing a resync ==
  
 
   sudo snapraid sync
 
   sudo snapraid sync

Revision as of 12:28, 4 November 2021

SnapRAID / MergerFS

Setup

https://zackreed.me/setting-up-snapraid-on-ubuntu/

Partitioning a new data disk

Note: "-m 2" here reserves 2% of the filesystem for root-owned files (eg. .../.snapraid/content)

 sudo parted -a optimal -s /dev/sdX -- mklabel gpt mkpart primary 0% 100%
 sudo mkfs.ext4 -m 2 -T largefile4 /dev/sdX1

Partitioning a new parity disk

Note: "-m 0" here reserves 0% of the filesystem, ensuring that the parity disks are slightly larger than the data disks

 sudo parted -a optimal -s /dev/sdX -- mklabel gpt mkpart primary 0% 100%
 sudo mkfs.ext4 -m 0 -T largefile4 /dev/sdX1

Adding a new data disk to mergerfs

From: https://zackreed.me/mergerfs-neat-tricks/ From within the root of the mergerfs filesystem (eg. /srv)

 xattr -w user.mergerfs.srcmounts '+>/mnt/data/disk4/srv' .mergerfs

Removing a data disk from mergerfs

From within the root of the mergerfs filesystem (eg. /srv)

 xattr -w user.mergerfs.srcmounts '-/mnt/data/disk4/srv' .mergerfs

Forcing a resync

 sudo snapraid sync