File system creation procedure

Before creating local volumes there must be a volume group with enought free space to contain the following logical volumes: lvpd, lvpsf and lvpsfs. Those three logical volumes will be mounted on the following directories: /var/pd, /var/psf and /var/psf/segments.

If you have multiple hard drives available, you can create the required volume group on more than one disk. Striping across those disks provides faster I/O performance which is useful when driving high speed/high resolution printers.

We assume that the volume group is created and it's name is vgname.

  1. Create lvpd logical volume

    Commandline:

    lvcreate -L 1024M -n lvpd vgname
    The above command creates lvpd logical volume with 1024MB in size, on vgname volume group.

    To force lvpd logical volume on a specific disk/partition use the following command (assuming that /dev/sdf has at least 5 partitions):

    lvcreate -L 1024M -n lvpd vgname /dev/sdf5

    To verify that the logical volume has been created execute the following command:

    lvs /dev/vgname/lvpd

    To see the physical drives on which lvpd resides, run the following command:

    lvs /dev/vgname/lvpd -o devices

  2. Create lvpsf logical volumes

    Commandline:

    lvcreate -L 1024M -n lvpsfs vgname

  3. Create lvpsfs logical volume

    Commandline:

    lvcreate -L 1024M -n lvpsfs vgname

  4. Create file systems in logical volumes

    After all logical volumes have been created, you must create filesystems on them. In this example we use xfs filesystem, but you can choose one of these supported Linux filesystems: ext3, ext4, xfs, or btrfs.

    Run the following commands for xfs:

    mkfs.xfs /dev/vgname/lvpd
    
    mkfs.xfs /dev/vgname/lvpsf
    
    mkfs.xfs /dev/vgname/lvpsfs

  5. Mount the file systems

    Create directories /var/pd, /var/psf and /var/psf/segments.

    Each logical volume should be mounted on his own directory:

    mount /dev/vgname/lvpd /var/pd
    
    mount /dev/vgname/lvpsf /var/psf
    
    mount /dev/vgname/lvpsfs /var/psf/segments
    Note: /var/psf/segments is mounted after /var/psf

    To make mounts persistent after reboot add the following lines in /etc/fstab file:

    /dev/vgname/lvpd /var/pd xfs defaults 1 2
    
    /dev/vgname/lvpsf /var/psf xfs defaults 1 2
    
    /dev/vgname/lvpsfs /var/psf/segments xfs defaults 1 2