[root@rhel_srv ~]# dd if=/dev/zero of=/swapfile bs=1024k count=16384
[root@rhel_srv ~]# mkswap /swapfile
Setting up swapspace version 1, size = 17179865 kB
[root@rhel_srv ~]# swapon /swapfile
[root@rhel_srv ~]# cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/vg.01-lv_swap partition 33554424 144 -1
/swapfile file 16777208 0 -2
Add to /etc/fstab
[root@rhel_srv ~]# vi /etc/fstab
/swapfile swap swap deafaults 0 0
Showing posts with label Linux HOWTO's. Show all posts
Showing posts with label Linux HOWTO's. Show all posts
Tuesday, October 19, 2010
Tuesday, May 19, 2009
to PV, VG, LV
1) To add space to an existing LVM system it needs to add free space from an existing VG by command lvextend.
2) If it doesn't VG free space, then it needs to add spare space from PV by vgextend.
3) If all of available PV's are taken, it needs to create new PV from unassigned partintion or hard drive by pvcreate.
==
1) To create PV from new hard drive.
# pvcreate /dev/hdc
2) To create PV from /dev/hdc2 partition
It needs to change partintion type by fdisk or parted to LVM (in fdisk - 8e, in parted - lvm)
3) then create PV # pvcreate /dev/hdc2
2) If it doesn't VG free space, then it needs to add spare space from PV by vgextend.
3) If all of available PV's are taken, it needs to create new PV from unassigned partintion or hard drive by pvcreate.
==
1) To create PV from new hard drive.
# pvcreate /dev/hdc
2) To create PV from /dev/hdc2 partition
It needs to change partintion type by fdisk or parted to LVM (in fdisk - 8e, in parted - lvm)
3) then create PV # pvcreate /dev/hdc2
Subscribe to:
Posts (Atom)