DragonFly kernel List (threaded) for 2007-12
DragonFly BSD
DragonFly kernel List (threaded) for 2007-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

vn(4) RFC Misc.


From: Chris Turner <c.turner@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 22 Dec 2007 15:41:29 -0500


Hello all. Hope this isn't too much to digest in one posting :)


Since DragonFly has gotten vkernel and new disklabels, Matt is working
on the HAMMER, vinum is unfortunately getting some in-tree bit rot, etc.
I'm sure everyone in df land is thinking / using / testing storage
related things in some capacity ..

In particular, I've been using lots of vn(4) disks, and trying
to keep track of which one goes where and gets assigned to what
vn device is a pain.

I know there is /etc/vntab, but it's always seemed a bit
cumbersome to me, either by having to maintain separate vntabs
for different sets of devices, or keeping vntab in synch with
fstab, etc.

Plus there's been some talk of growing support for secure storage,
which got me looking at the different way's vn's are being used
in all the BSDs.

I started to port over the OpenBSD 'mount_vnd' support in an effort
to work on '-K' and '-l' support, but was getting to the point where
it would be possibly a bit more work than I wanted to do without
support, so I thought I'd summarize things & send a note.

( that and this seemed more 'doable' than a vkernel.conf by
  the next release :)

anyhow, I'd like to start working on the stuff in 'comments',
but wanted to see what the reaction would be from the group
before I did (e.g. other things could be trimmed, etc).

Cheers,

- Chris

--8<--

goals:

  - rework vn to make it easier to use
  - glean useful features from others in the process
  - do some possible cleanup in the process

current state of the art as of 2007-12-22:

  - df vn: fb4 legacy vn - supports a 'vntab' w auto-mounting
    unsure of use w/r/t buffer cache as noted in open
  - fb5+? vn: utilities merged with md(4) and uses new 'mdconfig -f'
    userland utility. mount_mfs replaced by mdmfs += mount_mfs
    wrapper which creates, labels & formats, but also does vn disks.
    from the manual, mount_mfs appears to always format, so not sure how
    useful it is for multi-use vn's. Seems like overkill IMHO. Mdconfig
    has '-l' but uses GEOM.
  - ob vn: nb legacy raw or via buffer cache vn += blowfish, added
    mount_vnd interface as hardlink, which permits fstab usage,
    '-l'.
  - nb vn: nb raw vn += compression, '-l' support. Still have to vnconfig
    and then mount.


comparing vn related utilities:


 df: (vnconfig)
   -a Read a command file and performs the specified actions for each
   -c Configure the device.  If successful, references to special_file
   -d Disable (if possible) the specified feature.
   -e Configure the device and enables any feature that was specified.
   -f config_file
   -g Fiddle global options.
   -r flag
   -s flag
   -S value{k,m,g,t}
   -T When a regular file is specified, VN will ftruncate() the file to
   -Z When a regular file is specified, VN will zero the contents of
   -u Disable and ``unconfigure'' the device.
   -v Print messages to stdout describing actions taken.
   features: (for -e)
     swap    Swapping is enabled on the special file.  See swapon(2).
     mountro=mount_point
     mountrw=mount_point
     mount=mount_point

ob: (vnconfig / mount_vnd)
  -c vnconfig only.  Configures the device.  If successful, references
  -K rounds
  -k Associate an encryption key with the device.  All data will be
  -l vnconfig only.  List the (s)vnd devices and indicate which ones
  -o options (mount_vnd only.)
  -S saltfile
  -u vnconfig only.  Unconfigures a vnd_dev.
  -v vnconfig only.  Print messages to stdout describing actions

nb: (vnconfig)
  -c Configures the device.  If successful, references to vnode_disk
  -F Force unconfiguration if the device is in use. Doesnt imply '-u'
  -f disktab
  -l List the vnd devices and indicate which ones are in use.
  -r Configure the device as read-only.
  -u Unconfigures the device.
  -v Print messages to stdout describing actions taken.
  -z Assume that regular_file is a compressed disk image in cloop2

fb: (mdconfig)
  -a Attach a memory disk.  This will configure and attach a memory
  -d Detach a memory disk from the system and release all resources.
  -t type (malloc|vnode|swap)
  -f file Filename to use for the vnode type memory disk.
  -l List configured devices.  If given with -u, display details about
     that particular device
  -n When printing md device names, print only the unit number without
     the md prefix
  -s size Size of the memory disk.
  -S sectorsize
  -x sectors/track
  -y heads/cylinder
  -o [no]option (async|reserve|cluster|compress|force|readonly)
  -u unit

comments:

  thinking best, simplist combination of above features in order
  of priority / implementation desire & ease:

  - add mount_vnd interface to vnconfig, wipe vntab use
  - add '-l' support infrastructure (basically 1 ioctl, VNDIOCGET)
  - add keyed support per open
  - add compressed support per net
  - possibly move common label / device file expansion, etc related misc.
    into -lutil in process for use by other storage related code.

  This perhaps could lead to e.g. mount_ccd, etc types of things to
  simplify storage configuration, if that makes sense to do.

refs:

- http://leaf.dragonflybsd.org/cgi/web-man?command=vnconfig&section=ANY
- http://leaf.dragonflybsd.org/cgi/web-man?command=vn&section=4
- http://www.openbsd.org/cgi-bin/man.cgi?query=vnconfig&sektion=8&apropos=0&ma
npath=OpenBSD+Current&arch=i386
- http://www.openbsd.org/cgi-bin/man.cgi?query=vnd&sektion=4&arch=i386&apropos
=0&manpath=OpenBSD+Current
- http://netbsd.gw.com/cgi-bin/man-cgi?vnconfig++NetBSD-current
- http://netbsd.gw.com/cgi-bin/man-cgi?vnd+4+NetBSD-current
- http://www.freebsd.org/cgi/man.cgi?query=vnconfig&apropos=0&sektion=0&manpat
h=FreeBSD+6.2-RELEASE&format=html
- http://www.freebsd.org/cgi/man.cgi?query=md&sektion=4&apropos=0&manpath=Free
BSD+6.2-RELEASE
- http://www.freebsd.org/cgi/man.cgi?query=mdmfs&sektion=8&apropos=0&manpath=F
reeBSD+6.2-RELEASE


--
Chris Turner                                     199Technologies, LLC.
c.turner@199technologies.org



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]