skip to main | skip to sidebar

Linux Tutorial for Beginners

Pages

  • Home
 
  • RSS
  • Twitter
Showing posts with label Lvm. Show all posts
Showing posts with label Lvm. Show all posts
Sunday, January 22, 2012

what is LVM? & How to create?

Posted by Raju Gupta at 10:44 PM – 0 comments
 

Linux LVM (Logical Volume Manager)

The Logical Volume Manager (LVM) enables you to resize your partitions without having to modify the partition tables on your hard disk.

Note : First you have to partition disk (fdisk) supported with Linux LVM(8e) then continue with following LVM configuration steps.

Physical Volume

A physical volume (PV) is another name for a regular physical disk partition that is used or will be used by LVM.
Use the pvcreate command to create physical volumes.
# pvcreate /dev/sdb1
or # pvcreate /dev/sdb{2,3,4}
The pvdisplay command displays all physical volumes on your system.
# pvdisplay 
or# pvdisplay /dev/sdb1 
Volume groupa pool of storage that consists of one or more physical volumes(PV’s).
#vgcreate /dev/vg0 /dev/sdb{2.3}
#vgcreate myvg /dev/sdb2 /dev/sdb3

Add/remove physical volumes to a virtual group

#pvcreate /dev/hdc
#vgextend mynew_vg /dev/sdb2 
#vgreduce mynew_vg /dev/sdb2 
#vgdisplay
# lvcreate -l 212 lvm-hde -n lvm0
or# lvcreate -l 50%VG -n lvm0 lvm-hde
or#lvcreate –L 10M –n lv0 /dev/vg0
Note : Actually here we create only 10MB of LV but its taking 12MB ..why? the reason is I mention PV is building blocks for LVM and minimum size of PV is 4MB so whenever you create LV it will be multiples of 4. That’s the reason 2MB got increased.
#lvdisplay
Chk lvsize: 12MB
#mke2fs –j /dev/vg0/lv0
#mount /dev/vg0/lv0 /mnt

Extend LV’s

lvextend -L +800 /dev/mynew_vg/vol01
The command above does not actually increase the physical size of volume, to do that you need to:
resize2fs /dev/mynew_vg/vol01

Remove LV’s

#lvdisplay 
# lvremove /dev/mynew_vg/vol02
 
Features
LVM1
LVM2
RHEL AS 2.1 support No No
RHEL 3 support Yes No
RHEL 4 support No Yes
Transactional metadata for fast recovery No Yes
Shared volume mounts with GFS No Yes
Cluster Suite failover supported Yes Yes
Striped volume expansion No Yes
Max number PVs, LVs 256 PVs, 256 LVs 2**32 PVs, 2**32 LVs
Max device size 2 Terabytes 8 Exabytes (64-bit CPUs)
Volume mirroring support No Yes, in Fall 2005
[ Read More ]
Read more...
Subscribe to: Posts (Atom)

Our Blogs

  • Java Programs with Output
  • C Programming Tutorial
  • Language Tutorial
  • Android Development Tutorial
  • Web Development Tutorial
  • Popular
  • Recent
  • Archives

Popular Posts

  • Apache Configuration File Security Option
    you’ll examine the security options available in the main Apache configuration file, httpd.conf. That file can be modified to secure the e...
  • AWS VPC Overview
    What is VPC ? A virtual private cloud (VPC) is a virtual network dedicated to your AWS account. It is logically isolated from other vir...
  • Advantages & Disadvantages of Kerberos
    Advantages of Kerberos Most conventional network services use password-based authentication schemes. Such schemes require a user to au...
  • SSH login without password
    The following steps can be used to ssh from one system to another without specifying a password: 1. On the client run the following com...
  • Apache Installation and Configuration through source code
    In this example we extract the source code to a directory under /usr/local/src/ cp httpd-2.0.46.tar.gz /usr/local/src cd /usr/local/src...
  • How to automatically chroot jail selected ssh user logins
    1. Creating basic chroot environment First we need to create a simple chroot environment. Our chroot environment will consist of a bash she...
  • How to Create the Kerberos database
    Create the database with the following command.  [root@coma ~] kdb5_util create -s This will prompt you for a password. You will ...
  • Kerberos and PAM
    Kerberos-aware services do not currently make use of Pluggable Authentication Modules (PAM) — these services bypass PAM completely. However...
  • Apache and SELinux File Labels
    Take a look at the SELinux settings associated with Apache. To review, SELinux settings, as they relate to a service, mostly fall into tw...
  • History of MINIX 3
    MINIX has a long history. It goes back to 1987 when the first edition of the book Operating Systems: Design and Implementation by Andrew S...
Powered by Blogger.

Archives

  • ▼  2014 (1)
    • ▼  May (1)
      • AWS VPC Overview
  • ►  2013 (4)
    • ►  February (4)
  • ►  2012 (89)
    • ►  November (1)
    • ►  March (4)
    • ►  February (36)
    • ►  January (48)
 

Followers

Labels

  • Apache (8)
  • aws (1)
  • Bridge (1)
  • cloud computing (1)
  • Configuration (1)
  • dhcp server (7)
  • DNS (8)
  • File system (11)
  • Fping (1)
  • Iptable basic (3)
  • KDC slave server (1)
  • Kerberos (14)
  • kerberos configuration (5)
  • kerberos database (1)
  • LaTeX (1)
  • Ldap basic (2)
  • Linux aliases (1)
  • Linux Commands (4)
  • Linux History (2)
  • Linux Installation (3)
  • Linux kernel (3)
  • Linux shell (2)
  • Linux software (2)
  • Lvm (1)
  • Mail Server (3)
  • Network Script (1)
  • PHP (1)
  • Raid (6)
  • SELinux (1)
  • Sendmail (3)
  • ssh (2)
  • Tcpdump example (1)
  • Virtualization (5)
  • Webmin (1)
  • Yum (2)
 
 
© 2011 Linux Tutorial for Beginners | Designs by Web2feel & Fab Themes

Bloggerized by DheTemplate.com - Main Blogger