[OpenIndiana-discuss] access to partition table inside zvol
Andrew Gabriel
illumos at cucumber.demon.co.uk
Thu Dec 29 19:59:22 UTC 2011
Evgenii Lepikhin wrote:
> 2011/12/23 Evgenii Lepikhin <johnlepikhin at gmail.com>:
>
>
>>> Looping back through iSCSI is the way.
>>>
>> But it's a bit complicated. No other way?
>>
>
> I have patched lofi subsystem to support offsets. If somebody
> interested, patch is attached.
>
There's been a long standing RFE outstanding for lofi to become aware of
disk labeling, so it can give device access to individual FDISK
partitions and slices (SunOS or GPT/EFI). Now that the driver disk
labeling code has been commoned up
(http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/cmlb.c),
this should be significantly easier to do than it was originally when
this code was sprinkled all over the various target drivers. I talked
about this at a LOSUG meeting probably a couple of years ago when
someone asked a question about doing something similar to what you want
to do. Proper label support would enable you do to access your EFI/GPT
slices using device nodes possibly something like:
/dev/lofi/1.d/s0, /dev/lofi/1.d/s1, etc
IIRC, the suggestion which was floated at the LOSUG discussion for a
labeled loopback block device was to have something like:
/dev/lofi/1 -> 1.d/p0
/dev/lofi/1.d/p0
/dev/lofi/1.d/p1
/dev/lofi/1.d/p2
/dev/lofi/1.d/p3
/dev/lofi/1.d/p4
/dev/lofi/1.d/s0
/dev/lofi/1.d/s1
/dev/lofi/1.d/s2
/dev/lofi/1.d/s3
...etc
and likewise for /dev/rlofi/...
Offset support in lofi might be a good idea too for other reasons, but
in my view, something more automatic like the above should be used to
handle the more common cases of partitions/slices.
--
Andrew Gabriel
More information about the OpenIndiana-discuss
mailing list