LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 01-26-2010, 03:56 PM   #1
bjlatt
LQ Newbie
 
Registered: Mar 2004
Location: Texas
Posts: 14

Rep: Reputation: 0
Mount 2nd Hard disk


Forgive the simplicity of this, but is it possible to mount a 2nd hard disk without erasing the data that is already on it? If so, what command must I enter. The system recognizes that thedisk is there, I just can't access the data because it hasn't been mountred.

Thank you
 
Old 01-26-2010, 04:01 PM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hello,

Mounting a disk doesn't do anything other then make a file system accessible. So you can easily mount it and then access the data on it. The most simplest way is to create a directory and then mount your disk:
Code:
mkdir /mnt/mydisk
mount /dev/yourdevice /mnt/mydisk
There are a lot of options that you can give to mount. Check them out with
Code:
man mount
Kind regards,

Eric
 
Old 01-26-2010, 04:02 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Why would mounting a disk possibly erase the data on it?

Just use the command (as root):

Code:
mount /dev/??? /path/to/mount/point
And to unmount (as root):

Code:
umount /path/to/mount/point
Note that the command is umount, not unmount.
 
Old 01-26-2010, 04:05 PM   #4
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
Yes this is possible. You can do it in a command terminal very easily. To do it you must have root privileges so you want to either su to become root or use sudo to mount the drive.

First you need a mount point. I like to just create folder in /media.
Code:
sudo mkdir /media/drive2
Next you want to find out what the device assignment is for the drive. to do this I like to use fdisk
Code:
sudo fdisk -l
You should see /dev/sda or /dev/hda for your primary drive. You should also see your 2nd drive listed as /dev/sdb or /dev/hdb

Assuming your 2nd disk is /dev/sdb you can mount it to your mount point by using the mount command. The mount command works like so
Code:
 sudo mount -t [filesystem type] [device partition to be mounted] [location of mount point]
so assuming that you have 1 partition on your 2nd drive and it is a Windows ntfs partition you could mount it like this
Code:
 sudo mount -t ntfs-3g /dev/sdb1 /media/drive2
Then you can view the contents of the 2nd drive by going to /media/drive2
 
Old 01-26-2010, 04:09 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
I didn't know about fdisk -l, it seems very helpful!
 
Old 01-26-2010, 04:22 PM   #6
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
I like fdisk -l. It is good for listing the partition tables of a drive so you can see what is going on.
 
  


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
Mounting and using 2nd hard disk daveturnbull Linux - Hardware 1 11-30-2007 06:41 AM
parted cannot see partitions on 2nd hard disk Gzou Linux - Hardware 4 01-23-2007 03:50 PM
Booting from 2nd IDE Hard Disk RamanaRao Linux - General 1 10-28-2006 02:54 AM
Cannot mount 2nd hard drive? M$ISBS Linux - Hardware 5 04-25-2006 06:35 AM
Can't read off 2nd hard disk (Mandrake 10) illiniguy3043 Linux - Hardware 1 06-28-2004 06:16 PM


All times are GMT -5. The time now is 07:27 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration