9mount(1)

πŸ’– 9mount(1) β€” User commands πŸ’–

okay bestie, sit down, we're learning 9mount today and honestly? it's giving essential. this is the family of lil tools that mount and unmount 9p filesystems β€” you got 9mount, you got 9bind, you got 9umount, they're a trio, a girl group, and they all live in the same page. periodt. 🌸


✨ SYNOPSIS ✨

9mount [ insuvx ] [ -a SPEC ] [ -c CACHE ] [ -d DEBUG ] [ -m MSIZE ]
DIAL MOUNTPT

9bind OLD NEW

9umount MOUNTPT

πŸ¦‹ DESCRIPTION πŸ¦‹

so. 9mount mounts a 9p filesystem that's being served at DIAL onto MOUNTPT, and that's the whole vibe. two rules tho, no cap: MOUNTPT must be writable by you, and it must not be sticky. that's the vibe check and you gotta pass it. πŸ’…

DIAL is a dial string, and it's gotta assume one of these forms (pick one, queen):

unix!SOCKET
tcp!HOST[!PORT]
virtio!CHANNEL
-

where, let me break it down fr fr:

  • SOCKET β€” the name of a file representing a socket 🧦
  • HOST β€” a hostname 🌐
  • PORT β€” a port number or a service name πŸ”’
  • CHANNEL β€” a virtio channel name (currently ignored, she's just there for the aesthetic πŸ™ˆ)
  • - β€” means 9p messages should be read/written on stdin/stdout ⭐

and 9mount has several options. here they are, all of them, every single one, because we do not skip. πŸ‘‘

🌈 OPTIONS 🌈

  • -0 β€” allow setuid files to be served (root only, so if you're not root, don't even try it bestie)
  • -i β€” mount the file system with your uid/gid 🫢
  • -n β€” dry-run: print the mount command to stderr but don't actually mount anything. rehearsal, not the performance 🎭
  • -s β€” single attach mode β€” all users accessing the mount point see the same filesystem (by default they'll each see a unique attach, iconique behaviour honestly)
  • -u β€” use the 9P2000.u extensions ✨
  • -v β€” allow device files to be served (root only again, sorry babe)
  • -x β€” exclusive access β€” other users cannot access the mount point πŸ”’
  • -a SPEC β€” SPEC determines which file tree to mount when attaching to file servers that export multiple trees 🌳
  • -c CACHE β€” turns on caching using CACHE mode. supported modes are loose (suitable for exclusive read-only mounts), fscache, and mmap πŸ’Ύ
  • -d DEBUG β€” comma seperated list of channels for which to enable debug output. possible channels include: err, devel, 9p, vfs, conv, mux, trans, alloc, fcall πŸ›
  • -m MSIZE β€” specifies the maximum length of a single 9p message in bytes. Must be less than or equal to 8192 for non-root users πŸ“

and then the other two members of the group chat:

  • 9bind performs a bind mount, making the tree visible at directory OLD also visible at mount point NEW πŸͺ„
  • 9umount unmounts a 9p filesystem previously mounted by you (yes, by you specifically, it's personal) 🫡

🌸 ENVIRONMENT 🌸

  • $USER β€” the uname to provide to the server. that's it, that's the whole section, she's lowkey chill πŸ’œ

πŸŽ€ EXAMPLES πŸŽ€

here's where it gets fun, actual receipts:

9mount -i 'unix!/tmp/ns.'$USER'.:0/factotum' $HOME/n/factotum

mount p9p's factotum interface β€” the classic 🧚

9mount 'tcp!sources.cs.bell-labs.com' $HOME/n/sources

import plan 9's "sources" β€” vintage, iconic, no notes πŸ‘‘

9mount -u -a/home/sqweek/mail 'tcp!wren!5640' $HOME/mail

import my maildir from my server(wren), being served by ufs πŸ“¬

9mount -i 'tcp!wren' $HOME/n/wren; 9bind $HOME/n/wren/home/sqweek/mail $HOME/mail

again importing my maildir, this time serving via u9fs β€” look at her, she's doing a chained command, main character energy fr fr πŸ”₯


πŸ’€ BUGS πŸ’€

okay now the part where we hold hands and read the fine print, because these are real and you need to know them:

  • 9mount truncates user names and SPECs to 249 characters. 9umount doesn't know this, so you won't be able to unmount anything outside your home directory. But you probably never bother logging out if your user name is that long. 😭 (she's read you to filth and she's right)
  • 9mount doesn't update /etc/mtab. like, at all. πŸ™ˆ
  • 9bind only does a "shallow", non-recursive bind β€” any mounted filesystems under the OLD tree will not appear mounted in the NEW tree. this one bites people, so watch out 😬
  • If you 9bind a non-9p filesystem outside your home directory, 9umount won't let you unmount it. rude, but true πŸ’…

✨ AUTHOR ✨

sqweek@gmail.com β€” ty for your service legend 🫑


⭐ SEE ALSO ⭐


and that's the page, bestie!! you're so ready for this 🫢

this was 9mount(1) from the User commands manual, page version/date 23 July 2008 β€” mwah, catch you in the next manpage πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from