#############Logical Volume Manager and Raid##################
Keywords:
Physical Volume (PV) Volume Group (VG) Physical Extended (PE)
Logical Volume Manager (LVM)
Commands:
pvcreate, pvdisplay, vgcreate, vgdisplay, lvcreate, lvdisplay, vgextend. Vgreduce, lvextend, lvreduce, pvremove,vgremove, lvremove
Partitions:
Create a New FileSystem
fdisk /dev/hda
Partition type: t,8e
partprobe /dev/hda, mkfs –j /dev/hda
pvcreate /dev/hda*, pvdisplay /dev/hda*
Volume Group:
Vgcreate /dev/vg0 /dev/hda6 /dev/hda7 /dev/hda8
Vgdisplay /dev/vg0
Logical Volume Manager:
lvcreate –l 700 /dev/vg0 –n lvm0
Format the LVM Group:
mkfs –j /dev/vg0/lvm0
Mount:
Mount /info
Mount /dev/vg0/lvm0 /info
Infuture you want to Increase Size
pvcreate /dev/had
vgextend /dev/vg0 /dev/had*
lvextend –L +1800M /dev/vg0/lvm0
Online we can resize
Resize2fs /dev/vg0/lvm0
If you want to detach Physical voume
lvreduce –L -100M /dev/vol0/lvm0
vgreduce /dev/vg0 /dev/hda1
pvremove /dev/hda*
########## SOFTWARE RAID #################################
#mdadm –create –verbose /dev/md0 –level=5 –raid-devices=3 /dev/hda6 /dev/hda7 /dev/hda8
#cat /proc/mdstat
#mkfs –j /dev/md0
#mount /dev/md0 /share
#mdadm –manage /dev/md0 –fail /dev/hda7
#mdadm –manage /dev/md0 –remove /dev/hda7
#mdadm –manage /dev/md0 –add /dev/hda7
#vim /var/log/messages
Keywords:
Physical Volume (PV) Volume Group (VG) Physical Extended (PE)
Logical Volume Manager (LVM)
Commands:
pvcreate, pvdisplay, vgcreate, vgdisplay, lvcreate, lvdisplay, vgextend. Vgreduce, lvextend, lvreduce, pvremove,vgremove, lvremove
Partitions:
Create a New FileSystem
fdisk /dev/hda
Partition type: t,8e
partprobe /dev/hda, mkfs –j /dev/hda
pvcreate /dev/hda*, pvdisplay /dev/hda*
Volume Group:
Vgcreate /dev/vg0 /dev/hda6 /dev/hda7 /dev/hda8
Vgdisplay /dev/vg0
Logical Volume Manager:
lvcreate –l 700 /dev/vg0 –n lvm0
lvcreate -L 10G -n asm_d001p1 volgrp01
(/dev/volgrp01/asm_d001p1)
lvdisplay /dev/vg0/lvm0Format the LVM Group:
mkfs –j /dev/vg0/lvm0
Mount:
Mount /info
Mount /dev/vg0/lvm0 /info
Infuture you want to Increase Size
pvcreate /dev/had
vgextend /dev/vg0 /dev/had*
lvextend –L +1800M /dev/vg0/lvm0
Online we can resize
Resize2fs /dev/vg0/lvm0
If you want to detach Physical voume
lvreduce –L -100M /dev/vol0/lvm0
vgreduce /dev/vg0 /dev/hda1
pvremove /dev/hda*
########## SOFTWARE RAID #################################
#mdadm –create –verbose /dev/md0 –level=5 –raid-devices=3 /dev/hda6 /dev/hda7 /dev/hda8
#cat /proc/mdstat
#mkfs –j /dev/md0
#mount /dev/md0 /share
#mdadm –manage /dev/md0 –fail /dev/hda7
#mdadm –manage /dev/md0 –remove /dev/hda7
#mdadm –manage /dev/md0 –add /dev/hda7
#vim /var/log/messages
1 comment:
informative post ...except last line in RAID configuration. i always use tail or more/less command to view a log file instead of an editor ...if log file is very big it is not advisable to open in a editor
Post a Comment