- Pre Installation
- Post Installation
ans post installation can be implemented after the os instllation.
I am explaning post instllation here.
>>> example <<<<<
creating 1 GB partation
fdisk -l
fdisk /dev/sda
type : n
fisrt cylinder : leave blank
last cylinder : +1GB
:w # for write
this changes will made on hard drive, and not updated in RAM
you can view it here :
# cat /proc/partitions
to sysnc the partiton RAM to HDD
# partprobe /dev/sda
# mkfs -t ext3 /dev/sda7
or
# mkfs -t vfat
# mkdir /data
# mount /dev/sda7 /data
# df -Th
- Create 2 GB Partition " fdisk /dev/sda
- t togle with 8e = n
- save the partition = 2 GB
- partprobe /dev/sda = p, t, 8e
- pvcreate /dev/sda = to create phisical volume
- pvdisplay = to display phisical volume
- vgcreate vg0 /dev/sda6 = to create volume group
- vgdisplay = to view volume group
# lvcreate -L 1GB -n lv0 vg0
lvcreate : to create logical volume
-L : limit
1G : Size
-n : name
lv0: logical volume name
vg0 : Volume group Name
# lvdisplay : to display logical volume
# fdisk -l
# mkfs -t ext3 /dev/vg0/lv0
#mkdir /mylvm
# mount /dev/vg0/lv0 /mylvm
# vim /etc/fstab
/dev/vg0/lv0 /mylvm ext3 default 0,0
:wq
# df -Th
# Reboot
LVM Extend
VG Size = 1.87 GB
LV " = 1 GB
increase volume by 500 MB
# lvextend -L +500M /dev/vg0/lv0
# resize2fs /dev/vg0/lv0
Comments
Post a Comment