252 lines
4.6 KiB
HTML
252 lines
4.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Multiple partitions on the same disk</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="LVM HOWTO"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Disk partitioning"
|
|
HREF="diskpart.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Disk partitioning"
|
|
HREF="diskpart.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Sun disk labels"
|
|
HREF="sundisklabels.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
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="diskpart.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 12. Disk partitioning</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="sundisklabels.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="multpartitions"
|
|
></A
|
|
>12.1. Multiple partitions on the same disk</H1
|
|
><P
|
|
> LVM allows you to create PVs (physical volumes) out of almost any
|
|
block device so, for example, the following are all valid commands
|
|
and will work quite happily in an LVM environment:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> <B
|
|
CLASS="command"
|
|
># pvcreate /dev/sda1
|
|
# pvcreate /dev/sdf
|
|
# pvcreate /dev/hda8
|
|
# pvcreate /dev/hda6
|
|
# pvcreate /dev/md1</B
|
|
>
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
><P
|
|
> In a <SPAN
|
|
CLASS="QUOTE"
|
|
>"normal"</SPAN
|
|
> production system it is recommended that
|
|
only one PV exists on a single real disk, for the following
|
|
reasons:
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
> Administrative convenience
|
|
</P
|
|
><P
|
|
> It's easier to keep track of the hardware in a system if
|
|
each real disk only appears once. This becomes
|
|
particularly true if a disk fails.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> To avoid striping performance problems
|
|
</P
|
|
><P
|
|
> LVM can't tell that two PVs are on the same physical disk,
|
|
so if you create a striped LV then the stripes could be on
|
|
different partitions on the same disk resulting in a
|
|
<STRONG
|
|
>decrease</STRONG
|
|
> in performance
|
|
rather than an increase.
|
|
</P
|
|
></LI
|
|
></UL
|
|
>
|
|
|
|
However it may be desirable to do this for some reasons:
|
|
<P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
> Migration of existing system to LVM
|
|
</P
|
|
><P
|
|
> On a system with few disks it may be necessary to move
|
|
data around partitions to do the conversion (see
|
|
<A
|
|
HREF="upgraderoottolvm.html"
|
|
>Section 13.8</A
|
|
>)
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> Splitting one big disk between Volume Groups
|
|
</P
|
|
><P
|
|
> If you have a very large disk and want to have more than
|
|
one volume group for administrative purposes then it is
|
|
necessary to partition the drive into more than one area.
|
|
</P
|
|
></LI
|
|
></UL
|
|
>
|
|
</P
|
|
><P
|
|
> If you do have a disk with more than one partition and both of
|
|
those partitions are in the same volume group, take care to specify
|
|
which partitions are to be included in a logical volume when
|
|
creating striped volumes.
|
|
</P
|
|
><P
|
|
> The recommended method of partitioning a disk is to create a single
|
|
partition that covers the whole disk. This avoids any nasty
|
|
accidents with whole disk drive device nodes and prevents the
|
|
kernel warning about unknown partition types at boot-up.
|
|
</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="diskpart.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="sundisklabels.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Disk partitioning</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="diskpart.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Sun disk labels</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |