ref: 56bd332994102b4e194819abb5e087a8895452f9
dir: /man/mafs.4/
.TH MAFS 4 .SH NAME mafs, mfs - disk file system servers .SH SYNOPSIS .B disk/mafs [ .B -Ds ] [ .B -n .I service ] [ .B -r .I service ] [ .B -m .I nmemunits ] [ .B -h .I nbuckets ] [ .B -w .I npendingwrites ] .B file .PP .B disk/mfs [ .B -Ds ] [ .B -n .I service ] [ .B -r .I service ] [ .B -m .I nmemunits ] [ .B -h .I nbuckets ] .B file .SH DESCRIPTION .I Mfs and .I Mafs are user space file servers that run on a single partition. .PP The options are: .TF "n name" .TP .I file Use .I file as the disk. .TP .BI "-n " service Use .I service as the name of the service instead of the .I service provide with -r, just for this run. mafs posts the file /srv/service that can be used to mount this filesystem. .TP .BI "-r " service Ream the file system, erasing all of the old data. Use .I service as the name of the service. mafs posts the file /srv/service that can be used to mount this filesystem. .TP .B -s Read and write protocol messages on standard file descriptors zero and one. .TP .BI "-m " nmemunits Allocate .I nbuckets hash buckets to use for Iobuf cache. Each bucket links into a least recently used circular linked list of Iobuf's. .TP .BI "-h " nbuckets Allocate .I nbuckets hash buckets to use for Iobuf cache. Each bucket links into a least recently used circular linked list of Iobuf's. .TP .BI "-w " npendingwrites Allocate .I nbuckets hash buckets to use for Iobuf cache. Each bucket links into a least recently used circular linked list of Iobuf's. .TP .BI "-a " announce-string will announce and listen on the specified network address. .PD .SH EXAMPLES Ream and start single process M[a]fs on a disk and also mount it for use. .IP .EX mount -c \\ <{disk/mafs -s -r mafs_myservice mydisk <[0=1]} \\ /n/mafs_myservice .EE .PP Ream and start multiple-process mafs on a disk. .IP .EX disk/mafs -r mafs_myservice mydisk mount -c /srv/mafs_myservice /n/mafs_myservice .EE .PP Ream and start mafs on a file. Also, mount thet filesystem at /n/mafs_myservice. .IP .EX dd -if /dev/zero -of myfile -bs 512 -count 128 # 64KB file mount -c \\ <{disk/mafs -s -r mafs_service myfile <[0=1]} \\ /n/mafs_myservice # to reuse the contents of myfile later, remove -r (ream). mount -c <{disk/mafs -s myfile <[0=1]} /n/mafs_myservice .EE .PP Prepare and use a disk (/dev/sdF1) for mafs. .IP .EX disk/fdisk -bawp /dev/sdF1/data # partition the disk # add an fs plan 9 partition to the disk echo ' a fs 9 $-7 w p q' | disk/prep -b /dev/sdF1/plan9 disk/mafs -r mafs_sdF1 /dev/sdF1/fs # -r to ream the disk mount -c /srv/mafs_sdF1 /n/mafs_sdF1 # for using the mafs file system on the disk later on disk/mafs /dev/sdF1/fs # no -r mount -c /srv/mafs_sdF1 /n/mafs_sdF1 .EE .PP Starting mafs on a RAM file. The below commands create a ramfs filesystem to use as a disk. .IP .EX ramfs -m /n/mafs_ramfs touch /n/mafs_ramfs/file dd -if /dev/zero -of /n/mafs_ramfs/file -count 700 -bs 1m disk/mafs -r mafs_ramfs_file /n/mafs_ramfs/file mount -c /srv/mafs_ramfs_file /n/mafs_ramfs_file .EE .SH SOURCE .B /sys/src/cmd/mafs .SH "SEE ALSO" .IR mafs (8), .IR prep (8), .IR sd (3) .br M[a]fs - Plan 9 userspace file system