Unix recovery from failed HDD

Posted on 2012-09-07
Last Modified: 2012-12-04
I need some guidance recovering a filesystem from an old Unix server with a failed HDD.
I believe the drive contained only data, as the OS does not seem to be affected by the drive failure (as far as I can tell.)

I was able to source a compatible SCSI HDD, and it is connected to an Adaptec AHA-3950U2B controller.  The controller recognizes the drive, which is a good start, but that's as far as I know how to go.

Right now I get the following messages as part of the boot:

The system is coming up.  Please wait.
fsstat: /dev/boot mounted
Mounted /stand filesystem
fsstat: cannot stat filesystem /dev/d1150   <~~I believe this is the old drive
mount: /dev/d1150: No such device or address (error 6)
fsck: cannot stat filesystem /dev/d1150.
Failed to mount /u1 filesystem

I need to accomplish the following:
Get the OS to recognize the drive (create a filesystem, format it, mount it, etc... maybe not in that order)
Try to recreate the mount point of the old drive.
Put the backup files (which I have on tape) to /u1 on the new drive.

I'm pretty unix dumb, but I've played around a little bit with Linux.  Very little bit.
Any help is greatly appreciated!
Question by:dstrzemienski
    LVL 40

    Expert Comment

    what is the OS? run

    uname -a

    Author Comment

    SCO Unix

    uname output:
    SCO_SV crg 3.2 5.0.5 i386
    LVL 40

    Expert Comment

    LVL 15

    Expert Comment

    Here's a thread that talks about adding a drive...

    Another option is an online Linux consultant like
    LVL 25

    Assisted Solution

    i do not know much about SCO, but this should mostly apply to any unix box

    1) add the drive and identify it
    after you added the drive and rebooted, a new entry should appear in /dev
    most likely is will be similar to the existing (ie d + digits)
    the system will likely show messages concerning the new device at boot time
    the boot-time messages should be viewable at runtime using "dmesg"
    /!\ as far as i know, drives should be labeled hd + digit in sco but this prossibly does not apply to scsi disks

    2) partition the disk (unless you want to use the whole disk as a partition which is unlikely)
    the command should be fdisk. the partitions should appear in /dev as separate devices. i'll assume you created a single partition, and found it's associated device (something like hd2a)

    3) create a filesystem on the disk
    most likely, "format" or "newfs" should be available on SCO

    4) edit /etc/fstab to change the old disk entry to the new one. this should be easy after you see the file structure. basically you will just have to change the bad device name to the good one. DO A BACKUP OF THIS FILE BEFORE YOU EDIT IT. once the change was made, you can use the "mount" command to mount the filesystem or possibly reboot

    5) i'm pretty sure i do not need to cover the part where you restore your backup from tape
    just for the record, if the backup is a disk image using dd or similar stuff, you can use dd the other way round on the device and skip the filesystem creation step

    Author Comment

    I am not able to find any difference in the listing of /dev after inserting the new drive and rebooting.
    I have removed and re-inserted the drive several times, rebooting each time, to double-check, but the entries in /dev do not change.

    Do I need to low-level format the drive with the SCSI controller before I can do anything with it?
    LVL 25

    Expert Comment

    forget about low-level formatting which is ALWAYS a bad idea on a drive that already works, and a dumb way to loose more data whan your drive is loosing sectors.

    if you do not see the disk, it may be in a RAID array. most likely the SCSI controller has builtin RAID. if this is the case, it is likely that the complete array that was holding the disk failed

    the SCSI controller should feature software tool you can use from the command line, or provide a builtin command line which you can access while rebooting (usually ctrl+e after the POST sequence).

    can you tell us something about the layout of the disks after you accessed the SCSI controller's configuration ?

    Author Comment

    The server has only 2 drives.  I can pull the failed drive and the server is still able to boot the OS.
    On POST, with the failed drive inserted, I see only 1 drive detected.
    With the failed drive removed, I see only 1 drive detected.
    With the new replacement drive inserted, I see 2 drives detected.

    Regardless of the above configuration, I see no change in /dev
    Anywhere else I should be looking?
    LVL 25

    Expert Comment

    apparently, it is more complicated in SCO than in other unix-likes

    the key should be the "mkdev hd" command
    see here how to make the system aware that you added a peripheral

    and here to find the proper LUN

    anyway, you'll probably have to enter the SCSI controller's configuration at boot time (ctrl + e usually) in order to set the disk up as a JBOD if it actually is a second data drive, and possibly check the previous configurations. it is possible that part of the 2 drives were mirrored for example

    once the disk is seen by the system, thing should go on as usual
    you may need "mkdev fs" as well at some point
    the partitions be labeled /dev/hd02 for the second partition of the first disk for example

    i'm sorry i cannot be more helpful, but i guess i'm reaching my limit there, but feel free to post if necessary, and please post working steps once you manage to work it out

    Accepted Solution

    I ended up paying for an SCO engineer to resolve this.
    LVL 25

    Expert Comment

    sorry you did not get more help on our side, and ended up paying. if you do get to the bottom of this, i'm interested in whatever information you gather.

    if you're looking for some easy to use disk management, you may want to look into ZFS which is available on solaris and BSD systems. other tools exist (LVM, geom, vinum...) but most of them are significantly harder to use. (geom is pretty good, but BSD-specific)

    in zfs, changing a disk is as simple as typing
    "zpool poolX replace disk1 disk2"
    where poolx is the name of your pool and disk1 and disk2 the names of the devices associated with the original and new disks

    it may be pretty simple on SCO as well. we just do not have the knowlege (yet ?)

    best regards

    Author Closing Comment

    Thanks everyone for your help.  I've learned that Unix is best left to someone other than me.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    In this article you will get to know about pros and cons of storage drives HDD, SSD and SSHD.
    Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
    This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
    The viewer will learn how to download and install Comodo Backup on Windows 7. Comodo Backup is another solution for backing up your computer. It is free for local backup and online backup has differing amounts depending on storage required. In my op…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now