466 lines
7.1 KiB
HTML
466 lines
7.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Recipes</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="LVM HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Sun disk labels"
|
|
HREF="sundisklabels.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Setting up LVM on three SCSI disks"
|
|
HREF="recipethreescsi.html"></HEAD
|
|
><BODY
|
|
CLASS="chapter"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>LVM HOWTO</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="sundisklabels.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="recipethreescsi.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="chapter"
|
|
><H1
|
|
><A
|
|
NAME="recipes"
|
|
></A
|
|
>Chapter 13. Recipes</H1
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
>13.1. <A
|
|
HREF="recipethreescsi.html"
|
|
>Setting up LVM on three SCSI disks</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.1.1. <A
|
|
HREF="recipethreescsi.html#AEN1056"
|
|
>Preparing the disks</A
|
|
></DT
|
|
><DT
|
|
>13.1.2. <A
|
|
HREF="recipethreescsi.html#AEN1066"
|
|
>Setup a Volume Group</A
|
|
></DT
|
|
><DT
|
|
>13.1.3. <A
|
|
HREF="recipethreescsi.html#AEN1078"
|
|
>Creating the Logical Volume</A
|
|
></DT
|
|
><DT
|
|
>13.1.4. <A
|
|
HREF="recipethreescsi.html#AEN1085"
|
|
>Create the File System</A
|
|
></DT
|
|
><DT
|
|
>13.1.5. <A
|
|
HREF="recipethreescsi.html#AEN1091"
|
|
>Test the File System</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.2. <A
|
|
HREF="recipethreescsistripe.html"
|
|
>Setting up LVM on three SCSI disks with striping</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.2.1. <A
|
|
HREF="recipethreescsistripe.html#AEN1106"
|
|
>Preparing the disk partitions</A
|
|
></DT
|
|
><DT
|
|
>13.2.2. <A
|
|
HREF="recipethreescsistripe.html#AEN1116"
|
|
>Setup a Volume Group</A
|
|
></DT
|
|
><DT
|
|
>13.2.3. <A
|
|
HREF="recipethreescsistripe.html#AEN1128"
|
|
>Creating the Logical Volume</A
|
|
></DT
|
|
><DT
|
|
>13.2.4. <A
|
|
HREF="recipethreescsistripe.html#AEN1138"
|
|
>Create the File System</A
|
|
></DT
|
|
><DT
|
|
>13.2.5. <A
|
|
HREF="recipethreescsistripe.html#AEN1144"
|
|
>Test the File System</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.3. <A
|
|
HREF="recipeadddisk.html"
|
|
>Add a new disk to a multi-disk SCSI system</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.3.1. <A
|
|
HREF="recipeadddisk.html#AEN1155"
|
|
>Current situation</A
|
|
></DT
|
|
><DT
|
|
>13.3.2. <A
|
|
HREF="recipeadddisk.html#AEN1164"
|
|
>Prepare the disk partitions</A
|
|
></DT
|
|
><DT
|
|
>13.3.3. <A
|
|
HREF="recipeadddisk.html#AEN1199"
|
|
>Add the new disks to the volume groups</A
|
|
></DT
|
|
><DT
|
|
>13.3.4. <A
|
|
HREF="recipeadddisk.html#AEN1209"
|
|
>Extend the file systems</A
|
|
></DT
|
|
><DT
|
|
>13.3.5. <A
|
|
HREF="recipeadddisk.html#AEN1221"
|
|
>Remount the extended volumes</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.4. <A
|
|
HREF="snapshots_backup.html"
|
|
>Taking a Backup Using Snapshots</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.4.1. <A
|
|
HREF="snapshots_backup.html#snapbackcreate"
|
|
>Create the snapshot volume</A
|
|
></DT
|
|
><DT
|
|
>13.4.2. <A
|
|
HREF="snapshots_backup.html#AEN1243"
|
|
>Mount the snapshot volume</A
|
|
></DT
|
|
><DT
|
|
>13.4.3. <A
|
|
HREF="snapshots_backup.html#AEN1253"
|
|
>Do the backup</A
|
|
></DT
|
|
><DT
|
|
>13.4.4. <A
|
|
HREF="snapshots_backup.html#AEN1259"
|
|
>Remove the snapshot</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.5. <A
|
|
HREF="removeadisk.html"
|
|
>Removing an Old Disk</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.5.1. <A
|
|
HREF="removeadisk.html#AEN1272"
|
|
>Distributing Old Extents to Existing Disks in Volume Group</A
|
|
></DT
|
|
><DT
|
|
>13.5.2. <A
|
|
HREF="removeadisk.html#AEN1291"
|
|
>Distributing Old Extents to a New Replacement Disk</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.6. <A
|
|
HREF="recipemovevgtonewsys.html"
|
|
>Moving a volume group to another system</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.6.1. <A
|
|
HREF="recipemovevgtonewsys.html#AEN1325"
|
|
>Unmount the file system</A
|
|
></DT
|
|
><DT
|
|
>13.6.2. <A
|
|
HREF="recipemovevgtonewsys.html#AEN1330"
|
|
>Mark the volume group inactive</A
|
|
></DT
|
|
><DT
|
|
>13.6.3. <A
|
|
HREF="recipemovevgtonewsys.html#AEN1336"
|
|
>Export the volume group</A
|
|
></DT
|
|
><DT
|
|
>13.6.4. <A
|
|
HREF="recipemovevgtonewsys.html#AEN1342"
|
|
>Import the volume group</A
|
|
></DT
|
|
><DT
|
|
>13.6.5. <A
|
|
HREF="recipemovevgtonewsys.html#AEN1356"
|
|
>Activate the volume group</A
|
|
></DT
|
|
><DT
|
|
>13.6.6. <A
|
|
HREF="recipemovevgtonewsys.html#AEN1361"
|
|
>Mount the file system</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.7. <A
|
|
HREF="recipesplitvg.html"
|
|
>Splitting a volume group</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.7.1. <A
|
|
HREF="recipesplitvg.html#AEN1369"
|
|
>Determine free space</A
|
|
></DT
|
|
><DT
|
|
>13.7.2. <A
|
|
HREF="recipesplitvg.html#AEN1375"
|
|
>Move data off the disks to be used</A
|
|
></DT
|
|
><DT
|
|
>13.7.3. <A
|
|
HREF="recipesplitvg.html#AEN1388"
|
|
>Create the new volume group</A
|
|
></DT
|
|
><DT
|
|
>13.7.4. <A
|
|
HREF="recipesplitvg.html#AEN1394"
|
|
>Remove remaining volume</A
|
|
></DT
|
|
><DT
|
|
>13.7.5. <A
|
|
HREF="recipesplitvg.html#AEN1402"
|
|
>Create new logical volume</A
|
|
></DT
|
|
><DT
|
|
>13.7.6. <A
|
|
HREF="recipesplitvg.html#AEN1408"
|
|
>Make a file system on the volume</A
|
|
></DT
|
|
><DT
|
|
>13.7.7. <A
|
|
HREF="recipesplitvg.html#AEN1413"
|
|
>Mount the new volume</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.8. <A
|
|
HREF="upgraderoottolvm.html"
|
|
>Converting a root filesystem to
|
|
LVM 1</A
|
|
></DT
|
|
><DD
|
|
><DL
|
|
><DT
|
|
>13.8.1. <A
|
|
HREF="upgraderoottolvm.html#AEN1436"
|
|
>Boot single user</A
|
|
></DT
|
|
><DT
|
|
>13.8.2. <A
|
|
HREF="upgraderoottolvm.html#AEN1440"
|
|
>Run Parted</A
|
|
></DT
|
|
><DT
|
|
>13.8.3. <A
|
|
HREF="upgraderoottolvm.html#AEN1455"
|
|
>Reboot</A
|
|
></DT
|
|
><DT
|
|
>13.8.4. <A
|
|
HREF="upgraderoottolvm.html#AEN1458"
|
|
>Verify kernel config options</A
|
|
></DT
|
|
><DT
|
|
>13.8.5. <A
|
|
HREF="upgraderoottolvm.html#AEN1461"
|
|
>Adjust partition type</A
|
|
></DT
|
|
><DT
|
|
>13.8.6. <A
|
|
HREF="upgraderoottolvm.html#AEN1471"
|
|
>Set up LVM 1 for the new scheme</A
|
|
></DT
|
|
><DT
|
|
>13.8.7. <A
|
|
HREF="upgraderoottolvm.html#AEN1490"
|
|
>Create the Filesystem</A
|
|
></DT
|
|
><DT
|
|
>13.8.8. <A
|
|
HREF="upgraderoottolvm.html#AEN1495"
|
|
>Update /etc/fstab</A
|
|
></DT
|
|
><DT
|
|
>13.8.9. <A
|
|
HREF="upgraderoottolvm.html#AEN1500"
|
|
>Create an LVM 1 initial RAM disk</A
|
|
></DT
|
|
><DT
|
|
>13.8.10. <A
|
|
HREF="upgraderoottolvm.html#AEN1505"
|
|
>Update /etc/lilo.conf</A
|
|
></DT
|
|
><DT
|
|
>13.8.11. <A
|
|
HREF="upgraderoottolvm.html#AEN1513"
|
|
>Run LILO to write the new boot sector</A
|
|
></DT
|
|
><DT
|
|
>13.8.12. <A
|
|
HREF="upgraderoottolvm.html#AEN1517"
|
|
>Reboot to lvm</A
|
|
></DT
|
|
><DT
|
|
>13.8.13. <A
|
|
HREF="upgraderoottolvm.html#AEN1523"
|
|
>Add remainder of disk</A
|
|
></DT
|
|
></DL
|
|
></DD
|
|
><DT
|
|
>13.9. <A
|
|
HREF="recovermetadata.html"
|
|
>Recover physical volume metadata</A
|
|
></DT
|
|
></DL
|
|
></DIV
|
|
><P
|
|
> This section details several different <SPAN
|
|
CLASS="QUOTE"
|
|
>"recipes"</SPAN
|
|
> for
|
|
setting up lvm. The hope is that the reader will adapt these recipes
|
|
to their own system and needs.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="sundisklabels.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="recipethreescsi.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Sun disk labels</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Setting up LVM on three SCSI disks</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |