Re: New HDD


Subject: Re: New HDD
From: Christopher E. Brown (cbrown@woods.net)
Date: Wed Mar 20 2002 - 23:37:13 AKST


On Wed, 20 Mar 2002, Adam Elkins wrote:
> I added another harddrive to my redhat 7.2 box, whats the command to
> format it and get redhat to be able to mount it?

Well, first you need to partition if for type 83 (Linux Extended)
and/or type 82 (Linux Swap).

(You can actually use a raw disk device, but alot of mamagement
software lacks the concept and whines, better not to)

Then use mke2fs

Depending on the size of the disk you may want to change the blocksize
and inode count from default. For example if a partition is > 4G and
is not primarily used for storing files < 2K then

mke2fs -b 4096 -i 16384 -m 5 -O sparse_super /dev/hd<xx>

<xx> being the drive and partition, for example first partition on
master on second bus is hdc1.

The above command sets a block size of 4k and one inode per 16k. For
partitions over 4G that are not storing > 250,000 small files this
works well and greatly improves speed of use and of fsck. It also
reserves 5% of the partitions space for root.

For ext2 1K/4K, 2K/8K, and 4K/16K are useable, over 4K/16K gets into
corner cases and can break things.

Also you could do a

tune2fs -c1 -i1d /dev/hda<xx>

This sets the fs_clean params such that a fsck will be forced every
boot.

If you are setting up a swap partition it would be

mkswap /dev/hd<xx>

You can use the -c option if you want to run a disk check as you
mkswap. Using late 2.2 or 2.4 kernels swap partition sizes > 128M are
useable, mkswap will automagicly creat a V2 swap format if needed.

You of course then hafto make and additions to /dev/fstab for
automount/etc params you wish.

----

I route, therefore you are.



This archive was generated by hypermail 2a23 : Wed Mar 20 2002 - 23:57:05 AKST