Add scripts and configuration files for mergerfs setup and testing

- Created backup files for wipefs on specific disk partitions.
- Added db-test script to verify metadata.db file integrity.
- Documented successful mergerfs branch and pool configurations in mfs-good.txt.
- Implemented mfs write test in mfs-test.txt.
- Included mergerfs version and device information in mfs.txt.
- Developed rebuild scripts for mergerfs stages, including verification and filesystem creation.
- Generated stage logs for each rebuild step to track disk and filesystem status.
- Added checks for systemd mount requirements and filesystem verification in stage4.
This commit is contained in:
keith committed 2026-10-05 22:57:01 -05:00
1 parent b234845165
commit ff5a793c75
57 files changed
+2795

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
cd "/storage/Warez/Books/Calibre"
for f in \
metadata.db
do
echo "=== $f ==="
getfattr --only-values -n user.mergerfs.fullpath "$f"
echo
done
for f in \
metadata.db
do
p=$(getfattr --only-values -n user.mergerfs.fullpath "$f")
echo
echo "=== $p ==="
sqlite3 "$p" 'PRAGMA integrity_check;'
done
+20
View File
@@ -0,0 +1,20 @@
=== BRANCHES ===
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/4tb /dev/sda1 ext4 rw,relatime
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/8a /dev/sdb1 ext4 rw,relatime
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/8b /dev/sdc1 ext4 rw,relatime
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/6tb /dev/sdd1 ext4 rw,relatime
=== POOL ===
TARGET SOURCE FSTYPE OPTIONS
/storage banshee fuse.mergerfs rw,relatime,user_id=0,group_id=0,default_permissions,allow_other
Filesystem Type Size Used Avail Use% Mounted on
banshee fuse.mergerfs 24T 112K 24T 1% /storage
=== SYSTEMCTL CHECK ===
Requires=system.slice -.mount mnt-banshee-6tb.mount mnt-banshee-8a.mount mnt-banshee-4tb.mount mnt-banshee-8b.mount
After=mnt-banshee-4tb.mount mnt-banshee-8b.mount -.mount mnt-banshee-6tb.mount system.slice systemd-journald.socket mnt-banshee-8a.mount local-fs-pre.target
+2
View File
@@ -0,0 +1,2 @@
=== MFS WRITE TEST ===
/mnt/banshee/8b/.banshee-mergerfs-test
+6
View File
@@ -0,0 +1,6 @@
mergerfs version: 2.33.5
/usr/bin/mergerfs
/usr/sbin/mount.mergerfs
crw-rw-rw- 1 root root 10, 229 Sep 5 18:42 /dev/fuse
+8
View File
@@ -0,0 +1,8 @@
mergerfs --version
echo
command -v mergerfs
command -v mount.mergerfs || true
echo
ls -l /dev/fuse
+18
View File
@@ -0,0 +1,18 @@
echo '=== BRANCHES ==='
findmnt /mnt/banshee/4tb
findmnt /mnt/banshee/8a
findmnt /mnt/banshee/8b
findmnt /mnt/banshee/6tb
echo
echo '=== POOL ==='
findmnt /storage
echo
df -hT /storage
echo
echo '=== SYSTEMCTL CHECK ==='
systemctl show storage.mount \
-p Requires \
-p After
+8
View File
@@ -0,0 +1,8 @@
echo '=== MFS WRITE TEST ==='
touch /storage/.banshee-mergerfs-test
for d in /mnt/banshee/*; do
find "$d" -maxdepth 1 -name '.banshee-mergerfs-test' -print
done
rm /storage/.banshee-mergerfs-test
+17
View File
@@ -0,0 +1,17 @@
D4='/dev/disk/by-id/wwn-0x5000c500fde02343'
D8A='/dev/disk/by-id/wwn-0x5000c500e70446ad'
D8B='/dev/disk/by-id/wwn-0x5000c500ebf2cd37'
D6='/dev/disk/by-id/wwn-0x5000c500929c8d02'
OS='/dev/disk/by-id/wwn-0x5000000000000000'
for d in "$D4" "$D8A" "$D8B" "$D6"; do
echo "=== $d ==="
lsblk -dn -o NAME,SIZE,MODEL,SERIAL "$(readlink -f "$d")"
done
echo
echo '=== OS — MUST NOT APPEAR ABOVE ==='
lsblk -dn -o NAME,SIZE,MODEL,SERIAL "$(readlink -f "$OS")"
+32
View File
@@ -0,0 +1,32 @@
D4='/dev/disk/by-id/wwn-0x5000c500fde02343'
D8A='/dev/disk/by-id/wwn-0x5000c500e70446ad'
D8B='/dev/disk/by-id/wwn-0x5000c500ebf2cd37'
D6='/dev/disk/by-id/wwn-0x5000c500929c8d02'
for d in "$D4" "$D8A" "$D8B" "$D6"; do
echo "=== $d ==="
lsblk -dn -o NAME,SIZE,MODEL,SERIAL "$(readlink -f "$d")"
done
echo
echo '=== REMOVE PVs ==='
pvremove -ff -y \
"${D4}-part1" \
"$D8A" \
"$D8B" \
"$D6"
echo
echo '=== REMOVAL VERIFICATION ==='
echo
echo '=== PVS ==='
pvs
echo
echo '=== VGS ==='
vgs
echo
echo '=== LVS ==='
lvs
+35
View File
@@ -0,0 +1,35 @@
D4='/dev/disk/by-id/wwn-0x5000c500fde02343'
D8A='/dev/disk/by-id/wwn-0x5000c500e70446ad'
D8B='/dev/disk/by-id/wwn-0x5000c500ebf2cd37'
D6='/dev/disk/by-id/wwn-0x5000c500929c8d02'
echo
echo '=== WIPE OLD LVM DRIVES ==='
for d in "$D4" "$D8A" "$D8B" "$D6"; do
echo "Wiping $d"
wipefs --all --force "$d"
parted --script "$d" \
mklabel gpt \
mkpart primary ext4 1MiB 100%
done
partprobe
udevadm settle
echo
echo '=== VERIFY DRIVES ==='
lsblk -o NAME,SIZE,MODEL,SERIAL,FSTYPE
echo
echo '=== BUILD FILESYSTEMS ==='
mkfs.ext4 -m 0 -L banshee-4tb "${D4}-part1"
mkfs.ext4 -m 0 -L banshee-8a "${D8A}-part1"
mkfs.ext4 -m 0 -L banshee-8b "${D8B}-part1"
mkfs.ext4 -m 0 -L banshee-6tb "${D6}-part1"
echo
echo '=== VERIFY FILESYSTEMS ==='
lsblk -f
blkid
+24
View File
@@ -0,0 +1,24 @@
findmnt --verify --verbose
systemctl daemon-reload
mount -a
echo
echo '=== BRANCHES ==='
findmnt /mnt/banshee/4tb
findmnt /mnt/banshee/8a
findmnt /mnt/banshee/8b
findmnt /mnt/banshee/6tb
echo
echo '=== POOL ==='
findmnt /storage
echo
df -hT \
/mnt/banshee/4tb \
/mnt/banshee/8a \
/mnt/banshee/8b \
/mnt/banshee/6tb \
/storage
+11
View File
@@ -0,0 +1,11 @@
=== /dev/disk/by-id/wwn-0x5000c500fde02343 ===
sda 3.6T ST4000DM004-2U91 ZFN5VCSS
=== /dev/disk/by-id/wwn-0x5000c500e70446ad ===
sdb 7.3T ST8000DM004-2U91 ZR14W7C7
=== /dev/disk/by-id/wwn-0x5000c500ebf2cd37 ===
sdc 7.3T ST8000DM004-2U91 WSC2WN91
=== /dev/disk/by-id/wwn-0x5000c500929c8d02 ===
sdd 5.5T ST6000NM0004-1FT Z4D4NY1L
=== OS — MUST NOT APPEAR ABOVE ===
sde 223.6G ADATA SU635 2M232L1664TD
+22
View File
@@ -0,0 +1,22 @@
=== /dev/disk/by-id/wwn-0x5000c500fde02343 ===
sda 3.6T ST4000DM004-2U91 ZFN5VCSS
=== /dev/disk/by-id/wwn-0x5000c500e70446ad ===
sdb 7.3T ST8000DM004-2U91 ZR14W7C7
=== /dev/disk/by-id/wwn-0x5000c500ebf2cd37 ===
sdc 7.3T ST8000DM004-2U91 WSC2WN91
=== /dev/disk/by-id/wwn-0x5000c500929c8d02 ===
sdd 5.5T ST6000NM0004-1FT Z4D4NY1L
=== REMOVE PVs ===
Labels on physical volume "/dev/disk/by-id/wwn-0x5000c500fde02343-part1" successfully wiped.
Labels on physical volume "/dev/disk/by-id/wwn-0x5000c500e70446ad" successfully wiped.
Labels on physical volume "/dev/disk/by-id/wwn-0x5000c500ebf2cd37" successfully wiped.
Labels on physical volume "/dev/disk/by-id/wwn-0x5000c500929c8d02" successfully wiped.
=== REMOVAL VERIFICATION ===
=== PVS ===
=== VGS ===
=== LVS ===
+133
View File
@@ -0,0 +1,133 @@
=== WIPE OLD LVM DRIVES ===
Wiping /dev/disk/by-id/wwn-0x5000c500fde02343
/dev/disk/by-id/wwn-0x5000c500fde02343: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/wwn-0x5000c500fde02343: 8 bytes were erased at offset 0x3a3817d5e00 (gpt): 45 46 49 20 50 41 52 54
/dev/disk/by-id/wwn-0x5000c500fde02343: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
Wiping /dev/disk/by-id/wwn-0x5000c500e70446ad
Wiping /dev/disk/by-id/wwn-0x5000c500ebf2cd37
Wiping /dev/disk/by-id/wwn-0x5000c500929c8d02
=== VERIFY DRIVES ===
NAME SIZE MODEL SERIAL FSTYPE
loop0 13.5M squashfs
loop1 13.1M squashfs
loop2 55.5M squashfs
loop3 55.5M squashfs
loop4 63.8M squashfs
loop5 63.8M squashfs
loop6 74M squashfs
loop7 74M squashfs
loop8 115.3M squashfs
loop9 115.3M squashfs
loop10 50.1M squashfs
loop11 50.1M squashfs
sda 3.6T ST4000DM004-2U91 ZFN5VCSS
└─sda1 3.6T
sdb 7.3T ST8000DM004-2U91 ZR14W7C7
└─sdb1 7.3T ext4
sdc 7.3T ST8000DM004-2U91 WSC2WN91
└─sdc1 7.3T
sdd 5.5T ST6000NM0004-1FT Z4D4NY1L
└─sdd1 5.5T
sde 223.6G ADATA SU635 2M232L1664TD
├─sde1 1G vfat
└─sde2 222.5G ext4
sdi 1.4M Virtual Floppy 20120731-1 vfat
sr0 1024M Virtual CD 20120731-1
=== BUILD FILESYSTEMS ===
Creating filesystem with 976754176 4k blocks and 244195328 inodes
Filesystem UUID: 9c44b3c3-22dd-4de7-a920-f3f010bf1a34
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Allocating group tables: 0/29809 done
Writing inode tables: 0/29809 done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: 0/29809 82/29809 done
Creating filesystem with 1953506304 4k blocks and 244191232 inodes
Filesystem UUID: e323aabb-b80d-4a15-9bfd-1b26d95d305a
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632
Allocating group tables: 0/59617 done
Writing inode tables: 0/59617 done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: 0/5961759050/59617 done
Creating filesystem with 1953506304 4k blocks and 244191232 inodes
Filesystem UUID: 9bf4b3cb-7c9f-4ad4-bf97-20120c0aa42a
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632
Allocating group tables: 0/59617 done
Writing inode tables: 0/59617 done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: 0/59617 done
Creating filesystem with 1465130240 4k blocks and 183144448 inodes
Filesystem UUID: 5a6f50ac-a214-4807-8382-7c3bc908d5c1
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Allocating group tables: 0/4471315385/44713 done
Writing inode tables: 0/44713 done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: 0/44713 2/44713 done
=== VERIFY FILESYSTEMS ===
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0 0 100% /snap/canonical-livepatch/406
loop1 squashfs 4.0 0 100% /snap/canonical-livepatch/414
loop2 squashfs 4.0 0 100% /snap/core18/2979
loop3 squashfs 4.0 0 100% /snap/core18/2999
loop4 squashfs 4.0 0 100% /snap/core20/2769
loop5 squashfs 4.0 0 100% /snap/core20/2866
loop6 squashfs 4.0 0 100% /snap/core22/2411
loop7 squashfs 4.0 0 100% /snap/core22/2437
loop8 squashfs 4.0 0 100% /snap/lxd/40338
loop9 squashfs 4.0 0 100% /snap/lxd/40575
loop10 squashfs 4.0 0 100% /snap/snapd/27591
loop11 squashfs 4.0 0 100% /snap/snapd/27710
sda
└─sda1 ext4 1.0 banshee-4tb 9c44b3c3-22dd-4de7-a920-f3f010bf1a34
sdb
└─sdb1 ext4 1.0 banshee-8a e323aabb-b80d-4a15-9bfd-1b26d95d305a
sdc
└─sdc1 ext4 1.0 banshee-8b 9bf4b3cb-7c9f-4ad4-bf97-20120c0aa42a
sdd
└─sdd1
sde
├─sde1 vfat FAT32 7B42-65C0 1G 1% /boot/efi
└─sde2 ext4 1.0 40a4098d-5a98-4584-b31a-07965d4a7969 111.9G 44% /
sdi vfat FAT12 PLEXSALV 2609-1301 1.4M 1% /mnt/plex-salvage
sr0
/dev/sde2: UUID="40a4098d-5a98-4584-b31a-07965d4a7969" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="fe983277-5909-4042-86a6-0b1d428001b2"
/dev/sde1: UUID="7B42-65C0" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="2940f033-2d5c-41fb-be2e-45f5e221d548"
/dev/loop1: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop8: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop6: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop4: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop11: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop2: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop0: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop9: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop7: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sda1: LABEL="banshee-4tb" UUID="9c44b3c3-22dd-4de7-a920-f3f010bf1a34" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="3df4bee8-68e3-49e3-89de-36eda2962bb1"
/dev/loop5: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop3: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/loop10: BLOCK_SIZE="131072" TYPE="squashfs"
/dev/sdd1: LABEL="banshee-6tb" UUID="5a6f50ac-a214-4807-8382-7c3bc908d5c1" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="b0b50623-b2be-4d42-af01-f975747958b0"
/dev/sdb1: LABEL="banshee-8a" UUID="e323aabb-b80d-4a15-9bfd-1b26d95d305a" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="5c3c9df9-5892-4ef9-8e9e-90755604d85c"
/dev/sdc1: LABEL="banshee-8b" UUID="9bf4b3cb-7c9f-4ad4-bf97-20120c0aa42a" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="b35081bc-4c44-46dc-a362-e39f47132d15"
+60
View File
@@ -0,0 +1,60 @@
/
[ ] target exists
[ ] source /dev/disk/by-uuid/40a4098d-5a98-4584-b31a-07965d4a7969 exists
[ ] FS type is ext4
/boot/efi
[ ] target exists
[ ] source /dev/disk/by-uuid/7B42-65C0 exists
[ ] FS type is vfat
none
[W] non-bind mount source /swap.img is a directory or regular file
[ ] FS type is swap
/mnt/banshee/4tb
[ ] target exists
[ ] userspace options: nofail,x-systemd.device-timeout=30
[ ] UUID=9c44b3c3-22dd-4de7-a920-f3f010bf1a34 translated to /dev/sda1
[ ] source /dev/sda1 exists
[ ] FS type is ext4
/mnt/banshee/8a
[ ] target exists
[ ] userspace options: nofail,x-systemd.device-timeout=30
[ ] UUID=e323aabb-b80d-4a15-9bfd-1b26d95d305a translated to /dev/sdb1
[ ] source /dev/sdb1 exists
[ ] FS type is ext4
/mnt/banshee/8b
[ ] target exists
[ ] userspace options: nofail,x-systemd.device-timeout=30
[ ] UUID=9bf4b3cb-7c9f-4ad4-bf97-20120c0aa42a translated to /dev/sdc1
[ ] source /dev/sdc1 exists
[ ] FS type is ext4
/mnt/banshee/6tb
[ ] target exists
[ ] userspace options: nofail,x-systemd.device-timeout=30
[ ] UUID=5a6f50ac-a214-4807-8382-7c3bc908d5c1 translated to /dev/sdd1
[ ] source /dev/sdd1 exists
[ ] FS type is ext4
/storage
[ ] target exists
[ ] FS options: allow_other,cache.files=off,category.create=pfrd,func.getattr=newest,dropcacheonclose=false,minfreespace=50G,moveonenospc=pfrd,branches-mount-timeout=30,branches-mount-timeout-fail=true,fsname=banshee
[W] unreachable source: /mnt/banshee/4tb:/mnt/banshee/8a:/mnt/banshee/8b:/mnt/banshee/6tb: No such file or directory
[W] mergerfs seems unsupported by the current kernel
[W] cannot detect on-disk filesystem type (No such file or directory)
=== BRANCHES ===
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/4tb /dev/sda1 ext4 rw,relatime
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/8a /dev/sdb1 ext4 rw,relatime
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/8b /dev/sdc1 ext4 rw,relatime
TARGET SOURCE FSTYPE OPTIONS
/mnt/banshee/6tb /dev/sdd1 ext4 rw,relatime
=== POOL ===
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 3.6T 28K 3.6T 1% /mnt/banshee/4tb
/dev/sdb1 ext4 7.3T 28K 7.3T 1% /mnt/banshee/8a
/dev/sdc1 ext4 7.3T 28K 7.3T 1% /mnt/banshee/8b
/dev/sdd1 ext4 5.5T 28K 5.5T 1% /mnt/banshee/6tb
/dev/sde2 ext4 218G 82G 126G 40% /