Koozali.org: home of the SME Server

second drive

Greg Ferraro

second drive
« on: September 01, 2002, 07:47:46 PM »
I had esmith installed on a 30 gig drive that will no longer boot to esmith.  It gives a kernel panic error.  There is data on this drive that I would like to salvage if possible.  I put in a new drive and installed esmith from scratch.  It is configured and running.  I put the partially crashed old 30 gig drive in as a second drive.  It still spins enough to work.  It is recongnized by esmith as HDC & D according to dmesg.  The failing drive had ibays with data.  Is there any way to access these folders and retrieve the existing data?  I do not know how to get into the files on the second hard drive and am having trouble even finding the commands that will allow, (if possible), me to do this.  Sorry if this is a stupid question.  

G

Kees Blokland

Re: second drive
« Reply #1 on: September 01, 2002, 11:24:27 PM »
Hi,
>Is there any way to access these folders and retrieve the existing data?
Yes, this is how I would approach it:

Make sure you do see the second drive in the logfiles. You say 'HDC & D'
it should look something like this: (from my own logfiles)

hda: WDC WD600AB-60BVA0, ATA DISK drive
hdb: second drive on primary IDE
hdc: TOSHIBA DVD-ROM SD-M1212, ATAPI CDROM drive
hdd: second drive on secondary IDE

So, be very sure, that you know which drive you are talking about!
(you mounted the second drive as master on the second ide-port?)

First, create a directory on your new drive, in the /home directory for instance, and call it 'mysickdrive'
So, if you go to /home/mysickdrive you will see nothing..

The command to mount any drive is something like this:
( do a 'man mount' on the working system (from the root prompt) and you will learn all about mount!)

mount /dev/hdx /home/mysickdrive    (where x is the driveletter you found earlier)

.. that's it.

Now goto the directory /home/mysickdrive, and voila, everything you lost is there!
To unmount the drive after you copied everything:

umount /dev/hdx

If you have trouble reading data, you should try to use 'fsck' or 'e2fsck' on this disk

Not so long ago I treated a disk to 'e2fsck -cvpy /dev/hdxn'  where x is your drive and n is the partition. (read man e2fsck). e2fsck takes more than a night with above options, but it worked for me!

First see what you can read, than try fsck, than e2fsck..
Try searching for 'adding second diskdrive' in these forums, this will give you more ideas.

As usual, ask around, get other opinions, don't take my word for it, do your own research etc etc etc....

good luck

g270546

Re: second drive
« Reply #2 on: September 02, 2002, 04:49:14 AM »
The second drive is already mounted as /boot.  I did not do this since I didn't know how.  Is is safe to unmount it and then make the directory?  Thanks for the help.  I know the more I find out about linux the less I know.  Thanks for your help.

Greg

Kees Blokland

Re: second drive
« Reply #3 on: September 02, 2002, 11:26:13 AM »
second drive mounted as /boot?
....

I sure hope not! I'll try to write a bit more tonight, got to dash of to work now.

if so, do the same as I said previously, umount /dev/hdx  and check again!

kees

Greg Ferraro

Re: second drive
« Reply #4 on: September 02, 2002, 05:37:52 PM »
Don't waste any more time.  I gave up.  Please however explain one thing to me.  You talked of creating a folder on the new drive.  If you just type mkdir /home how does it know which drive it is going to?  Thanks for all of your help and time.  

Greg

rob wellesley

Re: second drive
« Reply #5 on: September 02, 2002, 05:56:05 PM »
Greg Ferraro wrote:
>
> Don't waste any more time.  I gave up.  Please however
> explain one thing to me.  You talked of creating a folder on
> the new drive.  If you just type mkdir /home how does it know
> which drive it is going to?  Thanks for all of your help and
> time.
>

With linux we "mount" drives in the file system. A bit like using volumes in NT. except that each drive (or partition actually) is mounted into the file tree.

So when you boot up you have a file system that you are working in.

so ... mkdir /home/mysickdrive creates a folder called mysickdrive that you will mount your second drive into.

mount /dev/hdXX /home/mysickdrive  (hdc6 is what you need - 6 being the root partion on your sick drive)

ls /home/mysickdrive/ should list the usual folders - bin tmp etc home root ETC.

cat /etc/fstab will display the file that your system uses to do this sort of thing at boot.

Allen

Re: second drive
« Reply #6 on: September 10, 2002, 04:05:00 AM »
Rob,

I saw that you had replied to a question about mounting a second drive and I hope that you can help me.

I have a computer that I installed SME Server 5.5 on. I went through the standard install. It has two drives. The first one is a SCSI 4gb drive and is the drive recognized by SME Server.

The second one is a IDE 40gb drive attched through a High Point RAID controller. This drive is currently not recognized by the SME Server. I understand that I need to use Linux to get SME Server to recognize the second hard drive. However I do not know the process and commands to go from SME Server to Linux and do this.

Can you help me please?

Thanks,
Allen