NAME

lcfg-fstab - LCFG fstab component

DESCRIPTION

The fstab component partitions disks and maintains the /etc/fstab file.

The /etc/fstab is first constructed from the partition information specified for the hard disks described by the disks and partitions_disk resources. The entries resource is then used to add additional fstab entries.

The adddisk method is used to add a new disk to the system. It will (optionally) partition the disk, make the filesystems and create /etc/fstab entries. It is called implicitly by the preparedisks method at system install time, but can be called manually thereafter to add new disks.

The mountdisks and umountdisks methods can be used to mount or unmount all configured disks. These are only intended for use when running the installroot for machine debugging/patching.

The UseDiskUUIDs method can be used to alter the contents of fstab templates found in the /var/lcfg/conf/fstab/ so that they refer to disk UUIDs instead of device names.

disks

A list of disks attached to this machine.

dopartition_disk

The component will partition the disk disk if this resource, is set to yes.

label_disk

The label type for disk disk. Can be either msdos or gpt. Defaults to msdos.

alignment_disk

The alignment value (in bytes) for disk disk. All partitions will be aligned by this value. Defaults to 512.

partitions_disk

A list of partitions for disk. If the label_disk resource is set to msdos a disk can only have up to 4 partitions (extended and logical partitions are not supported). If the label_disk resource is set to gpt a disk can have up to 32 partitions.

flags_disk

A string of single character boolean disk flags. A flag in uppercase sets that flag. A flag in lowercase unsets that flag. Currently, the only supported flags are 'P' and 'p' which sets and unset the pmbr_boot flag respectively.

size_partition

The size of the specified partition. The partition size can be given in megabytes, or be set to free to indicate that the partition should use up remaining disk space or be set to <existing> to indicate that the partition size and location should not be changed. If the partition is of type swap then size_partition may be set to redhat-autoswap. The size of the partition is then calculated automatically. See also the swap_algorithm resource.

type_partition

The type of filesystem of the specified partition. Currently supported partition types are ext2, ext3, ext4, raid, swap, xfs, encrypted-tmp and encrypted-swap. A partition of type encrypted-swap is a swap partition which is in encrypted in dm-crypt format. A partition of type encrypted-tmp is an ext4 partition also encrypted in dm-crypt format - it can be mounted at any mount point, but is typically mounted as /tmp. Partitions of both encrypted types are re-created at boot time, and are only available on GPT labelled disks.

mpt_partition

The mount point for the filesystem on the specified partition.

mkmpt_partition

Determines how the component should behave when the mount point already exists and is populated with files. Setting this resource to fail will cause a failure, ignore will ignore prexisting files and zap will delete any prexisting files.

mntopts_partition

Describes any mount options for the filesystem associated with the specified entry or partition.

cryptopts_partition

Specifies any crypttab options for the specified partition. (Fourth field of /etc/crypttab entry)

passno_partition

Describes the fsck passno for the specified entry or partition.

preserve_partition

This resource, if set to yes, indicates that the component should not rebuild the filesystem when the adddisk method is invoked.

mkprog_partition

The program to create the file system (or whatever) in the specified partition.

mkopts_partition

Any options to pass to the appropriate tool (e.g. mke2fs) for building the specified partition. Note that partitions of type xfs will always be made with the option -f in addition to whatever options are listed in this resource. To preserve an existing partition its preserve_partition resource should be set to yes.

name_partition

Can be used to specify a name for the specified partition when using a GPT labelled disk - useful for identifying the role of a partition when the fstab file isn't accessible.

mountby_partition

Specifies by which method the partition is mounted. Possible values are uuid and device. The default is device.

swap_algorithm

If partition has size_partition set to redhat-autoswap and type_partition set to swap then this resource can be used to control which algorithm is used to calculate the size of the swap partition. The component will choose an algorithm based on the value of this resource. The possible values are legacy (the RHEL6 algorithm); standard (the RHEL7 algorithm, without any allowance for hibernation); and hibernate (the RHEL7 algorithm, allowing for hibernation). If it is expected that the machine will ever enter a power-saving hibernation state, this resource should be set to hibernate.

entries

A list of additional <fstab> entries.

spec_entry

Describes the block special device or remote filesystem associated with the specified entry.

file_entry

Describes the mount point for the specified entry.

vfstype_entry

Describes the type of filesystem for the specified entry.

mntopts_entry

Describes any mount options for the filesystem associated with the specified entry or partition.

freq_entry

Describes the dump frequency for the specified entry.

passno_entry

Describes the fsck passno for the specified entry or partition.

updfstab

A list of extra entries for /etc/updfstab.conf. An entry can be either a device, upfdef_tag or an include file of further definitions updfile_tag.

updfdev_tag

A list of line references for the specified device.

updfline_tag_line

An individual line for the specified device.

updfile_tag

AUTHOR

Alastair Scobie <ascobie@inf.ed.ac.uk>

PLATFORMS

ScientificLinux6, EnterpriseLinux7