idea: vnconfig '-l' ?
c.turner at 199technologies.org
Thu Jul 5 19:34:43 PDT 2007
I'm looking at using vnode disks for jails, image building, etc,
and would like to write a scripting interface against vnconfig
I'd prefer it to dynamically select the vn device, to keep from having
to do the housekeeping of statically configuring various vn devices, etc
but it seems there is no way to determine if a vn device file is in use
without actually trying to attach it (which I suppose is one way to do it).
For now, I'll probably just do the static mapping, but if I *were* to
investigate some creating some kind of '-l' (list) support for vnconfig,
what would be the best way to approach it?
- add some kind of global 'STATUS' ioctl to sys/dev/disk/vn/vn.c
- have vnconfig dump this
- add some kind of per-vn 'STATUS' ioctl to sys/dev/disk/vn/vn.c
- have vnconfig iterate over a glob on /dev/vn*, checking this IOCTL
(or alternately, files of appropriate major/minor type)
or some kind of combination between these
but perhaps there is some other kernel structure that could just be
dumped somehow without the ioctl.. forgive me for not researching how
this works too thoroughly - just a quick idea+scan, that may not bear
fruit, just throwing it out there..
Thanks in advance,
More information about the Submit