raid-mount/raidtab.example
GRMrGecko d5a3653915 Improve goroutine safety, error handling, and correctness
- Replace log.Fatalln in goroutines with error returns collected via
  mutex-protected slice, checked at barrier points and after final wait.
- Fix WaitGroup race between mountDrive and mountBindfs by removing the
  separate Add/Done pair and calling mountBindfs as a plain function.
- Fix encrypted+already-decrypted path skipping the mount step entirely.
- Add LUKS cleanup (cryptsetup close) when mount fails after decryption.
- Close cryptsetup stdin pipe after writing password to prevent hangs.
- Only pass -o to mount when Flags is non-empty.
- Support RAID_MOUNT_ENCRYPTION_PASSWORD env var as alternative to the
  command-line flag which is visible in the process list.
- Replace deprecated ioutil.ReadFile with os.ReadFile.
- Standardize error reporting on log package, remove mixed fmt.Printf.
- Fix config path resolution to check flag emptiness before stat.
- Add parallel semantics documentation to raidtab.example.
2026-02-20 12:47:02 -06:00

15 lines
729 B
Plaintext

# Source Target FSType Flags CryptName Parallel
#
# The Parallel field controls mount ordering. Entries with Parallel=1 are
# launched concurrently with the preceding entries. An entry with Parallel=0
# acts as a barrier: all previously launched mounts must complete before it
# starts. This lets you express dependencies by position — for example,
# individual drives can mount in parallel, then a mergerfs union that depends
# on them uses Parallel=0 to wait.
/dev/sdb1 /mnt/sdb1 xfs defaults none 1
/dev/sdc1 /mnt/sdc1 xfs defaults sdc1 1
# Merged — waits for the parallel mounts above to finish before starting.
/mnt/sdb1:/mnt/sdc1 /mnt/merged mergerfs config=/etc/mergerfs.ini,allow_other,use_ino,fsname=merged none 0