old-www/LDP/LG/issue50/tag/30.html

252 lines
9.4 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.3B.f">
<TITLE>The Answer Guy 50: Adding a Disk</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Guy</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
LinuxCare,
<A HREF="http://www.linuxcare.com/">http://www.linuxcare.com/</A>
</H4>
</center>
<p><hr><p>
<!-- endcut ======================================================= -->
<!-- begin 30 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Adding a Disk</H3>
<p><strong>From Samuel Q Roodman on Tue, 11 Jan 2000
</strong></p>
<!-- ::
Adding a Disk
~~~~~~~~~~~~~
:: -->
<P><STRONG>
I recently got Mandrake 6.1 up and running on Pentium 90 with 48
mb of ram. The question I have is: The system is running with a
scsi drive and I wish to add another. How do I access the drive
to format it and then access the directories once its formated?
</STRONG></P>
<BLOCKQUOTE><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Add the new drive by assigning it a unique SCSI ID
for the bus/cable on which you are adding it, and
resolving any termination issues that come up.
</BLOCKQUOTE>
<BLOCKQUOTE>
Once you've restored your system to functionality ---
with the new drive physically/electronically
connected then it's easy.
</BLOCKQUOTE>
<BLOCKQUOTE><ol>
<li>run: <tt>fdisk /dev/sdb</TT>
<br>(Assuming you only have one drive now,
the new drive should be <TT>/dev/sdb</TT>).
<li> create any partitions you like on the
new drive. BE CAREFUL! Don't blow away
partitions on your old drive. I recommend
that your existing drives be assigned
IDs that are numerically than the new drive(s).
<li>for each partition:
<br><tt>mke2fs -c /dev/sdbX</TT>
<br>.... BE CAREFUL! Make sure that you use the
appropriate <TT>/dev/sd?</TT> node or you'll format
one of your existing filesystems.
<li> edit your <TT>/etc/fstab</TT>. I use a text editor (<tt>vi</tt>
or <tt>xemacs</tt> in vi emulation mode), but there are
several user interfaces (GUIs and text/curses
menuing systems) that can help you with that.
</ol></BLOCKQUOTE>
<BLOCKQUOTE>
Typical new entries might look something like:
</BLOCKQUOTE>
<blockquote><pre>/dev/sdb1 /u1 ext2 defaults 1 0
/dev/sdb2 /u2 ext2 defaults 2 0
</pre></blockquote>
<BLOCKQUOTE>
... The device names should match the ones
you used for those <tt>mke2fs</tt> commands. The second
column lists "mount points" which should be
empty directories that you create wherever it
suits your needs. You can name them anything
you like (pretty much).
</BLOCKQUOTE>
<BLOCKQUOTE>
Read the <tt>fstab(5)</tt> man page using the command:
<br><tt>man fstab</tt>
</BLOCKQUOTE>
<BLOCKQUOTE>
... the (5) is a UNIX convention for referring to a
keyword or man page reference by specifying which
chapter or section of the man pages is appropriate.
</BLOCKQUOTE>
<BLOCKQUOTE>
(That convention arose because many system calls,
library functions, and commands and some commands
and their configuration files have the same
names).
</BLOCKQUOTE>
<BLOCKQUOTE>
That's basically all there is to it. Once you've physically
connected the new drives, you can do all of this (including
mounting the new filesystems and using them) without
rebooting.
</BLOCKQUOTE>
<BLOCKQUOTE>
Note that the example as given would automatically
mount these new filesystems on reboot. To use these
filesystems after editing the fstab and WITHOUT rebooting
simply issue a series of commands like:
</BLOCKQUOTE>
<BLOCKQUOTE><BlockQuote><Code>
mount /u1; mount /dev/sdb2
</Code></BlockQuote></BLOCKQUOTE>
<BLOCKQUOTE>
... where you refer to the unique value in either of the
first two columns/fields of the fstab entries (the device
or the mount point). The mount command will search the
fstab for a matching entry and supply the rest of its
arguments therefrom.
</BLOCKQUOTE>
<BLOCKQUOTE>
(Of course you can read the mount(8) man page for info
on mounting filesystems without editing the fstab file.
To do a temporary mount you simply provide all of the
details on the mount command line, and leave your
fstab alone).
</BLOCKQUOTE>
<BLOCKQUOTE>
Note: if you mount a filesystem over a non-empty
directory there will be no harm done. However the
underlying contents will be inaccessible (hidden)
until you umount the overlaid fs. This is NOT
recommended practice, so you should consider it a
mistake if you do this.
</BLOCKQUOTE>
<!-- sig -->
<!-- end 30 -->
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2000, James T. Dennis
<BR>Published in <I>The Linux Gazette</I> Issue 50 February 2000</H5>
<H6 ALIGN="center">HTML transformation by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<P> <hr> <P>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<TABLE WIDTH="95%"><TR VALIGN="center" ALIGN="center">
<TD colspan="2" rowspan="2"><A
HREF="../lg_answer50.html"
><IMG SRC="../../gx/dennis/answernew.gif"
ALT="[ Answer Guy Current Index ]"></A>
<TD colspan="2" rowspan="2"><A
HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answertoc.gif"
ALT="[ Index of Past Answers ]"></A></td>
<TD WIDTH="11%"><A HREF="../lg_answer50.html#greeting"><img
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A></TD>
<TD WIDTH="11%"><A HREF="1.html">1</A></TD>
<TD WIDTH="11%"><A HREF="2.html">2</A></TD>
<TD WIDTH="11%"><A HREF="3.html">3</A></TD>
<TD WIDTH="11%"><A HREF="4.html">5</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="11%"><A HREF="5.html">5</A></TD>
<TD WIDTH="11%"><A HREF="6.html">6</A></TD>
<TD WIDTH="11%"><A HREF="7.html">7</A></TD>
<TD WIDTH="11%"><A HREF="8.html">8</A></TD>
<TD WIDTH="11%"><A HREF="9.html">9</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="10.html">10</A></TD>
<TD WIDTH="10%"><A HREF="11.html">11</A></TD>
<TD WIDTH="10%">&nbsp;</TD>
<TD WIDTH="10%"><A HREF="13.html">13</A></TD>
<TD WIDTH="11%"><A HREF="14.html">14</A></TD>
<TD WIDTH="11%"><A HREF="15.html">15</A></TD>
<TD WIDTH="11%"><A HREF="16.html">16</A></TD>
<TD WIDTH="11%"><A HREF="17.html">17</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="18.html">18</A></TD>
<TD WIDTH="10%"><A HREF="19.html">19</A></TD>
<TD WIDTH="10%"><A HREF="20.html">20</A></TD>
<TD WIDTH="10%"><A HREF="21.html">21</A></TD>
<TD WIDTH="11%"><A HREF="22.html">22</A></TD>
<TD WIDTH="11%"><A HREF="23.html">23</A></TD>
<TD WIDTH="11%"><A HREF="24.html">24</A></TD>
<TD WIDTH="11%">&nbsp;</TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="26.html">26</A></TD>
<TD WIDTH="10%"><A HREF="27.html">27</A></TD>
<TD WIDTH="10%"><A HREF="28.html">28</A></TD>
<TD WIDTH="10%"><A HREF="29.html">29</A></TD>
<TD WIDTH="11%"><A HREF="30.html">30</A></TD>
<TD WIDTH="11%"><A HREF="31.html">31</A></TD>
<TD WIDTH="11%"><A HREF="32.html">32</A></TD>
<TD WIDTH="11%"><A HREF="33.html">33</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="34.html">34</A></TD>
<TD WIDTH="10%">&nbsp;</TD>
<TD WIDTH="10%"><A HREF="36.html">36</A></TD>
<TD WIDTH="10%"><A HREF="37.html">37</A></TD>
<TD WIDTH="11%"><A HREF="38.html">38</A></TD>
<TD WIDTH="11%"><A HREF="39.html">39</A></TD>
<TD WIDTH="11%"><A HREF="40.html">42</A></TD>
<TD WIDTH="11%"><A HREF="41.html">41</A></TD>
</TR><TR VALIGN="center" ALIGN="center">
<TD WIDTH="10%"><A HREF="42.html">42</A></TD>
<TD WIDTH="10%"><A HREF="43.html">43</A></TD>
<TD WIDTH="10%"><A HREF="44.html">44</A></TD>
<TD WIDTH="10%"><A HREF="45.html">45</A></TD>
<TD WIDTH="11%"><A HREF="46.html">46</A></TD>
<TD WIDTH="11%"><A HREF="47.html">47</A></TD>
<TD WIDTH="11%"><A HREF="48.html">48</A></TD>
</TR></TABLE>
</TR><TR VALIGN="center" ALIGN="center">
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<P> <hr> <P>
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="../index.html"
><IMG SRC="../../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
<A HREF="../../index.html"
><IMG SRC="../../gx/homenew.gif" ALT="[ Front Page ]"></A>
<A HREF="../lg_bytes50.html"
><IMG SRC="../../gx/back2.gif" ALT="[ Previous Section ]"></A>
<A HREF="../../faq/index.html"
><IMG SRC="../../gx/dennis/faq.gif"
ALT="[ Linux Gazette FAQ ]"></A>
<A HREF="../lg_tips50.html"
><IMG SRC="../../gx/fwd.gif" ALT="[ Next Section ]"></A>
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->