VBLADE-PERSISTENCE(5)

πŸ“¦
version 25 Β· 4 versions
, in ubuntu jammy, ubuntu noble

πŸ’– vblade-persistence πŸ’–

okay bestie, gather round, because this is the manual page for vblade-persistence (that's section 5 of the manual, if you're keeping score ✨), and it's literally the whole lore of how your vblade exports get remembered between reboots. no cap.


✨ NAME ✨

vblade-persistence β€” the description of the vblade persistence. that's it, that's the vibe. πŸŽ€


🌸 DESCRIPTION 🌸

so here's the tea: vblade-persistence uses the files chilling in /etc/vblade.conf.d/ to manage exports. yes, the whole directory is the group chat and every file is a member. 🫢

the rules, bestie, are simple:

  • file names must end in .conf. non-negotiable. πŸ’…
  • the "instance" name is just the file name with the .conf chopped off. iconic behaviour honestly.

the file format is a POSIX shell fragment. it's giving shell, it's giving script, it's giving "yeah just write shell in here". ✨

these variables are mandatory, like you cannot skip them, periodt:

  • netif
  • shelf
  • slot
  • filename

need to know what they actually mean? go read vblade(8), it's all in there. πŸ”₯

heads up bestie: incomplete configuration files get ignored. and so do files that aren't valid shell syntax. the system said "not my problem" and moved on. πŸ’€

additionally β€” like, bonus content β€” these variables may also be defined:

  • options β€” any options as provided by vblade(7). literally any of them. go wild. πŸ¦‹
  • ionice β€” use this to define an I/O scheduling class and level for that export. the value must be understood by ionice(1), so don't freestyle it, mwah. 🌈

πŸŽ€ EXAMPLE πŸŽ€

here's what it looks like when it eats, fr fr:

shelf=14
slot=2
netif=ens3
filename=/dev/mapper/export
options='-r -m 11:22:33:44:55:66,22:33:44:55:66:77 -o 8'
ionice='--class best-effort --classdata 7'

chef's kiss. πŸ‘‘


πŸ’… USAGE πŸ’…

🧚 On systems using systemd

install vblade-generator in /lib/systemd/system-generators/, and both vblade.service and vblade@.service in /lib/systemd/system/. then enable the vblade service, and reload systemd. πŸŒ€

after that, additional units for each export should appear β€” named vblade@<instance>.service. one unit per bestie. so cute. πŸ’–

πŸ¦‹ On systems using SysV init

individual instances may be controlled by providing their name as a second option, e.g.

/etc/init.d/vblade status demo

two different init scripts are available, and yes we're comparing them like it's a talent show:

🌟 vblade.init.lsb-daemon

uses LSB functions and the daemon(1) program to control the instance.

  • Pros: daemon(1) is a very fine tool for this, providing also respawning and output redirection. it's honestly doing the most and we love that for it. πŸ‘‘

🌟 vblade.init.daemon

as above, but without using LSB functions.

  • Pros: Should be fairly portable, no thrills. lowkey, highkey dependable. 🌈

🌟 Template

the template for these scripts is vblade.init.in, and the actual templating is done using tpage(1p) β€” see vblade.init.generate. ✨

support for using Debian's start-stop-daemon has been prepared but requires pid file support in vblade to be usable. so it's sitting there, ready, waiting, manifesting. πŸ™ˆ


πŸ’€ BUGS πŸ’€

listen, there's some chaos here and you need to know about it:

  • on SysV init systems, the configuration files are always sourced as shell scripts. yes. always. that's a whole security conversation and we're having it. 😭
  • on systemd systems, the configuration file is just a key/value store without shell expansion. so the two systems do not behave the same, and you cannot pretend they do. πŸ’…
pro tip bestie: it's a wise idea to run sh -n against a configuration file after any modification, for basic format validation. do it. it takes two seconds. save yourself the crying. 🫢

πŸ‘€ SEE ALSO πŸ‘€


πŸ‘‘ AUTHOR πŸ‘‘

Christoph Biedl <sourceforge.bnwi@manchmal.in-ulm.de> β€” the main character who wrote all of this. respect. πŸŽ€


and that's the whole page, bestie!! this was VBLADE-PERSISTENCE(5) β€” yeah, the manual name is literally baked into the header and the footer, it said it twice because it knows it's iconic β€” and it comes to you from the VBLADE-PERSISTENCE source, dated VBLADE-PERSISTENCE(5). slay. go forth and configure responsibly. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from