public inbox for gentoo-doc-cvs@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-doc-cvs] cvs commit: lvm-p1.xml
@ 2005-09-20 18:48 Lukasz Damentko
  0 siblings, 0 replies; 3+ messages in thread
From: Lukasz Damentko @ 2005-09-20 18:48 UTC (permalink / raw
  To: gentoo-doc-cvs

rane        05/09/20 18:48:24

  Added:       xml/htdocs/doc/en/articles lvm-p1.xml lvm-p2.xml
  Log:
  two more articles, this time from #104169

Revision  Changes    Path
1.1                  xml/htdocs/doc/en/articles/lvm-p1.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo

Index: lvm-p1.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v 1.1 2005/09/20 18:48:24 rane Exp $ -->

<guide link="/doc/en/articles/lvm-p1.xml">
<title>Learning Linux LVM, Part 1</title>

<author title="Author">
  <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
</author>
<!-- xmlified by: Joshua Saddler (jackdark@gmail.com) -->

<abstract>
In this article, Daniel introduces you to the concepts behind Linux 
LVM (Logical Volume Management) and shows you how to get the latest 
kernel patches and tools installed on your system. LVM allows you to 
create logical volumes out of the physical storage resources on your 
machine. However, unlike physical volumes, the logical volumes can 
be expanded and shrunk while the system is still running, providing 
Linux system administrators with the storage flexibility that they've 
until now only dreamed of.
</abstract>

<!-- The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team -->

<version>1.0</version>
<date>2005-08-29</date>

<chapter>
<title>Storage management magic with Logical Volume Management</title>
<section>
<title>LVM intro</title>
<body>

<note>
The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team.
</note>

<p>
In this series, I'm going to show you how to install and use the new 
Logical Volume Management support built-in to the Linux 2.4 kernel. If 
you've never used a form of LVM before, you're in for a treat; it's a 
wonderful technology. Before we actually get LVM up and running, I'm 
going to explain exactly what it is and how it works. Then, we'll be 
ready to test out LVM and get the most out of it.
</p>

<p>
If you're like me, then your experience with UNIX and Linux began on 
a PC platform, rather than on large, commercial UNIX servers and 
workstations. On the basic PC, we've always had to deal with 
partitioning our hard drives. PC people are generally well-acquainted 
with tools such as <c>fdisk</c>, which are used to create and delete 
primary and extended partitions on hard disks. Hard disk partitioning 
is an annoying but accepted part of the process of getting an 
operating system up and running.
</p>

<p>
Hard drive partitioning can be annoying because to do a good job you 
really need to accurately estimate how much space you'll need for 
each partition. If you make a poor estimation, your Linux system 
could possibly be crippled -- to fix the problem, it's possible that 
you might even need to perform a full system backup, wipe your hard 
drives clean, and then restore all your data to a new (and presumably 
better) partition layout. Ick! These are exactly the kinds of 
situations that sysadmins try their best to avoid in the first place.
</p>

<p>
While partitions were once static storage regions, thankfully, we now 
have a proliferation of PC repartitioning tools (PowerQuest's 
Partition Magic product is one of the most popular). These tools allow 
you to boot your system with a special disk and dynamically resize 
your partitions and filesystems. Once you reboot, you have newly 
resized partitions, hopefully getting you out of your storage crunch. 
These partition resizing tools are great and solve the problem storage 
management for some. But are they perfect? Not exactly.
</p>

<p>
Tools like Partition Magic are great for workstations, but aren't 
really adequate for servers. First of all, they require you to reboot 
your system. This is something most sysadmins desperately try to avoid 
doing. What if you simply can't reboot your machine every time your 
storage needs change, such as if your storage needs change dramatically 
on a weekly basis? What happens if you need to expand a filesystem so 
that it spans more than one hard drive, or what do you do if you need 
to dynamically expand or shrink a volume's storage capacity while 
allowing Apache to continue to serve Web pages? In a highly available, 
dynamic environment, a basic partition resizer just won't work. For 
these and other situations, Logical Volume Management is an excellent 
(if not perfect) solution.
</p>

</body>
</section>
<section>
<title>Enter LVM</title>
<body>

<p>
Now, let's take a look at how LVM solves these problems. To create an 
LVM logical volume, we follow a three-step process. First, we need to 
select the physical storage resources that are going to be used for 
LVM. Typically, these are standard partitions but can also be Linux 
software RAID volumes that we've created. In LVM terminology, these 
storage resources are called "physical volumes". Our first step in 
setting up LVM involves properly initializing these partitions so 
that they can be recognized by the LVM system. This involves setting 
the correct partition type if we're adding a physical partition, and 
running the pvcreate command.
</p>

<p>
Once we have one or more physical volumes initialized for use by LVM, 
we can move on to step two -- creating a volume group. You can think 
of a volume group as a pool of storage that consists of one or more 
physical volumes. While LVM is running, we can add physical volumes 
to the volume group or even remove them. However, we can't mount or 
create filesystems on a volume group directly. Instead, we can tell 
LVM to create one or more "logical volumes" using our volume group 
storage pool:
</p>

<figure link="/images/docs/l-lvm-1.gif" caption="A volume group is 
created out of physical volumes"/>

<p>
Creating an LVM logical volume is really easy, and once it's created 
we can go ahead and put a filesystem on it, mount it, and start using 
the volume to store our files. To create a logical volume, we use the 
<c>lvcreate</c> command, specifying the name of our new volume, the 
size we'd like the volume to be, and the volume group that we'd like 
this particluar logical volume to be part of. The LVM system will 
then allocate storage from the volume group we specify and create our 
new volume, which is now ready for use. Once created, we can put an 
ext2 or ReiserFS filesystem on it, mount it, and use it as we like. 
</p>

<figure link="/images/docs/l-lvm-2.gif" caption="Creating two 
logical volumes from our existing volume group"/>

</body>
</section>
<section>
<title>Extents</title>
<body>

<p>
Behind the scenes, the LVM system allocates storage in equal-sized 
"chunks", called extents. We can specify the particular extent size 
to use at volume group creation time. The size of an extent defaults 
to 4Mb, which is perfect for most uses. One of the beauties of LVM is 
that the physical storage locations of the extents used for one of our 
logical volumes (in other words, what disk they're stored on) can be 
dynamically changed while our logical volume is mounted and in use! 
The LVM system ensures that our logical volumes continue to operate 
perfectly while allowing the administrator to physically change where 
everything is stored.
</p>

<p>
Of course, since everything is created out of equally-sized extents, 
it's really easy to allocate some additional extents for an 
already-existing logical volume -- in other words, dynamically "grow" 
the volume:
</p>

<figure link="/images/docs/l-lvm-3.gif" caption="Adding additional 
extents from our volume group, expanding the size of our logical 
volume"/>

<p>
Once the logical volume has been expanded, you can then expand your 
ext2 or ReiserFS filesystem to take advantage of this new space. If 
you use a program such as <c>resize_reiserfs</c>, this filesystem 
expansion can also happen while the volume is mounted and being used! 
Truly amazing -- with LVM and online filesystem expansion utilties, 
it's no longer necessary to reboot your system or even drop to 
runlevel 1 to change your storage configuration.
</p>

<p>
The only time you need to shut down your system is when you need to 
add new physical disks. Once new disks have been added, you then can 
add these new physical volumes to your volume group(s) to create a 
fresh supply of extents. 
</p>

</body>
</section>
<section>



1.1                  xml/htdocs/doc/en/articles/lvm-p2.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo

Index: lvm-p2.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v 1.1 2005/09/20 18:48:24 rane Exp $ -->

<guide link="/doc/en/articles/lvm-p2.xml">
<title>Learning Linux LVM, Part 2</title>

<author title="Author">
  <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
</author>
<!-- xmlified by: Joshua Saddler (jackdark@gmail.com) -->

<abstract>
In this article, Daniel shares his experiences converting 
cvs.gentoo.org's /home filesystem to an LVM logical volume. After 
the transition, we get to see the benefits of LVM when 
cvs.gentoo.org's /home partition is dynamically resized in real-time, 
without rebooting, unmounting /home, or even dropping to runlevel 1. 
All processes continue to work without any interruption. Daniel's 
step-by-step details of the conversion will help anyone interested 
in peforming a similiar transition on their own machine.
</abstract>

<!-- The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team -->

<version>1.0</version>
<date>2005-08-29</date>

<chapter>
<title>The cvs.gentoo.org upgrade</title>
<section>
<title>Introduction</title>
<body>

<note>
The original version of this article was first published on IBM 
developerWorks, and is property of Westtech Information Services. This 
document is an updated version of the original article, and contains
various improvements made by the Gentoo Linux Documentation team.
</note>

<p>
In <uri link="/doc/en/articles/lvm-p1.xml">my first LVM article</uri>, 
I explained the concepts behind LVM. Now it's time to put LVM into 
action. In this article, I'm going to set up LVM on the official Gentoo 
Linux cvs server, cvs.gentoo.org. Although cvs.gentoo.org has only one 
hard drive, LVM's flexibility still provides an incredible improvement 
over the standard static partitioning approach. I'll show you all the 
steps of the LVM conversion process, so that if you're interested you 
can perform a similar conversion on one of your machines.
</p>

<warn>
Because implementing LVM is a major change to the system (involving the 
creation of new partitions and other potentially hazardous actions) 
it's a really good idea to perform a full system backup before 
beginning this process. If you're not going to perform a backup, I 
hope you're using a test box with no important data on it. I should 
mention that I didn't experience any problems while converting to LVM, 
but it's best to be prepared in case something goes wrong.
</warn>

<p>
That said, let's continue. Before starting the conversion process, I 
upgraded cvs.gentoo.org so that it was using the following packages. At 
the time I performed the LVM transition, these were the latest versions 
available (see <uri link="#resources">Resources</uri> later in this 
article): 
</p>

<ul>
  <li>Linux kernel 2.4.1-ac19</li>
  <li>LVM 0.9.1_beta5</li>
  <li>reiserfs-utils 3.6.25</li>
</ul>

<p>
Now, for the hard drive. cvs.gentoo.org had a nice new IBM 45 GB hard 
drive sitting in it; however, when I installed Gentoo Linux on cvs, I 
only partitioned about 10 gigabytes of the drive, keeping the remaining 
35 GB for future partitions. Such are the little tricks you need to 
employ when not using LVM -- leaving part of the drive unpartitioned is 
a primitive but effective way to allow for future expansion. However, 
with LVM there is a better approach. 
</p>

</body>
</section>
<section>
<title>The space problem</title>
<body>

<p>
In the past few weeks, I had been noticing that my root ReiserFS 
partition had been slowly filling up, as you can see from this 
<c>df</c> output: 
</p>

<pre caption="Shrinking free space">
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda3              9765200   6989312   2775888  72% /
tmpfs                   269052         0    269052   0% /dev/shm
</pre>

<p>
Now, a 72% full root partition isn't exactly a crisis, but it isn't a 
wonderful situation either. ReiserFS, like many other filesystems, 
starts slowing down as it gets more and more full, and it was just a 
matter of time before my root filesystem would fill up completely and 
filesystem performance would take a hit.
</p>

<p>
I decided to fix this problem by using LVM to create a new logical 
volume out of the 35 GB of currently unpartitioned space at the end 
of my hard drive. Then, I'd create a filesystem on this volume and 
move a good chunk of the contents of <path>/dev/hda3</path> to it.
</p>

<p>
If you're thinking of making a similar transition on one of your 
machines, the first thing you need to do is find a suitable piece of 
your root filesystem to move to a logical volume. For me, the choice 
was easy -- my <path>/home</path> tree was taking up around 5.7 GB. By 
moving <path>/home</path> to its own LVM logical volume, my root 
filesystem would then be at about 20% capacity. Since most new data is 
being added to <path>/home</path>, my root filesystem would likely stay 
at around 20% capacity as well -- a very healthy situation. 
</p>

</body>
</section>
<section>
<title>The beginnings of a solution</title>
<body>

<p>
To begin the conversion, I first had to partition the unused space at 
the end of my hard drive. Using <c>cfdisk</c>, I created a 35 GB 
partition (<path>/dev/hda5</path>) and set the partition type of the 
partition to <c>8E</c> (the official LVM partition type). After this 
change, I rebooted to force a reread of my partition table. After the 
reboot, my partition table looked like this:
</p>

<pre caption="The new partition table">
# <i>sfdisk -l</i>
Disk /dev/hda: 89355 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
   Device Boot Start     End   #cyls   #blocks   Id  System
/dev/hda1   *      0+    247     248-   124960+  83  Linux
/dev/hda2        248     743     496    249984   82  Linux swap
/dev/hda3        744   20119   19376   9765504   83  Linux
/dev/hda4      20120   89354   69235  34894440    5  Extended
/dev/hda5      20120+  89354   69235- 34894408+  8e  Linux LVM
</pre>

<p>
Now that I had an empty 35 GB partition, I was ready to initialize it 
for LVM. Here's the procedure -- first, I would initialize the 35 
gigabytes as a <e>physical</e> volume; then, I would create a 
<e>volume</e> group using this physical volume, and finally, I would 
allocate some of the extents on the volume group, creating a 
<e>logical volume</e> that would contain my new filesystem and house 
all the files currently in <path>/home</path>.
</p>

<p>
To begin the process, I used the <c>pvcreate</c> command to 
initialize <path>/dev/hda5</path> as a physical volume:
</p>

<pre caption="Creating the physical volume">
# <i>pvcreate /dev/hda5</i>
pvcreate -- physical volume "/dev/hda5" successfully created
</pre>

<p>
<c>pvcreate</c> set up a special "accounting" area on 
<path>/dev/hda5</path>, called the VGDA (volume group descriptor 
area). LVM uses this area to keep track of how the physical extents 
are allocated, among other things.
</p>

<p>
My next step was to create a volume group and add 
<path>/dev/hda5</path> to this group. The volume group would act as a 
pool of extents (chunks of storage blocks). Once the volume group was 
created, I could create as many logical volumes as I wanted. I decided 
that my volume group would be called "main": 
</p>

<pre caption="Creating the volume group">
# <i>vgcreate main /dev/hda5</i>
vgcreate -- INFO: using default physical extent size 4 MB
vgcreate -- INFO: maximum logical volume size is 255.99 Gigabyte



-- 
gentoo-doc-cvs@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-doc-cvs] cvs commit: lvm-p1.xml
@ 2005-09-21 10:22 Xavier Neys
  0 siblings, 0 replies; 3+ messages in thread
From: Xavier Neys @ 2005-09-21 10:22 UTC (permalink / raw
  To: gentoo-doc-cvs

neysx       05/09/21 10:22:33

  Modified:    xml/htdocs/doc/en/articles lvm-p1.xml lvm-p2.xml
  Log:
  Improved coding style  *No Content Change*

Revision  Changes    Path
1.2       +195 -218  xml/htdocs/doc/en/articles/lvm-p1.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml?rev=1.2&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml.diff?r1=1.1&r2=1.2&cvsroot=gentoo

Index: lvm-p1.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lvm-p1.xml	20 Sep 2005 18:48:24 -0000	1.1
+++ lvm-p1.xml	21 Sep 2005 10:22:33 -0000	1.2
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v 1.1 2005/09/20 18:48:24 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v 1.2 2005/09/21 10:22:33 neysx Exp $ -->
 
 <guide link="/doc/en/articles/lvm-p1.xml">
 <title>Learning Linux LVM, Part 1</title>
@@ -11,18 +11,17 @@
 <!-- xmlified by: Joshua Saddler (jackdark@gmail.com) -->
 
 <abstract>
-In this article, Daniel introduces you to the concepts behind Linux 
-LVM (Logical Volume Management) and shows you how to get the latest 
-kernel patches and tools installed on your system. LVM allows you to 
-create logical volumes out of the physical storage resources on your 
-machine. However, unlike physical volumes, the logical volumes can 
-be expanded and shrunk while the system is still running, providing 
-Linux system administrators with the storage flexibility that they've 
-until now only dreamed of.
+In this article, Daniel introduces you to the concepts behind Linux LVM
+(Logical Volume Management) and shows you how to get the latest kernel patches
+and tools installed on your system. LVM allows you to create logical volumes
+out of the physical storage resources on your machine. However, unlike physical
+volumes, the logical volumes can be expanded and shrunk while the system is
+still running, providing Linux system administrators with the storage
+flexibility that they've until now only dreamed of.
 </abstract>
 
-<!-- The original version of this article was first published on IBM 
-developerWorks, and is property of Westtech Information Services. This 
+<!-- The original version of this article was first published on IBM
+developerWorks, and is property of Westtech Information Services. This
 document is an updated version of the original article, and contains
 various improvements made by the Gentoo Linux Documentation team -->
 
@@ -36,67 +35,63 @@
 <body>
 
 <note>
-The original version of this article was first published on IBM 
-developerWorks, and is property of Westtech Information Services. This 
-document is an updated version of the original article, and contains
-various improvements made by the Gentoo Linux Documentation team.
+The original version of this article was first published on IBM developerWorks,
+and is property of Westtech Information Services. This document is an updated
+version of the original article, and contains various improvements made by the
+Gentoo Linux Documentation team.
 </note>
 
 <p>
-In this series, I'm going to show you how to install and use the new 
-Logical Volume Management support built-in to the Linux 2.4 kernel. If 
-you've never used a form of LVM before, you're in for a treat; it's a 
-wonderful technology. Before we actually get LVM up and running, I'm 
-going to explain exactly what it is and how it works. Then, we'll be 
-ready to test out LVM and get the most out of it.
+In this series, I'm going to show you how to install and use the new Logical
+Volume Management support built-in to the Linux 2.4 kernel. If you've never
+used a form of LVM before, you're in for a treat; it's a wonderful technology.
+Before we actually get LVM up and running, I'm going to explain exactly what it
+is and how it works. Then, we'll be ready to test out LVM and get the most out
+of it.
 </p>
 
 <p>
-If you're like me, then your experience with UNIX and Linux began on 
-a PC platform, rather than on large, commercial UNIX servers and 
-workstations. On the basic PC, we've always had to deal with 
-partitioning our hard drives. PC people are generally well-acquainted 
-with tools such as <c>fdisk</c>, which are used to create and delete 
-primary and extended partitions on hard disks. Hard disk partitioning 
-is an annoying but accepted part of the process of getting an 
+If you're like me, then your experience with UNIX and Linux began on a PC
+platform, rather than on large, commercial UNIX servers and workstations. On
+the basic PC, we've always had to deal with partitioning our hard drives. PC
+people are generally well-acquainted with tools such as <c>fdisk</c>, which are
+used to create and delete primary and extended partitions on hard disks. Hard
+disk partitioning is an annoying but accepted part of the process of getting an
 operating system up and running.
 </p>
 
 <p>
-Hard drive partitioning can be annoying because to do a good job you 
-really need to accurately estimate how much space you'll need for 
-each partition. If you make a poor estimation, your Linux system 
-could possibly be crippled -- to fix the problem, it's possible that 
-you might even need to perform a full system backup, wipe your hard 
-drives clean, and then restore all your data to a new (and presumably 
-better) partition layout. Ick! These are exactly the kinds of 
-situations that sysadmins try their best to avoid in the first place.
+Hard drive partitioning can be annoying because to do a good job you really
+need to accurately estimate how much space you'll need for each partition. If
+you make a poor estimation, your Linux system could possibly be crippled -- to
+fix the problem, it's possible that you might even need to perform a full
+system backup, wipe your hard drives clean, and then restore all your data to a
+new (and presumably better) partition layout. Ick! These are exactly the kinds
+of situations that sysadmins try their best to avoid in the first place.
 </p>
 
 <p>
-While partitions were once static storage regions, thankfully, we now 
-have a proliferation of PC repartitioning tools (PowerQuest's 
-Partition Magic product is one of the most popular). These tools allow 
-you to boot your system with a special disk and dynamically resize 
-your partitions and filesystems. Once you reboot, you have newly 
-resized partitions, hopefully getting you out of your storage crunch. 
-These partition resizing tools are great and solve the problem storage 
-management for some. But are they perfect? Not exactly.
+While partitions were once static storage regions, thankfully, we now have a
+proliferation of PC repartitioning tools (PowerQuest's Partition Magic product
+is one of the most popular). These tools allow you to boot your system with a
+special disk and dynamically resize your partitions and filesystems. Once you
+reboot, you have newly resized partitions, hopefully getting you out of your
+storage crunch. These partition resizing tools are great and solve the problem
+storage management for some. But are they perfect? Not exactly.
 </p>
 
 <p>
-Tools like Partition Magic are great for workstations, but aren't 
-really adequate for servers. First of all, they require you to reboot 
-your system. This is something most sysadmins desperately try to avoid 
-doing. What if you simply can't reboot your machine every time your 
-storage needs change, such as if your storage needs change dramatically 
-on a weekly basis? What happens if you need to expand a filesystem so 
-that it spans more than one hard drive, or what do you do if you need 
-to dynamically expand or shrink a volume's storage capacity while 
-allowing Apache to continue to serve Web pages? In a highly available, 
-dynamic environment, a basic partition resizer just won't work. For 
-these and other situations, Logical Volume Management is an excellent 
-(if not perfect) solution.
+Tools like Partition Magic are great for workstations, but aren't really
+adequate for servers. First of all, they require you to reboot your system.
+This is something most sysadmins desperately try to avoid doing. What if you
+simply can't reboot your machine every time your storage needs change, such as
+if your storage needs change dramatically on a weekly basis? What happens if
+you need to expand a filesystem so that it spans more than one hard drive, or
+what do you do if you need to dynamically expand or shrink a volume's storage
+capacity while allowing Apache to continue to serve Web pages? In a highly
+available, dynamic environment, a basic partition resizer just won't work. For
+these and other situations, Logical Volume Management is an excellent (if not
+perfect) solution.
 </p>
 
 </body>
@@ -106,45 +101,42 @@
 <body>
 
 <p>
-Now, let's take a look at how LVM solves these problems. To create an 
-LVM logical volume, we follow a three-step process. First, we need to 
-select the physical storage resources that are going to be used for 
-LVM. Typically, these are standard partitions but can also be Linux 
-software RAID volumes that we've created. In LVM terminology, these 
-storage resources are called "physical volumes". Our first step in 
-setting up LVM involves properly initializing these partitions so 
-that they can be recognized by the LVM system. This involves setting 
-the correct partition type if we're adding a physical partition, and 
+Now, let's take a look at how LVM solves these problems. To create an LVM
+logical volume, we follow a three-step process. First, we need to select the
+physical storage resources that are going to be used for LVM. Typically, these
+are standard partitions but can also be Linux software RAID volumes that we've
+created. In LVM terminology, these storage resources are called "physical
+volumes". Our first step in setting up LVM involves properly initializing these
+partitions so that they can be recognized by the LVM system. This involves
+setting the correct partition type if we're adding a physical partition, and
 running the pvcreate command.
 </p>
 
 <p>
-Once we have one or more physical volumes initialized for use by LVM, 
-we can move on to step two -- creating a volume group. You can think 
-of a volume group as a pool of storage that consists of one or more 
-physical volumes. While LVM is running, we can add physical volumes 
-to the volume group or even remove them. However, we can't mount or 
-create filesystems on a volume group directly. Instead, we can tell 
-LVM to create one or more "logical volumes" using our volume group 
-storage pool:
+Once we have one or more physical volumes initialized for use by LVM, we can
+move on to step two -- creating a volume group. You can think of a volume group
+as a pool of storage that consists of one or more physical volumes. While LVM
+is running, we can add physical volumes to the volume group or even remove
+them. However, we can't mount or create filesystems on a volume group directly.
+Instead, we can tell LVM to create one or more "logical volumes" using our
+volume group storage pool:
 </p>
 
-<figure link="/images/docs/l-lvm-1.gif" caption="A volume group is 
+<figure link="/images/docs/l-lvm-1.gif" caption="A volume group is
 created out of physical volumes"/>
 



1.2       +173 -189  xml/htdocs/doc/en/articles/lvm-p2.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml?rev=1.2&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml.diff?r1=1.1&r2=1.2&cvsroot=gentoo

Index: lvm-p2.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lvm-p2.xml	20 Sep 2005 18:48:24 -0000	1.1
+++ lvm-p2.xml	21 Sep 2005 10:22:33 -0000	1.2
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v 1.1 2005/09/20 18:48:24 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v 1.2 2005/09/21 10:22:33 neysx Exp $ -->
 
 <guide link="/doc/en/articles/lvm-p2.xml">
 <title>Learning Linux LVM, Part 2</title>
@@ -11,18 +11,17 @@
 <!-- xmlified by: Joshua Saddler (jackdark@gmail.com) -->
 
 <abstract>
-In this article, Daniel shares his experiences converting 
-cvs.gentoo.org's /home filesystem to an LVM logical volume. After 
-the transition, we get to see the benefits of LVM when 
-cvs.gentoo.org's /home partition is dynamically resized in real-time, 
-without rebooting, unmounting /home, or even dropping to runlevel 1. 
-All processes continue to work without any interruption. Daniel's 
-step-by-step details of the conversion will help anyone interested 
-in peforming a similiar transition on their own machine.
+In this article, Daniel shares his experiences converting cvs.gentoo.org's
+/home filesystem to an LVM logical volume. After the transition, we get to see
+the benefits of LVM when cvs.gentoo.org's /home partition is dynamically
+resized in real-time, without rebooting, unmounting /home, or even dropping to
+runlevel 1. All processes continue to work without any interruption. Daniel's
+step-by-step details of the conversion will help anyone interested in peforming
+a similar transition on their own machine.
 </abstract>
 
-<!-- The original version of this article was first published on IBM 
-developerWorks, and is property of Westtech Information Services. This 
+<!-- The original version of this article was first published on IBM
+developerWorks, and is property of Westtech Information Services. This
 document is an updated version of the original article, and contains
 various improvements made by the Gentoo Linux Documentation team -->
 
@@ -36,39 +35,38 @@
 <body>
 
 <note>
-The original version of this article was first published on IBM 
-developerWorks, and is property of Westtech Information Services. This 
-document is an updated version of the original article, and contains
-various improvements made by the Gentoo Linux Documentation team.
+The original version of this article was first published on IBM developerWorks,
+and is property of Westtech Information Services. This document is an updated
+version of the original article, and contains various improvements made by the
+Gentoo Linux Documentation team.
 </note>
 
 <p>
-In <uri link="/doc/en/articles/lvm-p1.xml">my first LVM article</uri>, 
-I explained the concepts behind LVM. Now it's time to put LVM into 
-action. In this article, I'm going to set up LVM on the official Gentoo 
-Linux cvs server, cvs.gentoo.org. Although cvs.gentoo.org has only one 
-hard drive, LVM's flexibility still provides an incredible improvement 
-over the standard static partitioning approach. I'll show you all the 
-steps of the LVM conversion process, so that if you're interested you 
-can perform a similar conversion on one of your machines.
+In <uri link="/doc/en/articles/lvm-p1.xml">my first LVM article</uri>, I
+explained the concepts behind LVM. Now it's time to put LVM into action. In
+this article, I'm going to set up LVM on the official Gentoo Linux cvs server,
+cvs.gentoo.org. Although cvs.gentoo.org has only one hard drive, LVM's
+flexibility still provides an incredible improvement over the standard static
+partitioning approach. I'll show you all the steps of the LVM conversion
+process, so that if you're interested you can perform a similar conversion on
+one of your machines.
 </p>
 
 <warn>
-Because implementing LVM is a major change to the system (involving the 
-creation of new partitions and other potentially hazardous actions) 
-it's a really good idea to perform a full system backup before 
-beginning this process. If you're not going to perform a backup, I 
-hope you're using a test box with no important data on it. I should 
-mention that I didn't experience any problems while converting to LVM, 
-but it's best to be prepared in case something goes wrong.
+Because implementing LVM is a major change to the system (involving the
+creation of new partitions and other potentially hazardous actions) it's a
+really good idea to perform a full system backup before beginning this process.
+If you're not going to perform a backup, I hope you're using a test box with no
+important data on it. I should mention that I didn't experience any problems
+while converting to LVM, but it's best to be prepared in case something goes
+wrong.
 </warn>
 
 <p>
-That said, let's continue. Before starting the conversion process, I 
-upgraded cvs.gentoo.org so that it was using the following packages. At 
-the time I performed the LVM transition, these were the latest versions 
-available (see <uri link="#resources">Resources</uri> later in this 
-article): 
+That said, let's continue. Before starting the conversion process, I upgraded
+cvs.gentoo.org so that it was using the following packages. At the time I
+performed the LVM transition, these were the latest versions available (see
+<uri link="#resources">Resources</uri> later in this article):
 </p>
 
 <ul>
@@ -78,13 +76,12 @@
 </ul>
 
 <p>
-Now, for the hard drive. cvs.gentoo.org had a nice new IBM 45 GB hard 
-drive sitting in it; however, when I installed Gentoo Linux on cvs, I 
-only partitioned about 10 gigabytes of the drive, keeping the remaining 
-35 GB for future partitions. Such are the little tricks you need to 
-employ when not using LVM -- leaving part of the drive unpartitioned is 
-a primitive but effective way to allow for future expansion. However, 
-with LVM there is a better approach. 
+Now, for the hard drive. cvs.gentoo.org had a nice new IBM 45 GB hard drive
+sitting in it; however, when I installed Gentoo Linux on cvs, I only
+partitioned about 10 gigabytes of the drive, keeping the remaining 35 GB for
+future partitions. Such are the little tricks you need to employ when not using
+LVM -- leaving part of the drive unpartitioned is a primitive but effective way
+to allow for future expansion. However, with LVM there is a better approach.
 </p>
 
 </body>
@@ -94,9 +91,8 @@
 <body>
 
 <p>
-In the past few weeks, I had been noticing that my root ReiserFS 
-partition had been slowly filling up, as you can see from this 
-<c>df</c> output: 
+In the past few weeks, I had been noticing that my root ReiserFS partition had
+been slowly filling up, as you can see from this <c>df</c> output:
 </p>
 
 <pre caption="Shrinking free space">
@@ -106,29 +102,28 @@
 </pre>
 
 <p>
-Now, a 72% full root partition isn't exactly a crisis, but it isn't a 
-wonderful situation either. ReiserFS, like many other filesystems, 
-starts slowing down as it gets more and more full, and it was just a 
-matter of time before my root filesystem would fill up completely and 
-filesystem performance would take a hit.
+Now, a 72% full root partition isn't exactly a crisis, but it isn't a wonderful
+situation either. ReiserFS, like many other filesystems, starts slowing down as
+it gets more and more full, and it was just a matter of time before my root
+filesystem would fill up completely and filesystem performance would take a
+hit.
 </p>
 
 <p>
-I decided to fix this problem by using LVM to create a new logical 
-volume out of the 35 GB of currently unpartitioned space at the end 
-of my hard drive. Then, I'd create a filesystem on this volume and 
-move a good chunk of the contents of <path>/dev/hda3</path> to it.
+I decided to fix this problem by using LVM to create a new logical volume out
+of the 35 GB of currently unpartitioned space at the end of my hard drive.
+Then, I'd create a filesystem on this volume and move a good chunk of the
+contents of <path>/dev/hda3</path> to it.
 </p>
 
 <p>
-If you're thinking of making a similar transition on one of your 
-machines, the first thing you need to do is find a suitable piece of 
-your root filesystem to move to a logical volume. For me, the choice 
-was easy -- my <path>/home</path> tree was taking up around 5.7 GB. By 
-moving <path>/home</path> to its own LVM logical volume, my root 
-filesystem would then be at about 20% capacity. Since most new data is 
-being added to <path>/home</path>, my root filesystem would likely stay 
-at around 20% capacity as well -- a very healthy situation. 
+If you're thinking of making a similar transition on one of your machines, the
+first thing you need to do is find a suitable piece of your root filesystem to
+move to a logical volume. For me, the choice was easy -- my <path>/home</path>
+tree was taking up around 5.7 GB. By moving <path>/home</path> to its own LVM
+logical volume, my root filesystem would then be at about 20% capacity. Since
+most new data is being added to <path>/home</path>, my root filesystem would
+likely stay at around 20% capacity as well -- a very healthy situation.
 </p>
 
 </body>
@@ -138,12 +133,12 @@
 <body>
 
 <p>
-To begin the conversion, I first had to partition the unused space at 
-the end of my hard drive. Using <c>cfdisk</c>, I created a 35 GB 
-partition (<path>/dev/hda5</path>) and set the partition type of the 
-partition to <c>8E</c> (the official LVM partition type). After this 
-change, I rebooted to force a reread of my partition table. After the 
-reboot, my partition table looked like this:
+To begin the conversion, I first had to partition the unused space at the end
+of my hard drive. Using <c>cfdisk</c>, I created a 35 GB partition
+(<path>/dev/hda5</path>) and set the partition type of the partition to
+<c>8E</c> (the official LVM partition type). After this change, I rebooted to



-- 
gentoo-doc-cvs@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gentoo-doc-cvs] cvs commit: lvm-p1.xml
@ 2006-01-22  4:06 Shyam Mani
  0 siblings, 0 replies; 3+ messages in thread
From: Shyam Mani @ 2006-01-22  4:06 UTC (permalink / raw
  To: gentoo-doc-cvs

fox2mike    06/01/22 04:06:10

  Modified:    xml/htdocs/doc/en/articles lvm-p1.xml lvm-p2.xml
  Log:
  #119882 - Sistina redirects to RedHat and none of the old links work. Commented them out, updated the LVM tarball link to point to RedHat's pub ftp.

Revision  Changes    Path
1.4       +5 -5      xml/htdocs/doc/en/articles/lvm-p1.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml?rev=1.4&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p1.xml.diff?r1=1.3&r2=1.4&cvsroot=gentoo

Index: lvm-p1.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lvm-p1.xml	9 Oct 2005 17:13:23 -0000	1.3
+++ lvm-p1.xml	22 Jan 2006 04:06:10 -0000	1.4
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v 1.3 2005/10/09 17:13:23 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p1.xml,v 1.4 2006/01/22 04:06:10 fox2mike Exp $ -->
 
 <guide link="/doc/en/articles/lvm-p1.xml" disclaimer="articles">
 <title>Learning Linux LVM, Part 1</title>
@@ -25,8 +25,8 @@
 document is an updated version of the original article, and contains
 various improvements made by the Gentoo Linux Documentation team -->
 
-<version>1.1</version>
-<date>2005-10-09</date>
+<version>1.2</version>
+<date>2006-01-22</date>
 
 <chapter>
 <title>Storage management magic with Logical Volume Management</title>
@@ -384,8 +384,8 @@
 
 <ul>
   <li>
-    Download the <uri link="http://www.sistina.com/">LVM tarball</uri> from
-    Sistina Software.
+    Download the <uri link="ftp://sources.redhat.com/pub/lvm2">LVM
+    tarball</uri> from RedHat.
   </li>
   <li>
     The impatient will want to check out <uri



1.4       +7 -5      xml/htdocs/doc/en/articles/lvm-p2.xml

file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml?rev=1.4&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/articles/lvm-p2.xml.diff?r1=1.3&r2=1.4&cvsroot=gentoo

Index: lvm-p2.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- lvm-p2.xml	9 Oct 2005 17:13:23 -0000	1.3
+++ lvm-p2.xml	22 Jan 2006 04:06:10 -0000	1.4
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v 1.3 2005/10/09 17:13:23 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/articles/lvm-p2.xml,v 1.4 2006/01/22 04:06:10 fox2mike Exp $ -->
 
 <guide link="/doc/en/articles/lvm-p2.xml" disclaimer="articles">
 <title>Learning Linux LVM, Part 2</title>
@@ -25,8 +25,8 @@
 document is an updated version of the original article, and contains
 various improvements made by the Gentoo Linux Documentation team -->
 
-<version>1.1</version>
-<date>2005-10-09</date>
+<version>1.2</version>
+<date>2006-01-22</date>
 
 <chapter>
 <title>The cvs.gentoo.org upgrade</title>
@@ -436,9 +436,10 @@
     link="/doc/en/articles/lvm-p1.xml">Learning Linux LVM, Part 1</uri>.
   </li>
   <li>
-    Download the <uri link="http://www.sistina.com">LVM tarball</uri> from
-    Sistina Software.
+    Download the <uri link="ftp://sources.redhat.com/pub/lvm2">LVM
+    tarball</uri> from RedHat.
   </li>
+<!-- Comment out Sistina links, Bug #119882
   <li>
     Sistina now has an excellent <uri
     link="http://www.sistina.com/lvm/doc/lvm_howto/index.html">LVM HOWTO</uri>
@@ -449,6 +450,7 @@
     link="http://www.sistina.com/cgi-bin/lvm-faqprocessor.cgi">Linux LVM
     FAQ</uri>.
   </li>
+-->
   <li>
     The impatient will want to check out <uri
     link="http://www.linux.org/docs/ldp/howto/LVM-HOWTO.html">Heinz



-- 
gentoo-doc-cvs@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-22  4:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-20 18:48 [gentoo-doc-cvs] cvs commit: lvm-p1.xml Lukasz Damentko
  -- strict thread matches above, loose matches on Subject: below --
2005-09-21 10:22 Xavier Neys
2006-01-22  4:06 Shyam Mani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox