wiki:Doc/BasicConfig/AII

Version 4 (modified by jouvin, 16 years ago) (diff)

--

Initial Installation

This is a quick introduction to AII configuration. AII is Quattor component in charge of producing Kickstart configuration file used for initial installation.

Configuration specific to initial installation is made of 2 parts :

  • AII_xxx variables used to configure base environment (keyboard, language...). This works both for v1 and v2.
  • Filesystems and block devices definitions : this is specific to AII v2.

AII Variables

All AII options may be customized through variables. For the complete list, look at standard/aii/quattor/ks/config.tpl and standard/aii/quattor/pxe/config.tpl.

A typical AII configuration is :

# AII specific parameters
variable AII_OSINSTALL_SRV ?= "quattorsrv.lal.in2p3.fr";
# variable AII_ACKSRV ?= "quattorsrv.lal.in2p3.fr";
variable AII_OSINSTALL_ROOT = '/packages/os';
# Standard Kickstart configuration template for IPN machines
variable AII_OSINSTALL_TEMPLATE ?= "lal_sl_ks.cfg";

File Systems and Block Devices

In AII v2, block devices and file systems are declared separatly.

File Systems

Filesystems are declared as an ordered list allowing to customize different aspect of a file system (mount point, mount options, format, ...). Each file system in the list is described as a nlist. One property in the nlist describing a file system is block device : its value is an entry in the structure describing block devices (physical disk, logical volumes, ...). To add or modify a filesystem on a system, it is recommended to use 'fileystem_mod` function. An example is :

"/system/filesystems" = filesystem_mod(
  list(nlist ("block_device", "partitions/" + DISK_PART_BOOT,
              "mountpoint", "/boot",
              "format", true,
              "mount", true,
              "preserve", false,
              "type","ext2"),
       nlist ("block_device", "partitions/" + DISK_PART_SWAP,
              "format", true,
              "mount", true,
              "preserve", false,
              "type","swap",
              "mountpoint","swap"),
       nlist ("block_device", "partitions/" + DISK_PART_ROOT,
              "format", true,
              "preserve", false,
              "mount", true,
              "type","ext3",
              "mountpoint","/"),
       nlist ("block_device", "logical_volumes/usrvol",
              "format", true,
              "preserve", false,
              "mount", true,
              "type","ext3",
              "mountpoint","/usr"),
);

Look at sites/example/filesystems/glite.tpl for more details.

Block Devices

Block devices define logical and physical devices used by file systems. They can be logical devices, HW or SW raid devices, physical disks... A block device can be made of other block devices, for example a logical device is made of one or more physical devices.

Unlike file systems which are described with an ordered list, block devices are defined as a nlist. At installation time, they are processed (partition creation, logical volume creation...) in the order of file systems who use them.

Several functions are available to help in declaration of block devices, in particular :

  • partition_add(PHYS_DISK,partition_nlist) : allow to add entries efficiently in /system/blockdevices/partitions nlist.
  • lvm_add(VOL_GROUP,logvol_nlist) : allow to add entries efficiently in /system/blockdevices/logical_volumes nlist.

An example of block device definition is :

"/system/blockdevices/physical_devs" = npush (
  DISK_BOOT_DEV, nlist ("label", "msdos")
);

"/system/blockdevices/partitions" = partitions_add (DISK_BOOT_DEV, nlist (DISK_PART_BOOT, 64*MB,
                                                                          DISK_PART_SWAP, 4*GB,
                                                                          DISK_PART_ROOT, 1*GB,
                                                                          DISK_PART_LOGPARTS, -1
                                                                         )
                                                   );
    
"/system/blockdevices/volume_groups" = npush (
    "vg0", nlist ("device_list", list ("partitions/" + DISK_PART_LOGPARTS))
);

"/system/blockdevices/logical_volumes" = lvs_add ("vg0", nlist("usrvol", 5*GB,
                                                               "homevol", 512*MB,
                                                               "tmpvol", 1*GB,
                                                               "varvol", -1,
                                                              )
);

Look at sites/example/filesystems/glite.tpl for more details.