LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-22-2003, 12:54 AM   #1
neo.sarcastic
LQ Newbie
 
Registered: Aug 2003
Distribution: Slack
Posts: 15

Rep: Reputation: 0
Question 2nd hard drive


here's a dumb one...

How do i access, write to and switch over to the 2nd physical disk in my linux RH 7.1 box!!!!???? thanks to the book I am reading, beginners guide to admin linux, it has taken me through fdisk, mke2fs, and types of partitions but it forgot to explian one major thing.... how do i access it?!! i am logged in as root on the root partition / but what if i want to create a directory on the 2nd disk, and how do i name it? it is only known as, at this point to be /dev/hdb1 or 2 etc...

ie: Say i wanted to create a partition or directory called /test1 on this disk? all the space has been allocated to it but it still after running mke2fs it is still sitting there as /dev/hdb1? Have i missed something?

although i have to admit, this is more fun than everything going smoothly.
 
Old 09-22-2003, 01:14 AM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
To create directories on the drive you first have to make a partition.

To create a partition use fdisk /dev/hdb
If you have /dev/hdb1 then it seems like you have already created at least one partition on there.
If the parition that you created is of type ext2 most likely on redhat 7.1, should have been done while creating the partition then

All is good. All you have to do is mount the partition.
create a mount point
mkdir /mnt/drive2
/mnt contains all the mount points.
syntax : mount -t device type /device /mountpoint
ext2 > ext2, fat32 > vfat
ie if /dev/hdb1 is ext2
mount -t ext2 /dev/hdb1 /dev/drive2
then to create directorys simply cd to /mnt/drive2 and mkdir to create directorys or touch something to create a file etc.

Good Luck
 
Old 09-22-2003, 04:17 PM   #3
neo.sarcastic
LQ Newbie
 
Registered: Aug 2003
Distribution: Slack
Posts: 15

Original Poster
Rep: Reputation: 0
thank you for a quick response zatriz, i have just tried this proceedure to mount the 2nd HD. I first created the mount point by entering mkdir /drive2 from within the /mnt directory. = success.
Then when i enter the cmd:
mount -t ext2 /dev/hdb1 /dev/drive2 it gives me the responce: drive2 does not exist. however when i enter:
mount -t ext2 /dev/hdb1 /mnt/drive2, it goes right ahead and does it. This is because there was no drive2 in /dev. Have i done something wrong? this seems to be working, i can now go ahead and create dir's off of the drive2.
I of course will have to do this for all partitions i had created in fdisk: i had created 2 primary and an extended containing 3 others.

Thank you for your help!
 
Old 09-22-2003, 10:00 PM   #4
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
neo.sarcastic,

Sorry that was an error on my part. idiot me i didn't realize what i had typed. what you did is right. The mounted partition should be in the mnt folder /mnt/drive2. NOT /dev/drive2.
Remember that instead of calling it drive2 you can call it anything you want.
But yeah thats it and no there is nothing wrong.
 
Old 09-22-2003, 11:22 PM   #5
neo.sarcastic
LQ Newbie
 
Registered: Aug 2003
Distribution: Slack
Posts: 15

Original Poster
Rep: Reputation: 0
it's all good
Thanks for your help.
i decided to stick to drive# naming because it makes sense.

cheers!
 
  


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
2nd hard Drive grabro Linux - Hardware 1 02-05-2005 05:49 AM
2nd Hard Drive snutz411 Linux - Hardware 3 03-24-2004 12:52 PM
2nd hard drive naflan Debian 4 02-22-2004 02:55 PM
2nd Hard Drive Tad Linux - Hardware 6 05-22-2003 12:47 PM
2nd hard drive jarrodatt Linux - Hardware 1 11-12-2002 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:16 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