LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-21-2009, 12:30 PM   #1
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Rep: Reputation: 32
Mounting hard drives..


I know this is an easy task, especially using cPanel. However I want to do this without formatting the drive, since there is sensitive data already on the hard drives. So how would I mount a hard drive, but not format/lose any of the data already on it?

I've looked and everything seems to lead me to believe that I'll lose data if I do it that way.
 
Old 03-21-2009, 12:39 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
You mount a directory on a HD into your existing file system. You do not have to format, if the partition has a supported file system You did not say what file system you would like to mount.

Physically add the drive. If it is an internal drive, you may need to go into the BIOS to set up the BIOS for the hardware.

You need to make a mount point in your file system. This is done with the mkdir command. Most systems have a /mnt directory. Open a konsile as root, use CD to go there. 'cd /mnt'. Then use mkdir, 'mkdir /newpart ( or what ever you want to call it ).

Now as root run the mount command. If you need help with mount, then see man mount. If you want to make the mount so it will occur what you boot, edit the /etc/fstab file as root, and add the mount command there.
 
Old 03-21-2009, 12:52 PM   #3
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
Basically this is what happened. Sometime last night the data center my server is hosted at lost power. Upon getting the power back on, the hard drives in the system had corrupted file(s) so they put a new hard drive in my server, loaded the same OS on the same file system. Then once that had completed, they plugged in my other two hard drives so I can do data recovery on them.

I typed this command

mount /dev/hdd /mnt/disk1

Then I got a message saying
mount: you must specify the filesysyem type

Not sure what to do or if this is the right way to mount it, without losing data.
 
Old 03-21-2009, 01:01 PM   #4
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
Ok I managed to get it mounted, now I am just copying files. Thanks camorri.
 
Old 03-21-2009, 01:05 PM   #5
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
That is the correct command and you do have to specify the file system type. You can have a look in the man page for fstab. Here is part of it, describing various file system types.

Quote:
The third field, (fs_vfstype), describes the type of the filesystem.
Linux supports lots of filesystem types, such as adfs, affs, autofs,
coda, coherent, cramfs, devpts, efs, ext2, ext3, hfs, hpfs, iso9660,
jfs, minix, msdos, ncpfs, nfs, ntfs, proc, qnx4, reiserfs, romfs,
smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, xfs, and possibly
others. For more details, see mount(8). For the filesystems currently
supported by the running kernel, see /proc/filesystems. An entry swap
denotes a file or partition to be used for swapping, cf. swapon(8). An
entry ignore causes the line to be ignored. This is useful to show
disk partitions which are currently unused. An entry none is useful
for bind or move mounts.
Linux supports a lot of different file systems. You have to find out what you have to mount it.
 
Old 03-21-2009, 02:04 PM   #6
TITiAN
Member
 
Registered: Mar 2008
Location: NRW, Germany
Distribution: Arch Linux, using KDE/Plasma
Posts: 392

Rep: Reputation: 49
Quote:
Originally Posted by camorri View Post
That is the correct command and you do have to specify the file system type. You can have a look in the man page for fstab. Here is part of it, describing various file system types.



Linux supports a lot of different file systems. You have to find out what you have to mount it.
I disagree. /dev/hdd is a drive not a partition, but you mount partitions. mount usually autodetects the file system type. So Skillz does not have to specify the file system type.
 
Old 03-21-2009, 11:17 PM   #7
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
Yea I didn't have to specify any file system types. I just created a directory, then mounted the hard drives to it.

Although I had to mount the partitions within' the hard drives.

Either way, I was able to recover all the data that I needed. Thanks for the help guys!
 
Old 04-04-2009, 09:26 AM   #8
Skillz
Member
 
Registered: Sep 2007
Posts: 252

Original Poster
Rep: Reputation: 32
Ok, why would a server reboot drop/delete the mounted hard drives?

I had to remount the hard drives upon a forceful system reboot. Not sure why that would be, scared the heck out of me though when I went to one of the sites and got a file not found, then logged into the server and the directory the hard drive was mounted in was completely empty.

For future references, for myself. I typed:

mount /dev/hdc1 /home2

To mount the hard drive to the home2 directory. Now my question is, why would it erase it like 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
Mounting two hard drives dcshoecousa07 Linux - Hardware 1 12-30-2005 02:04 PM
Mounting Hard Drives AndrewZorn Linux - General 2 04-03-2005 04:45 PM
mounting hard drives sturgeonman Linux - Newbie 13 05-31-2004 09:13 AM
mounting hard drives deathl Linux - Hardware 3 01-16-2004 01:17 AM
Mounting Hard Drives Q12321 Linux - Newbie 5 11-26-2003 08:50 PM

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

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