Project

General

Profile

Actions

Bug #721

closed

idea: vnconfig '-l' ?

Added by c.turner almost 17 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hello all,

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?

thinking either:

- add some kind of global 'STATUS' ioctl to sys/dev/disk/vn/vn.c
- have vnconfig dump this

or

- add some kind of per-vn 'STATUS' ioctl to sys/dev/disk/vn/vn.c
(naming suggestion?)
- 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,

- Chris

Actions

Also available in: Atom PDF