Project

General

Profile

Actions

Feature #10598

closed

loader: implement map-vdisk and unmap-vdisk commands

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2019-03-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Add map-vdisk and unmap-vdisk commands to create virtual disk interface on top of file. This will allow to use disk image from file system to load and start the kernel.

By mapping file, we create vdiskX device, the device will be listed by lsdev [-v] and can be accessed directly as ls vdisk0p1:/path or can be used as value for currdev variable.

vdisk strategy function does not use bcache as we have bcache used with backing file. vdisk can be unmapped when all consumers have closed the open files.

In first iteration we do not support the zfs images because zfs pools do keep the device open (there is no "zpool export" mechanism). Adding zfs support is relatively simple, we just need to run zfs disk probe after mapping is done.

Actions #1

Updated by Electric Monk about 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit f47697518b642104e6a9bc6906310e54030d2dc5

commit  f47697518b642104e6a9bc6906310e54030d2dc5
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-15T06:06:44.000Z

    10598 loader: implement map-vdisk and unmap-vdisk commands
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF