6602 lofi should support labeled devices

Review Request #120 - Created Nov. 29, 2015 and submitted

Information
Toomas Soome
illumos-gate
6602
2365e62...
Reviewers
general

6602 lofi should support labeled devices

first test:
lofiadm -a and lofiadm -la in GZ/LZ, same for delete, mapping files with/without content.

NOTE: with labeled lofi in local zone, the current code needs device match entries, like:
<device match="/dev/lofictl"/>
<device match="/dev/dsk/c0t1d0"/>
<device match="/dev/rdsk/c0t1d0
"/>
also, to mount filesystem, fs-allowed property must be set accordingly.

if the entry in zone config is missing, device node is not created even if file mapping succeeds; lofiadm will stay in loop (to find device nodes) for 2 minutes.

for second test, I have updated usbgen script (in distro-const package), to use labeled device for usb image creation:
root@beastie:/# ./usbgen /rpool/dc/media/OpenIndiana_Text_X86.iso /mnt/OpenIndiana_Text_X86.usb /tmp
fmthard: New volume table of contents now in place.
/dev/rdsk/c4t2d0s0: 1601536 sectors in 782 cylinders of 64 tracks, 32 sectors
782.0MB in 49 cyl groups (16 c/g, 16.00MB/g, 7680 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 32832, 65632, 98432, 131232, 164032, 196832, 229632, 262432, 295232,
1279232, 1312032, 1344832, 1377632, 1410432, 1443232, 1476032, 1508832,
1541632, 1574432
Copying ISO contents to USB image...
..................................................
..................................................
..................................................
..................................................
..................................................
....................
1339424 blocks
bootblock written for partition 0, 213 sectors starting at 50 (abs 2098)
stage1 written to partition 0 sector 0 (abs 2048)
stage1 written to master boot sector
=== ./usbgen completed at Mon Feb 1 00:55:16 EET 2016

updated usbgen is running ok in both global and local zone.

Additional tests after all the updates:

root@test:/home/tsoome# zlogin lz
[Connected to zone 'lz' pts/2]
Last login: Tue Jun 7 02:08:55 on pts/2
The Illumos Project SunOS 5.11 illumos-gate May 2016
root@lz:/root# lofiadm -a OpenIndiana_Text_X86.usb
/dev/lofi/1
root@lz:/root# lofiadm
Block Device File Options
/dev/lofi/1 /root/OpenIndiana_Text_X86.usb -
root@lz:/root# lofiadm -d OpenIndiana_Text_X86.usb
root@lz:/root# lofiadm -la OpenIndiana_Text_X86.usb
/dev/dsk/c0t1d0p0
root@lz:/root# lofiadm
Block Device File Options
/dev/dsk/c0t1d0p0 /root/OpenIndiana_Text_X86.usb Labeled
root@lz:/root# lofiadm -d OpenIndiana_Text_X86.usb
root@lz:/root# zone
zoneadm zonecfg zonename zonestat
root@lz:/root# zonename
lz
root@lz:/root# lofiadm
Block Device File Options
root@lz:/root#

Issues

  • 0
  • 94
  • 10
  • 104
Description From Last Updated
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Toomas Soome
Josef Sipek
Josef Sipek
Igor Kozhukhov
Yuri Pankov
Yuri Pankov
Yuri Pankov
Yuri Pankov
Garrett D'Amore
Robert Mustacchi
Toomas Soome
Robert Mustacchi
Toomas Soome
Toomas Soome
Toomas Soome
Robert Mustacchi
Robert Mustacchi
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...