vzfsync(8)

πŸ“¦ version 4.9.4, in ubuntu jammy

πŸ’– vzfsync β€” the lil' sync bestie πŸ’–

okay so before we even get into it: this is vzfsync, a page from the Containers manual, and she is exactly what she sounds like. a tiny utility whose whole personality is "make the disk actually know about these files". slay.


✨ NAME ✨

vzfsync β€” perform fsync/fdatasync/fadvise on files 🫢


🌸 SYNOPSIS 🌸

vzfsync { -s,--sync | -d,--datasync } [-n,--dontneed] file [file ...]

vzfsync --help

so yeah bestie, you're picking one of -s or -d (not both, the braces said so πŸ’…), optionally adding -n, and then throwing as many file names at her as you want.


πŸ¦‹ DESCRIPTION πŸ¦‹

This utility runs fsync(2) or fdatasync(2) on every single file name you hand her. every one. she does not skip. she does not get tired.

She can also, if you ask nicely, do a posix_fadvise(2) with the argument POSIX_FADV_DONTNEED. optional lil' bonus move ✨

Now here's the lore, iykyk: she gets called from inside the vzmigrate(8) utility during live migration β€” right after copying ploop delta files, and before suspending a container. she syncs those freshly-copied files to disk so that the later ploop mount is faster and, ultimately, so the container's frozen time is shorter. she's the queen of "let's not make the container sit there frozen longer than it has to". main character energy, fr fr πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -s, --sync β€” perform fsync. classic. iconic. she flushes it all the way down. πŸ“
  • -d, --datasync β€” perform fdatasync. same vibe, but it's the data-flavoured one. 🌸
  • -n, --dontneed β€” perform posix_fadvise(POSIX_FADV_DONTNEED). the "we're done here, you can let go of the cache" move. πŸ’œ
no cap, you need -s or -d β€” the synopsis literally put them in { } together. don't try to be different.

⭐ EXIT STATUS ⭐

Returns 0 when everything went great πŸŽ€ β€” otherwise she gives you the appropriate error code, and she means it:

  • 1 β€” invalid usage. you did the arguments wrong, bestie 😭
  • 2 β€” failed to perform some requested operations on one or many files. she tried. something said no. πŸ’€

🌈 SEE ALSO 🌈

fsync(2), fdatasync(2), posix_fadvise(2).


πŸ‘‘ LICENSE πŸ‘‘

Copyright (C) 2014, Parallels, Inc. Licensed under GNU GPL v2.


okay that's the whole page, you ate it, go sync something πŸ’–

this was brought to you by OpenVZ, dated 31 Mar 2014, and yes, the page really is called vzfsync(8) β€” obsessed with her πŸŽ€βœ¨

πŸ“¦ where this page comes from