Fdisk agent

The Fdisk agent is used to read and modify the partition information.

Path argument
=============

The following paths are supported, where <name> is the name of the
disk, without /dev:

*** New:
  The last component of the .disk... path is taken as the command
  All other path components between .disk and the command are taken
  as a file name (below /dev). This will support RAID devices which are
  not accessed as /dev/hdX or /dev/sdX but as (.e.g) /dev/X/Y

    .disk.<name>.partitions
	Read or write the partition table.  On writing the return value is
	true if successfull.
    .disk.<name>.bytes_per_unit:
	Return the size of a unit in the partition format (eg, cylinder).
	All other sizes are expressed in this unit.
    .disk.<name>.disk_size:
	Return the size of the disk.
    .disk.<name>.max_primary:
	Return the maximum number of primary partition that are possible.
    .disk.<name>.has_extended:
	Return whether the partition format supports the concept of
	extended partitions.


Read result / Write argument
============================

The partition table is a list of maps for every partition.  Each map
contains the following keys:

    "type": one of `primary, `extended, `logical
    "nr": the partition number
    "fsid": the file system id
    "fstype": the textual description of the file system id (ignored on
	      writing)
    "region": a list of two numbers
	      - the start of the partition
	      - the length of the partition
	      both expressed in units of bytes_per_unit.

On writing the following additional entries are recognised:

    "create": whether this partition should be created
    "delete": whether this partition should be deleted

Additional entries may be present and are ignored.

The Fdisk agent uses the parted program to read and write the partition
information.
