HP: Creating Logical volumes


Standard disclaimer: Use the information that follows at your own risk. If you screw up a system, don't blame it on me...
mailto: dkoleary@olearycomputers.com

Logical volumes can be used either for filesystems or for RDBMS raw partitions. Either way, the procedure for creating them are the same:

  1. Create a volume group which will hold the logical volume. Please see Creating Volume Groups

  2. Determine how to place the LV on the VG's disks.
    1. Default - LVM will handle the LV placement:

      lvcreate -L ${Size-megs} ${vg}

    2. Manual - Sysadmin determines where LV goes.
      1. Set an array of disks on which the LV will reside

        set -A disks $(list_o_disks)

      2. Create the logical volume definition:

        lvcreate -i ${num of disks to stripe across} \
        > -I ${stripe_size} -n ${lvol_name} ${vg}
      3. Expand the LV to the appropriate size:

        lvextend -L ${Size-megs} ${lv} ${disks[*]}

  3. If appropriate, create a filesytem. Please see Creating Filesystems for details.

Document:
URL:
Last updated: