Linux Server Diary

The trials and tribulations of a Linux newbie trying to setup a home server.

Saturday, November 20, 2004

Disk Thing II - The Solution

Remember last time I was stuck on an error:

/dev/hdd1: Invalid argument passed to ext2 library while setting up superblock

I looked up the error in Google. Didn't find any direct help, but I did find another link explaining how to add a new drive:
Partitioning and Formatting a New Drive

In this post, the author creates a primary partition instead of an extended one as I did. After rerunning fdisk with this new information, the format went just fine. below are the corrected instructions:

First, partition the drive. This will erase any data on the disk.

Partition the disk using fdisk
fdisk /dev/hdd

Delete the existing partition
Command: d

Add a new partition
Command: n

Make it PRIMARY
Command action p

Specify the first partition
Partition number (1-4): 1

Start with the first cylinder
First cylinder (1-xxxx, default=1): [enter]

Use them all
Last cylinder (default=xxxx): [enter]

View the results
Command: p

Write the partition table and exit (no undo!)
Command: w


Now, format the drive using ext3.

Issue format command
mkfs -t ext3 /dev/hdd1


The format worked great.

Now let's mount this sucker.

Make a directory for the mount (mine was already there)
mkdir /mnt/hdd1

Add this line to /etc/fstab
/dev/hdd1 /mnt/hdd1 ext3 defaults 0 0

Test the mount
mount /dev/hdd1

Check the results
df

If everything worked, you should see your new drive in the output:
Filesystem            Size  Used Avail Use% Mounted on

/dev/ide/host0/bus0/target0/lun0/part1
6.8G 1.6G 5.0G 24% /
/dev/ide/host0/bus1/target1/lun0/part1
74G 33M 70G 1% /mnt/hdd1

Next time, the new directory layout.

0 Comments:

Post a Comment

<< Home