LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2005, 12:07 AM   #1
jkmartha
Member
 
Registered: Apr 2005
Location: india
Distribution: Redhat 9
Posts: 66

Rep: Reputation: 15
adding new hard disk


distro - redhat enterprise 4.
i want to add another hard disk (ATA) to my system. how should i go about it ? how to partition and format ? pliz write the procedures.
 
Old 08-19-2005, 12:54 AM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
1. Make sure it's jumpered correctly, power down the PC.
2. Install the extra drive, power up.
3. Run: cfdisk <device>
For reference, /dev/hda = primary master, /dev/hdb = primary slave, /dev/hdc = secondary master, /dev/hdd = secondary slave
4. Partition it as you wish, save and exit
5. Format it, which basically depends on the file system you are using. For example, to format /dev/hda1 as reiserfs, run "mkreiserfs /dev/hda1"
6. Mount it to your mountpoint. Run: mount /dev/<device> /<mountpoint>

-- J.W.
 
Old 08-19-2005, 12:55 AM   #3
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
I use cfdisk to partition my disks. It comes with Gentoo but it can be installed on any Linux distro I think. It will work on Redhat just like any other distro. You can use fdisk but it makes my brain hurt when I use it. I just never did get that program. Almost like vi for a editer.

Code:
cfdisk /dev/hda
That is for the first drive. hdb for second drive, etc.

As to formating the disks, that depends on what file system you want to use. Here is some info pasted from the Gentoo install guide:

Quote:
Filesystems?

The Linux kernel supports various filesystems. We'll explain ext2, ext3, ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux systems.

ext2 is the tried and true Linux filesystem but doesn't have metadata journaling, which means that routine ext2 filesystem checks at startup time can be quite time-consuming. There is now quite a selection of newer-generation journaled filesystems that can be checked for consistency very quickly and are thus generally preferred over their non-journaled counterparts. Journaled filesystems prevent long delays when you boot your system and your filesystem happens to be in an inconsistent state.

ext3 is the journaled version of the ext2 filesystem, providing metadata journaling for fast recovery in addition to other enhanced journaling modes like full data and ordered data journaling. ext3 is a very good and reliable filesystem. It has an additional hashed b-tree indexing option that enables high performance in almost all situations. You can enable this indexing by adding -O dir_index to the mke2fs command. In short, ext3 is an excellent filesystem.

ReiserFS is a B*-tree based filesystem that has very good overall performance and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is solid and usable as both general-purpose filesystem and for extreme cases such as the creation of large filesystems, the use of many small files, very large files and directories containing tens of thousands of files.
Here is the commands to use:

Quote:
Filesystem Creation Command
ext2 mke2fs
ext3 mke2fs -j
reiserfs mkreiserfs
It usually goes something like this:

Code:
mke2fs /dev/hda1
mke2fs -j /dev/hda1
mkreiserfs /dev/hda1
Where a is the primary master drive and the 1 is the first partition. cfdisk should tell what they are when you partition the drive. If you use reiserfs then just use the proper command and the proper device.

That said, I usually boot from the CD to do this. If the drive is not mounted you do not usually have to reboot for the partition table to be written and re-read. I personally use reiserfs and have no trouble as of yet. I use a 2.6 kernel though. My /boot partition is ext2 because grub likes it that way. It works, I'm not complaining.

Oh, if you need to make one a swap partition, mkswap and then the partition info. Don't forget to add it to fstab so it will use it though.

I hope that helps a little.

Later

 
Old 08-19-2005, 01:09 AM   #4
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
Oh, cfdisk has a cheat sheet at the bottom with the commands. Use the arrow keys to move around. I forgot that tid bit of info. I'm getting old OK. I'll be 38 in a couple weeks. I feel like 76 though.

Later

 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB - adding new hard disk gedi1 Linux - General 2 06-16-2004 07:16 PM
Problems adding a hard disk dirxx Linux - Hardware 1 05-10-2004 10:57 AM
adding a hard disk after instalation (slackware) kyoukan Linux - Software 0 05-10-2003 08:02 PM
Adding a hard disk mastahnke Linux - Hardware 15 11-27-2002 07:25 PM
Adding a hard disk in Mandrake aizkorri Linux - General 3 03-26-2002 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration