03/11/09
Adding A Second Hard Drive To Ubuntu Server![]() In How To Build A Headless Server I wrote about building a Ubuntu server that hosts my web development as well as Windows 2000 Advanced server running in a virtual server. The box that I used to build the server is a Compaq D51C (P2.4GHz, 40G HD, 256M RAM) box that I purchased at a auction from a local school district. I added a couple of Gig of RAM and tried to run W2K as well as XP in the virtual server but it maxed out the CPU and really slowed down the performance. So I dropped the RAM to 1.23GB and am just runing LAMP and the W2K server. Since the 40GB hard drive quickly filled up and one can never have enough storage I purchased a 320GB hard drive. In this article I'll walk through adding this second hard drive to the server. ... After physically installing the drive and firing up the machine the first step is to determine what Linux sees. This is accomplished using the fdisk command.
fdisk -l lists the second drive as /dev/sdb. So the next step is to add a partition. Again the fdisk command will be used. After you run the command it will display a prompt that you may press m for the help screen as shown below.
Since we are going to partition the whole drive using one partition we will make the partition a Primary partition. To add a new partition use the 'n' command, enter p to select the primary partition and enter 1. After the partition is created, print the partition table to check your work. If all looks well use the 'w' command to save the changes and exit.
Now that we have a partition defined we need to create format the partition using the EXT3
By default, ext2 and ext3 filesystems reserve 5% of the capacity of the partition for root, such that if the users fill up the partition, services running as root (as well as commands the root user runs) don't fail right away. Since this is going to be a data drive we are going to reduce the reserve to 1%.
Now the only thing left to do is mount the drive and share it so it can be used across the network. The first thing to do is to make a directory to mount the drive to. I'm going to be real creative here, but you can create a directory anywhere you like. Then I'll add the line in /etc/fstab that will automatically mount the partition to the directory.
Now I'll mount the partition.
As you can see adding a second hard drive is not rocket science. Just use a little care and common sense and you will be fine. No feedback yet |
![]()
Contact • ©2012 by jim •
Powered by b2evolution
• blog software • blog hosting • Francois
Theme designed by Alex (sam2kb) Russian b2evolution |