<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d11356004\x26blogName\x3dxception\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttp://openrent.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://openrent.blogspot.com/\x26vt\x3d-2179510228592399674', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Setup LVM on a blank disk

If you have a blank disk array, and want to prepare it for logical volumes, here's how you do it:

1) Create the physical volume.
$ pvcreate /dev/cciss/c0d1
Physical volume "/dev/cciss/c0d1" successfully created

2) Create the volume group.
$ vgcreate volgroup2 /dev/cciss/c0d1
Volume group "volgroup2" successfully created

3) Make the volume group active.
$ vgchange -a y volgroup2
0 logical volume(s) in volume group "volgroup2" now active

4) Create your logical volumes.
$ lvcreate -L 5G -n d01_lv volgroup2
Logical volume "d01_lv" created

5) Create an EXT3 filesystem on the logical volume.
$ mke2fs -j /dev/volgroup2/d80_lv

6) Create a directory on the Linux filesystem to use as a mount point for the volume.
$ mkdir /d01

7) Edit the /etc/fstab file, adding an entry for the logical volume device and mount point.
/dev/volgroup2/d01_lv /d01 ext3 defaults 1 2

[Note: this was done on an HP server, hence the /dev/cciss/c0d1 device references. Other servers might use a /dev/sda reference, for example]