257 lines
3.7 KiB
HTML
257 lines
3.7 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Mount the new disk</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.56"><LINK
|
|
REL="HOME"
|
|
TITLE="Hard Disk Upgrade Mini How-To"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Format the new disk"
|
|
HREF="format.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Copy the files from the old disk to the new disk"
|
|
HREF="copy.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Hard Disk Upgrade Mini How-To</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="format.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="copy.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="MOUNT"
|
|
>6. Mount the new disk</A
|
|
></H1
|
|
><P
|
|
>Create a directory where you'll mount the new disk, for example
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/new-disk</TT
|
|
>,
|
|
and mount it there:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>mkdir /new-disk
|
|
mount -t ext2 /dev/hdb1 /new-disk</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>If the new disk will have more than one Linux partition, mount them
|
|
all under <TT
|
|
CLASS="FILENAME"
|
|
>/new-disk</TT
|
|
>
|
|
with the same organization they'll have later.</P
|
|
><DIV
|
|
CLASS="FORMALPARA"
|
|
><P
|
|
><B
|
|
>Example. </B
|
|
>The new disk will have four Linux partitions, as follows:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>/dev/hdb1: /
|
|
/dev/hdb2: /home
|
|
/dev/hdb3: /var
|
|
/dev/hdb4: /var/spool</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></DIV
|
|
><P
|
|
>Mount the four partitions under
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/new-disk</TT
|
|
> as follows:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>/dev/hdb1: /new-disk
|
|
/dev/hdb2: /new-disk/home
|
|
/dev/hdb3: /new-disk/var
|
|
/dev/hdb4: /new-disk/var/spool</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>You must create the mount points for each <I
|
|
CLASS="EMPHASIS"
|
|
>level</I
|
|
>
|
|
before you mount the partitions at that level.</P
|
|
><DIV
|
|
CLASS="FORMALPARA"
|
|
><P
|
|
><B
|
|
>Example. </B
|
|
> <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>mkdir /new-disk [1st level]
|
|
mount -t ext2 /dev/hdb1 /new-disk
|
|
|
|
mkdir /new-disk/home [2nd level]
|
|
mount -t ext2 /dev/hdb2 /new-disk/home
|
|
|
|
mkdir /new-disk/var [2nd level also]
|
|
mount -t ext2 /dev/hdb3 /new-disk/var
|
|
|
|
mkdir /new-disk/var/spool [3rd level]
|
|
mount -t ext2 /dev/hdb4 /new-disk/var/spool</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></DIV
|
|
><P
|
|
>If you've created a mount point at
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/new-disk/tmp</TT
|
|
>, you'll need to
|
|
correct the directory's permissions to let all users access it:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="PROGRAMLISTING"
|
|
>chmod 1777 /new-disk/tmp</PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="format.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="copy.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Format the new disk</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Copy the files from the old disk to the new disk</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |