Step 1: Add Harddrive to System
Check with dmesg
[admin@ora87 ~]$ sudo dmesg |
[admin@ora87 ~]$ sudo cfdisk /dev/sda |
[root@ora87 ~]# pvcreate /dev/sda1 |
Step 4: Scanning for Block Devices
[root@ora87 ~]# lvmdiskscan |
Step 5: Displaying Physical Volumes :
There are three commands you can use to display properties of LVM physical volumes: pvs, pvdisplay, and pvscan.
The pvdisplay command provides a verbose multi-line output for each physical volume. It displays physical properties
(size, extents, volume group, etc.) in a fixed format.
[root@ora87 ~]# pvdisplay |
The pvscan command scans all supported LVM block devices in the system for physical volumes
[root@ora87 ~]# pvscan |
[root@ora87 ~]# vgcreate vg_oradata /dev/sda1 |
If you have more than one partition, you can add multiple partition in single command. This command creates a local volume
named vg_newlvm that contains physical volumes /dev/sda1 and /dev/sdb1 :
[root@ora87 ~]# vgcreate vg_oradata /dev/sda1 /dev/sdb1 |
Step 7: Creates a logical volume called oradata_vol that uses all of the unallocated space in the volume group vg_oradata :
[root@ora87 ~]# lvcreate --name oradata_vol -l 100%FREE vg_oradata |
Step 8: Display the created logical volumes :
[root@ora87 ~]# lvdisplay |
Step 9: Use the mkfs command to format a newly created LVM :
[root@ora87 ~]# mkfs.ext4 /dev/vg_oradata/oradata_vol |
[root@ora87 ~]# mkdir -p /oradata |
[root@ora87 ~]# mount /dev/vg_oradata/oradata_vol /oradata |
Step 11: Verify thew new disk layout :
[root@ora87 ~]# df -h |
Tidak ada komentar:
Posting Komentar