Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
question: adding a 2nd hard drive [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
elusive-dragon
n00b
n00b


Joined: 29 Mar 2005
Posts: 39
Location: jax, fl

PostPosted: Thu Apr 21, 2005 2:22 am    Post subject: question: adding a 2nd hard drive [solved] Reply with quote

ok ive added a 2nd hard drive a 120gb Samsung ide drive

the drive is labeled /dev/hdb1 (using fdisk)

set it up as an ext3 partition by doing mk2fs -j /dev/hdb1

my issue is how do i browse this new drive? its mounted on "/" but my main hard drive hda3 is also "/" so i dont know how to view the new drive and start using it.

my fstab is below; note that its all lined up fine in the fstab :D

none /dev/shm tmpfs defaults 0 0
/dev/hda1 /boot ext2 defaults,noatime 1 2
/dev/hda2 none swap sw 0 0
/dev/hda3 / ext3 noatime 0 1
/dev/hdb1 / ext3 noatime 0 1

none /proc proc defaults 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0

/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0

Can I edit something here? Or is there a command ive got to do so when system starts up the 2nd drive hdb1 is visible? I wanted to just label it as "storage" or something but ive tried a few things and havent got it yet.

thanks in advance :lol:
_________________
Mike - elusive-dragon

"a waste is a terrible thing to mind"

my system:
Gentoo box
Athlon Xp 2000
512mb pc 133 ram
10gb ide hard drive
120gb Samsung ide drive
3dfx agp video card
built in NIC
Turtle Beach 5.1 USB sound


Last edited by elusive-dragon on Thu Apr 21, 2005 11:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
masteroftheuniverse
Apprentice
Apprentice


Joined: 20 Jan 2005
Posts: 259

PostPosted: Thu Apr 21, 2005 2:38 am    Post subject: Reply with quote

do NOT mount them both at root. create a mount point anywhere within the / filesystem on hda3 and mount hdb1 there:

mkdir /mnt/hdb1
mount /dev/hdb1 /mnt/hdb1

and change the mount point in your fstab to /dev/hdb1

if you mount both to the same place you will see one or the other but not both. hda3 is already your root filesystem so mount that at / and mount the other somewhere underneath that.
Back to top
View user's profile Send private message
Nil_Spaar
Apprentice
Apprentice


Joined: 10 Jul 2004
Posts: 179
Location: Berlin, Germany

PostPosted: Thu Apr 21, 2005 2:40 am    Post subject: Reply with quote

You shouldn't mount two different drives to the same mountpoint especially not both to "/". The second mount usually hides the first one so if you try to mount hdb1 to "/" you can see your new drive there but can't access your main drive. Did you actually try this? Because I'm curious if it would actually result in what I described or if you would be stopped by some error msg.
Anyway mounting a second partition to "/" is a BadIdea!
You should create a directory (e.g. /mnt/storage) and then mount your new drive into that directory.
Code:

mkdir /mnt/storage
mount -t ext3 /dev/hdb1 /mnt/storage
cd /mnt/storage
# you are standing in your new drive now
df -h .
# should tell you how enormously much storage you have here

In your fstab you should change the "/" in the hdb1 line to "/mnt/storage" so that the above mounting is done automatically at each boot.
Back to top
View user's profile Send private message
elusive-dragon
n00b
n00b


Joined: 29 Mar 2005
Posts: 39
Location: jax, fl

PostPosted: Thu Apr 21, 2005 11:53 pm    Post subject: Reply with quote

thank you both for your help!

It seems to be working now, i just added a folder within /mnt and mounted it there....i didnt know it was that easy lol. Linux is so easy sometimes that I dont see whats right in front of me..

I kept getting errors when trying to mount such as "mount /dev/hdb1 /mnt/storage " would give me an error that mount point /mnt/storage didnt exist....DUH ME! I just had to create it lol

I learned something so its all good, thanks again.
_________________
Mike - elusive-dragon

"a waste is a terrible thing to mind"

my system:
Gentoo box
Athlon Xp 2000
512mb pc 133 ram
10gb ide hard drive
120gb Samsung ide drive
3dfx agp video card
built in NIC
Turtle Beach 5.1 USB sound
Back to top
View user's profile Send private message
elusive-dragon
n00b
n00b


Joined: 29 Mar 2005
Posts: 39
Location: jax, fl

PostPosted: Fri Apr 22, 2005 11:16 pm    Post subject: Reply with quote

ok not completely solved yet lol

how do i make my hard drive 2nd one (hdb) change label or mount point ...its currently "/" but my main drive is also "/" how do i change that?

also how do you make the system recognize that drive on bootup?

do i simply update the mtab file or rc.conf or something?

any help would be appreciated! thank you!
_________________
Mike - elusive-dragon

"a waste is a terrible thing to mind"

my system:
Gentoo box
Athlon Xp 2000
512mb pc 133 ram
10gb ide hard drive
120gb Samsung ide drive
3dfx agp video card
built in NIC
Turtle Beach 5.1 USB sound
Back to top
View user's profile Send private message
mmiller
n00b
n00b


Joined: 24 Apr 2005
Posts: 3
Location: US

PostPosted: Sun Apr 24, 2005 2:48 am    Post subject: Reply with quote

since you created /mnt/storage you will need to edit your /etc/fstab so that it will be mounted at boot.
this is explained in detail in the gentoo handbook under user documents.... here is the link.

8.a. Filesystem Information
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printable&full=1#book_part1_chap8

an example of a line for fstab would be something like

/dev/hdb1 /mnt/storage ext3 noatime 0 0

-- m
Back to top
View user's profile Send private message
elusive-dragon
n00b
n00b


Joined: 29 Mar 2005
Posts: 39
Location: jax, fl

PostPosted: Wed Apr 27, 2005 4:32 am    Post subject: Reply with quote

mmiller - thank you!

I cant believe how simple it was lol I just couldnt figure out how to change things around and it was in front of my face the whole time!!!!
_________________
Mike - elusive-dragon

"a waste is a terrible thing to mind"

my system:
Gentoo box
Athlon Xp 2000
512mb pc 133 ram
10gb ide hard drive
120gb Samsung ide drive
3dfx agp video card
built in NIC
Turtle Beach 5.1 USB sound
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum