DASALVAGER(8)

๐Ÿฆ‹ DASALVAGER(8) ๐Ÿฆ‹

ok bestie so this page comes straight out of the AFS Command Reference and it's literally the dasalvager command, section 8, we're doing admin things today ๐Ÿ’…


โœจ NAME โœจ

dasalvager โ€” initializes the Salvager component of the dafs process. that's it, that's the whole job description ๐Ÿซถ


โœจ SYNOPSIS โœจ

dasalvager
    [initcmd] [-partition <name of partition to salvage>]
    [-volumeid <volume id to salvage>] [-debug] [-nowrite]
    [-inodes] [-force] [-oktozap] [-rootinodes]
    [-salvagedirs] [-blockreads]
    [-parallel <# of max parallel partition salvaging>]
    [-tmpdir <name of dir to place tmp files>]
    [-showlog] [-showsuid] [-showmounts]
    [-orphans (ignore | remove | attach)] [-help]

โœจ DESCRIPTION โœจ

so the dasalvager command initializes the Salvager component of the "dafs" process. in the conventional setup (iykyk), its binary file lives in the /usr/lib/openafs directory on a file server machine. yes, a file server machine. it's a server girlie ๐Ÿ”ฅ

what the Salvager actually does ๐Ÿ’–

the Salvager restores internal consistency to corrupted read/write volumes on the local file server machine, where it can. key phrase: where it can. sometimes it just can't, and that's valid.

for read-only or backup volumes though, it's way more chill โ€” it only inspects the volume header:

  • if the volume header is corrupted, the Salvager removes the volume completely and records the removal in its log file, /var/log/openafs/SalvageLog. then you issue the vos release or vos backup command to create the read-only or backup volume again. bye bestie, we'll rebuild you ๐Ÿ’€
  • if the volume header is intact, the Salvager skips the volume โ€” it does not check for corruption in the contents. however!! if the File Server notices corruption as it initializes, it sometimes refuses to attach the volume or bring it online. in that case the simplest move is to remove the volume by issuing the vos remove or vos zap command, then issue the vos release or vos backup command to create it again. slay, fresh start โœจ

she's built different (literally)

unlike other server process initialization commands, the Salvager command is designed to be issued at the command shell prompt as well as placed into a file server machine's /etc/openafs/BosConfig file with the bos create command. it's also possible to invoke the Salvager remotely by issuing the bos salvage command. versatile queen ๐Ÿ‘‘

how much are we salvaging tho? ๐ŸŽ€

combine the command's options as indicated to salvage different numbers of read/write volumes:

  • to salvage all volumes on the file server machine, provide no arguments. heads up: no volumes on the machine are accessible to Cache Managers during the salvage, because the BOS Server stops the File Server and Volume Server processes while the Salvager runs. everyone else sit down, it's her moment.
  • to salvage all of the volumes on one partition, provide the -partition argument. same deal as salvaging everything on the machine โ€” no volumes on the machine are accessible to Cache Managers during the salvage operation.
  • to salvage only one volume, combine the -partition and -volumeid arguments. only that one volume is inaccessible to Cache Managers, because the BOS Server does not shutdown the File Server and Volume Server processes. minimal disruption, main character energy โœจ

-force, -nowrite, and the whole inode situation

the Salvager normally salvages only those read/write volumes that are marked as having been active when a crash occurred. to have it salvage all relevant read/write volumes, add the -force flag. lowkey assertive, we love her.

the Salvager normally creates new inodes as it repairs damage. so if the partition is so full that there's simply no room for new inodes, use the -nowrite argument to bring undamaged volumes online without attempting to salvage damaged volumes. then use the vos move command to move one or more of the undamaged volumes to other partitions, freeing up the space that the Salvager needs to create new inodes. it's giving "clean your room before you can craft" ๐Ÿงš

parallelism, part one โœจ

by default, multiple Salvager subprocesses run in parallel: one for each partition up to four, and four subprocesses for four or more partitions. to increase or decrease the number of subprocesses running in parallel, provide a positive integer value for the -parallel argument.

if there's more than one server partition on a physical disk, the Salvager by default salvages them serially to avoid the inefficiency of constantly moving the disk head from one partition to another. however, this strategy is often not ideal if the partitions are configured as logical volumes that span multiple disks. to force the Salvager to salvage logical volumes in parallel as if they were on separate disks, provide the string "all" as the value for the -parallel argument.

to set both parameters at the same time, append the number of Salvager processes to the string "all". for example, "-parallel all5" treats each partition as a separate disk and runs five Salvager processes, thus salvaging five partitions at a time. multi-tasking icon ๐Ÿ’…

temp files and why your partition is full ๐Ÿ˜ญ

the Salvager creates temporary files as it runs, by default writing them to the partition it is salvaging. the number of files can be quite large, and if the partition is too full to accommodate them, the Salvager terminates without completing the salvage operation (it always removes the temporary files before exiting though โ€” she cleans up after herself, periodt).

other Salvager subprocesses running at the same time continue until they finish salvaging all other partitions where there's enough disk space for temporary files. to complete the interrupted salvage, reissue the command against the appropriate partitions, adding the -tmpdir argument to redirect the temporary files to a local disk directory that has enough space. problem solved bestie ๐Ÿฉท

orphans ๐Ÿฃ

the -orphans argument controls how the Salvager handles orphaned files and directories that it finds on server partitions it is salvaging.

an orphaned element is completely inaccessible because it's not referenced by the vnode of any directory that can act as its parent (is higher in the filespace). orphaned objects occupy space on the server partition, but they do not count against the volume's quota. so they're just... vibing there. rent free. taking up room. ๐Ÿ™ˆ

-showmounts

to generate a list of all mount points that reside in one or more volumes, rather than actually salvaging them, include the -showmounts flag.

one very important syntax note ๐ŸŒธ

this command does not use the syntax conventions of the AFS command suites. provide the command name and all option names in full. no cute abbreviations, no shortcuts, she wants the whole word. okay?? ๐Ÿ’œ


ok bestie that's the entire DESCRIPTION and it was a lot. the OPTIONS section is next and it is LONG, so sit tight โ€” part 2 loading ๐Ÿ”ฅ
  • [initcmd] โ€” this is here bc the command uses the AFS command parser, and it's optional bestie, no pressure ๐Ÿ’…
  • -partition <name of partition to salvage> โ€” tells the Salvager which partition to go save. Write the full partition name like /vicepx or /vicepxx. Skip it entirely and it'll salvage every single partition on the file server machine ๐Ÿซถ
  • -volumeid <volume id to salvage> โ€” names the exact read/write volume ID you wanna salvage. Heads up tho: you must also pass -partition with this one, and that partition has to be the volume's actual site. They're a package deal, no solo runs ๐Ÿ’–
  • -debug โ€” lets only one Salvager subprocess run at a time, no matter what -parallel is set to. Use it when you're running the Salvager inside a debugger so the trace is actually readable instead of chaos ๐Ÿ˜ญ
  • -nowrite โ€” brings all the undamaged volumes online without even trying to salvage anything damaged. Lowkey a "we move" flag.
  • -inodes โ€” writes a list of every AFS inode the Salvager changed into the /var/log/openafs/SalvageLog file ๐Ÿ“
  • -force โ€” inspects all volumes for corruption, not just the ones marked as active when a crash happened. Full sweep energy ๐Ÿ”ฅ
  • -oktozap โ€” removes a volume that's so wrecked that even running vos zap with the -force flag does nothing. Pair it with -partition and -volumeid to point at the volume you want gone.
โš ๏ธ bestie listen โ€” this destroys data that cannot be read. Only use it with extreme caution, and only when you are certain nothing in that volume is still needed. Like, certain certain. ๐Ÿ’€
  • -rootinodes โ€” writes a list of every AFS inode owned by the local superuser "root" into the /var/log/openafs/SalvageLog file ๐Ÿ‘‘
  • -salvagedirs โ€” salvages whole directory structures, even when they don't look damaged at all. Normally (the default) the Salvager only touches a directory if it's flagged as corrupted. This flag says "no babe, we're doing all of them" โœจ
  • -blockreads โ€” forces the Salvager to read the partition one disk block (512 bytes) at a time and skip any blocks that are too badly damaged to save. That way it can rescue as many volumes as possible ๐Ÿฉน By default it reads big disk blocks, which can make it bail out early if it hits disk errors. So use this flag if the partition you're salvaging has disk errors, periodt.
  • -parallel <# of max parallel partition salvaging> โ€” sets the max number of Salvager subprocesses running in parallel. Three flavors, pick one:
    • An integer from the range 1 to 32. A value of 1 means a single Salvager process salvages the partitions sequentially.
    • The string "all" to run up to four Salvager subprocesses in parallel on partitions formatted as logical volumes that span multiple physical disks. Only use this value with those kinds of logical volumes!
    • The string "all" followed immediately โ€” no space in between, fr fr โ€” by an integer from the range 1 to 32, to run that many Salvager subprocesses in parallel on partitions formatted as logical volumes. Again: only with such logical volumes ๐Ÿ’…

Also important: the BOS Server never starts more Salvager subprocesses than there are partitions, and it always starts only one process to salvage a single volume. And if you just omit this argument? Up to four Salvager subprocesses run in parallel, but partitions on the same device get salvaged serially. The way it juggles ๐Ÿ˜ฎโ€๐Ÿ’จ

  • -tmpdir <name of dir to place tmp files> โ€” names a local disk directory where the Salvager drops the temp files it makes during a salvage, instead of writing them to the partition being salvaged (which is the default). And if it can't write to the directory you gave it, it just goes back to trying the partition being salvaged ๐Ÿคทโ™€๏ธ
  • -showlog โ€” displays on the standard output stream all the log data that's being written to the /var/log/openafs/SalvageLog file. Live commentary, iconic ๐Ÿ“บ
  • -showsuid โ€” displays a list of the pathnames for all files that have the setuid or setgid mode bit set ๐Ÿ”
  • -showmounts โ€” records every mount point found in each volume into the /var/log/openafs/SalvageLog file. But ngl โ€” the Salvager does not repair corruption in the volumes if any exists. It's just showing you the receipts, not fixing anything ๐Ÿซ 
  • -orphans (ignore | remove | attach) โ€” controls how the Salvager deals with orphaned files and directories. Choose one of these three:
    • ignore โ€” leaves the orphaned objects on the disk, but prints a message to the /var/log/openafs/SalvageLog file saying how many orphans it found and roughly how many kilobytes they're eating. This is the default if you omit the -orphans argument ๐Ÿ“
    • remove โ€” removes the orphaned objects, and prints a message to the /var/log/openafs/SalvageLog file saying how many orphans got removed and roughly how many kilobytes they were consuming.
    • attach โ€” attaches the orphaned objects by creating a reference to them in the vnode of the volume's root directory. And since each object's real name is lost at this point, the Salvager just assigns each one a name like this:
"__ORPHANFILE__.index" for files.
"__ORPHANDIR__.index" for directories.

where index is a two-digit number that uniquely identifies each object. These orphans get charged against the volume's quota and they show up in the output of the ls command when you run it against the volume's root directory. Surprise adoption arc ๐ŸŒˆ

  • -help โ€” prints the online help for this command. And every other valid option? Ignored. Sorry to them ๐Ÿ’€

โœจ EXAMPLES โœจ

This command tells the Salvager to go try and salvage the volume with volume ID 258347486 on /vicepg on the local machine:

% /usr/lib/openafs/dasalvager -partition /vicepg -volumeid 258347486

๐Ÿ‘‘ PRIVILEGE REQUIRED ๐Ÿ‘‘

To run this command at the shell prompt, you gotta be logged in as the local superuser "root". Main character energy only, bestie ๐Ÿ’…


๐Ÿ”— SEE ALSO ๐Ÿ”—

BosConfig(5), SalvageLog(5), bos_create(8), bos_getlog(8), bos_salvage(8), vos_move(1)


IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.


that's the whole thing bestie, we made it ๐ŸŽ€ this was the OpenAFS manual page for DASALVAGER(8), dated 2026-07-27 โ€” go forth and salvage responsibly, i'm obsessed with you ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from