Logical volumes can be used either for filesystems or for RDBMS raw partitions. Either way, the procedure for creating them are the same:
- Create a volume group which will hold the logical volume. Please see Creating Volume Groups
- Determine how to place the LV on the VG's disks.
- Default - LVM will handle the LV placement:
lvcreate -L ${Size-megs} ${vg}
- Manual - Sysadmin determines where LV goes.
- Set an array of disks on which the LV will reside
set -A disks $(list_o_disks)
- Create the logical volume definition:
lvcreate -i ${num of disks to stripe across} \
> -I ${stripe_size} -n ${lvol_name} ${vg} - Expand the LV to the appropriate size:
lvextend -L ${Size-megs} ${lv} ${disks[*]}
- If appropriate, create a filesytem. Please see Creating Filesystems for details.
|
|