LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-24-2002, 06:15 PM   #1
Witch-King
LQ Newbie
 
Registered: Dec 2002
Location: California, US
Distribution: RedHat-8.0
Posts: 14

Rep: Reputation: 0
Installing a new Hard Drive


I've searched all over the forums and I can't find a simple set of instructions on how to go about setting up a new hard drive under Linux.

Here's my current setup:

Primary Master - 13 GB IDE (RedHat 8.0 Installed) - /dev/hda
SCSI - 9GB (Nothing) - /dev/sda
SCSI - 9GB (Nothing) - /dev/sdb

I'd like to be able to use the two SCSI drives for storage, but I'm unlear on what steps I need to follow to accomplish that.

As I understand it presently the rough process is:

1. Partition the drives (I will have a single partition on each - Not sure of the commands)
2. Format the drives (Not sure of the commands)
3. Mount the drives (Again, not sure of the commands).

Can anyone provide me with a simple guide for installing another hard drive in Linux?
 
Old 12-24-2002, 07:38 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Well, I'd go into it, but lucky for us not too long ago Aussie wrote about how he swapped drives. Now the directions apply for swapping to all new drives the entire OS, but the idea still applies for simply adding another HD just for storage. Here's my quick and dirty, then for more info check out the link:

1. Partition with fdisk (man fdisk)
2. Format with ext3 (mke2fs -j /dev/sda1 mke2fs -j /dev/sdb1)
3. Mount the drives, oh let's say /mnt/data and /mnt/storage (first make the directories:
mkdir /mnt/data
mkdir /mnt/storage
Then mount em:
mount -t ext3 /dev/sda1 /mnt/data
mount -t ext3 /dev/sdb1 /mnt/storage)

If you like how they mount and where they do, edit your /etc/fstab to have them mount everytime..

http://www.p-two.net/modules.php?op=...article&sid=12 (Aussie's website)

Cool
 
Old 12-24-2002, 10:39 PM   #3
Witch-King
LQ Newbie
 
Registered: Dec 2002
Location: California, US
Distribution: RedHat-8.0
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks MasterC, I really appreciate the help. I have just a few other questions. Everything works o.k. as you indicated. I used fdisk to create the partitions, mounted them as /mnt/scsi and mnt/scsi1 and I'm able to access them for read/write operations.

The problem is, when I try to add them to /etc/fstab, I get a whole bunch of errors. Probably because I don't have a clue what I'm doing. Here is what my /etc/fstab looks like:

Code:
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/hda3               swap                    swap    defaults        0 0
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1             /mnt/cdrom1             iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
/dev/sda                /mnt/scsi               ext3    defaults        0 0
/dev/sdb                /mnt/scsi1              ext3    defaults        0 0
Is there a particular order that I'm supposed to do this in? I didn't really know what to put for the options, so I just sorta guessed based on what was there to begin with.

Any help would be greatly appreciated as I'd like these disks to get mounted at the time of boot.
 
Old 12-24-2002, 10:45 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
When you mount them, and everything is working fine, do you actually use /dev/sda or is it /dev/sda1 OR /dev/scd1 or what?

I think that's the part that is getting screwed up.

fdisk -l (FDISK -L lowercase) lists all your drives/partititions, maybe that'll help you to see what you need to put in place of /dev/sda and /dev/sdb

And, you're welcome

Welcome to LQ btw

Cool
 
Old 12-24-2002, 11:35 PM   #5
Witch-King
LQ Newbie
 
Registered: Dec 2002
Location: California, US
Distribution: RedHat-8.0
Posts: 14

Original Poster
Rep: Reputation: 0
Yeah, call me an idiot. I didn't even pick up on that. Changing it to /etc/sda1 and /etc/sdb1 fixed the problem.

Now, the only other issue is, I created the /mnt/scsi and /mnt/scsi1 directories as root. I notice that when I login as a different user, I'm unable to write to those directories. Right now /mnt/scsi and /mnt/scsi1 are both chmod 755. Do I need to set them as 777?

Maybe I'll just give that a shot and see where it gets me.
 
Old 12-26-2002, 03:15 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
755 will give the owner (probably root) permissions to do whatever, users and world permissions to read (and execute?). 777 is to let everyone read/write/execute

So yeah, if you want everyone to read/write/execute, then that's what you should do. I'd go a bit further and change group ownership to users, but that's just me.

Cool
 
Old 12-26-2002, 03:23 AM   #7
Witch-King
LQ Newbie
 
Registered: Dec 2002
Location: California, US
Distribution: RedHat-8.0
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by MasterC
I'd go a bit further and change group ownership to users, but that's just me.
How might I go about accomplishing that?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM
Installing From Hard Drive 2Gnu Slackware - Installation 0 07-10-2004 07:53 PM
Installing New Hard Drive coopedw Mandriva 2 03-11-2004 07:15 PM
Installing third hard drive tomarsyd Linux - Hardware 1 03-26-2003 11:41 PM
Installing 8.1 on second hard drive mjcalling Linux - Newbie 7 02-20-2002 12:11 PM


All times are GMT -5. The time now is 08:34 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration