Hi William,

since we are actually defining 'user interface' for dealing
with disk/partition/slice configuration in AI, I think that
before we dig too much into implementation, we might
need to investigate set of use cases we would like
to support taking into account needs and expectations of target
audience we would like to attract.

I think we might find some inspiration by taking a look
at existing interactive (gparted, fdisk, format, ...) as well
as non-interactive (jumpstart, ...) versions of tools providing
that functionality in order to determine what we might expect
with respect to the needs of potential AI users regarding
set of features/levels of complexity/ usability, ...

Thank you,
Jan


For instance:
* disk
  - pick up boot disk
  - pick up two disks for ZFS mirror
  - pick up disk meeting specified criteria
    - devid, serial number, size, disk name
...

* partition
   - create Solaris partition or logical volume
     - use the biggest unallocated chunk of space
     - size specified
     - full info specified (start, size)

   - create non-Solaris partition or logical volume
     - by specifying number?, type, size

   - delete partition or logical volume
     - by type
     - by geometry (number or start)

   - resize extended partition (in non-destructive way)

   - create fully specified fdisk partition table
     in similar way 'fdisk -F' supports

...



William Schumann wrote:
> Through the automated installer, fdisk partitions and VTOC slices can be 
> designed and managed on target disks.
>
> These features are not yet documented or specified.  I am appending a 
> document that describes the current implementation.  I am seeking 
> feedback on functionality, both current and proposed, ideas for 
> enhancements, and I would like for us to reach a consensus on how this 
> should work.
> ------------------------------------------------------------------------------------------------------------------------------------------------
> Automated Installer fdisk partition and VTOC slice management options
>
> This is configured through an XML manifest that conforms to the Relax NG 
> schema file, ai_manifest.rng.
>
> fdisk partition operations (x86-only):
>     create:
>         Creates a partition at a sector address of a given length in sectors
>
>                     <element name="partition_number"> - required by 
> parser, but otherwise ignored
>                     <element name="partition_start_sector">
>                     <element name="partition_size"> - length in sectors
>                     <element name="partition_type"> - required by 
> parser, but otherwise ignored
>                 creates Solaris2 only
>
>         Current behavior details:
>             -If partition size is zero, space to end of disk is allocated
>             -when overlapping partitions are defined, fdisk detects this 
> and fails
>             -coded, not in repo: added element for specifying partition 
> size units
>
>         Changes to consider:
>             -make partition type optional with a default of Solaris2
>             -require Solaris2 only or support creation of other 
> partition types
>             -if partition_size is not specified,
>                 create partition, to end of disk or start of next partition
>             -if partition already exists and is of indicated size,
>                 log and return success instead of failing
>            
>     delete:
>         Deletes a partition of specified length at specified sector
>
>                     <element name="partition_number"> - required by 
> parser, but otherwise ignored
>                     <element name="partition_start_sector">
>                     <element name="partition_size"> - length in sectors
>                     <element name="partition_type"> - required by 
> parser, but otherwise ignored
>
>         Current behavior details:
>             exact match required on start sector and size
>
>         Changes to consider:
>             -either eliminate partition number element or implement 
> 'delete by partition number'
>             -add feature to create partition of a given size in the 
> unoccupied block that fits best
>                 -in the same way it is currently done for slices (below)
>                 -user would not have to specify starting sector
>                 -this would be the behavior if a starting sector was not 
> specified
>
> VTOC slice operations (x86 or SPARC):
>     create:
>         Create a VTOC slice given number and size
>
>         <element name="slice_number">
>         <element name="slice_size"> - length in sectors
>
>         Current behavior details:
>             -uses best fit policy for choosing location of slice
>             -if slice_size is zero, creates slice using largest free region
>             -installation always in slice 0
>             -swap/dump slice may be created using slice 1,
>                 unless user creates or preserves slice 1,
>             -if slice already exists, failure
>         Changes to consider:
>             -add slice size units, defaulting to MB
>             -if slice_size element is missing,
>                 create slice, using largest available unallocated space
>             -if slice already exists and is of indicated size,
>                 log and return success instead of failing
>     delete:
>         Delete listed slices by number
>
>         <element name="slice_number">
>         <element name="slice_size"> - required by parser, but otherwise 
> ignored
>
>         Current behavior details:
>             if slice does not exist, failure
>     preserve:
>         Preserve listed slices, implicitly deleting any slices not named 
> in manifest
>
>         <element name="slice_number">
>         <element name="slice_size"> - required by parser, but otherwise 
> ignored
>
>         Current behavior details:
>             if slice does not exist, failure
>
> Disk target contents
>     Selection criteria:
>         <element name="target_device_use_solaris_partition"> - boolean: 
> "true"or "false"
>             If "true", signals AI to select a disk that already has a 
> Solaris2 partition
>         Other selection criteria:
>             <element name="target_device_name">
>                 <!-- device name like c0t0d0 or MPXIO name like 
> c0t2000002037CD9F72d0 -->
>             <element name="target_device_type">
>             <element name="target_device_vendor">
>             <element name="target_device_size">
>        
>             Changes to consider:
>                 add "target_device_devid_contains" - user specifies a 
> substring of the devid
>     Other disk target contents:
>     <element name="target_device_overwrite_root_zfs_pool">
>         Cannot find where this is currently implemented
>
> Overall changes to consider:
>     ?
>
> Notes:
>     any failures mentioned here result in install failure
>     1 sector = 512 bytes
>
> The remainder of this message is code segments for reference.
>
> Excerpts from auto_install.h:
> typedef struct {
>     char        diskname[MAXNAMELEN];
>     char        disktype[MAXNAMELEN];
>     char        diskvendor[MAXNAMELEN];
>     uint64_t    disksize;
>     char        diskusepart[6];        /* 'true' or 'false' */
>     char         diskoverwrite_rpool[6];    /* 'true' or 'false' */
> } auto_disk_info;
>
> typedef struct {
>     char        partition_action[MAXNAMELEN];
>     int        partition_number;
>     uint64_t    partition_start_sector;
>     uint64_t    partition_size;
>     int        partition_type;
> } auto_partition_info;
>
> typedef struct {
>     char        slice_action[MAXNAMELEN];
>     int        slice_number;
>     uint64_t    slice_size;
> } auto_slice_info;
>
> Excerpts from Relax NG schema ai_manifest.rng:
> <!--
> =======================================================================
> Selections for AI target Device specification
> =======================================================================
> -->
> <define name="ai_target_device_contents">
>     <interleave>
>         <optional>
>         <!-- device name like c0t0d0 or
>              MPXIO name like c0t2000002037CD9F72d0 -->
>             <element name="target_device_name">
>                 <text/>
>             </element>
>         </optional>
>         <optional>
>             <element name="target_device_type">
>                 <text/>
>             </element>
>         </optional>
>         <optional>
>             <element name="target_device_vendor">
>                 <text/>
>             </element>
>         </optional>
>         <optional>
>             <element name="target_device_size">
>                 <text/>
>             </element>
>         </optional>
>         <optional>
>             <element name="target_device_use_solaris_partition">
>                 <data type="boolean"/>
>             </element>
>         </optional>
>         <optional>
>             <element name="target_device_overwrite_root_zfs_pool">
>                 <data type="boolean"/>
>             </element>
>         </optional>
>     </interleave>
> </define>
>
> <!--
> =======================================================================
> Selections for AI target device partitions specification
> =======================================================================
> -->
> <define name="ai_device_partitioning_contents">
>     <interleave>
>         <element name="partition_action">
>             <choice>
>                 <value>create</value>
>                 <value>delete</value>
>             </choice>
>         </element>
>         <element name="partition_number">
>             <data type="unsignedByte"/>
>         </element>
>         <element name="partition_start_sector">
>             <data type="unsignedLong"/>
>         </element>
>         <element name="partition_size">
>             <data type="unsignedLong"/>
>         </element>
>         <element name="partition_type">
>             <data type="unsignedByte"/>
>         </element>
>     </interleave>
> </define>
>
> <!--
> =======================================================================
> Selections for AI target device vtoc slices specification
> =======================================================================
> -->
> <define name="ai_device_vtoc_slices_contents">
>     <interleave>
>         <element name="slice_action">
>             <choice>
>                 <value>create</value>
>                 <value>delete</value>
>                 <value>preserve</value>
>             </choice>
>         </element>
>         <element name="slice_number">
>             <data type="unsignedByte"/>
>         </element>
>         <element name="slice_size">
>             <data type="unsignedLong"/>
>         </element>
>     </interleave>
> </define>
>
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss


Reply via email to