[GLLUG] Installing an additional HDD on Linux

Scott Harrison harris41 at msu.edu
Thu Oct 21 11:53:37 EDT 2004


Frank Louis Tuma wrote:

>
> I am running a Debian Sarge linux server and have a 120 Gb HDD that I 
> would like to install. I come from the windows realm where you just 
> plug the drive in, windows recognizes the new HDD and create a drive 
> for it. How would I go about configuring Debian to recognize the HDD 
> and make it part of my filesystem?
> Contents of /etc/fstab:
> # <file system> <mount point>   <type>  <options>       <dump>  <pass>
> proc            /proc           proc    defaults        0       0
> /dev/hda2       none            swap    sw              0       0
> /dev/hda1       /boot           ext3    defaults        0       2
> /dev/hda3       /               ext3    defaults,errors=remount-ro 
> 0       1
> Is it possible to make the additional HDD part of '/' or should I just 
> create a new mount point?
> Thanks!
> /:Frank
>
Hi Frank:

This is a bit informal (written on little sleep), and
perhaps there are those wanting to do more
exacting responses.

Chances are debian recognized the drive.
Try (command, probably as root):
 grep hd /var/log/dmesg

You will see "hda", do you see "hdb", "hdc", or "hdd"?

Maybe your debian has some graphical
tools to administer this?  If not, here is a brief
sketch of commands.

You would likely need to format it.
Use the fdisk command (DO NOT MESS WITH /dev/hda).
Then mkfs.
(Choose the one that you found when grepping /var/log/dmesg
/sbin/fdisk /dev/hdb
/sbin/fdisk /dev/hdc
/sbin/fdisk /dev/hdd)

Then, to test mount it,
mkdir /mnt/testmnt
mount /dev/hdb /mnt/testmnt
ls -al /mnt/testmnt

unmount
umount /mnt/testmnt

If that works, you can adjust your /etc/fstab
to mount it.  Preferably to something like
/var, /opt, /home, /usr.  Obviously, if
you make it your /usr partition, you will
want to be CAREFUL.  (The system will
have a hard time rebooting normally if you make
a mistake.)

As far as making "the additional HDD part of '/'",
I guess with RAID?  Not sure what your need is
in that regard, etc.

Regards,
Scott



More information about the linux-user mailing list