Adding a second hard drive SCO Xenix, Open Desktop, Openserver

This article references SCO SCO Xenix, Open Desktop, Openserver specifically. See Linux/adddrive.html for adding a Linux drive.

You add a hard drive, and configure the file systems on it, by running "mkdev hd".


Hate these ads?

People used to older Unices may expect more complications, and may expect to have to use "mkfs" after hand editing kernel configuration files to add the appropriate block and character devices. You certainly can do all that if you want, but "mkdev hd" is a front end that makes it much easier. If you are curious as to what goes on behind the scenes, look in /usr/lib/mkdev. The "hd" command there is a shell script, and is fairly self-explanatory.

You generally have to run 'mkdev hd' twice. If I remember correctly, the kernel already has the code for the second IDE drives, so in that case it's only once. But for SCSI drives, the first invocation puts the driver code in, and the second (after a reboot) allows the partitioning and division of the drive.

For SCSI drives, the first pass asks you the name of the SCSI controller. If you don't know, and if your primary drive already is SCSI, look in /etc/conf/cf.d/mscsi. The end of the file might look something like:




wd      Srom    1       0       0       0
asc     Sdsk    0       0       0       0
asc     Sdsk    0       4       0       0







(This happens to be a machine with an EIDE cdrom and a scsi disk using an "asc" controller, plus a second scsi disk at ID 4). You'll also be asked about which controller (if you have only one, it's "0"), what bus (probably 0) and the target ID. and the lun (almost always "0").

There are twin-channel controllers: for these, one is controller "0", the other is "1". You can follow the internal cables to see which one your drive is connected to.

If you aren't sure what SCSI devices are present, the "sconf" command can help you on modern systems. Prior to OSR5.0.5, this existed but could crash your system in multiuser mode, but now is safe. Here's the output of "sconf -v" on one of my machines:

Sdsk    alad    0       0       0       0
Sdsk    alad    0       0       1       0
Stp     alad    0       0       3       0
Sdsk    alad    0       0       4       0
Srom    alad    0       0       6       0

For example, this tells me that a tape drive (the Stp line) is attached to an alad controller, and (reading left to right), it's alad unit 0, on bus 0, at id 3 and lun 0.

After answering these questions, the kernel is relinked. Be sure to answer "Y" to "Rebuild the Kernel Environment", and be sure you understand what that question means (if you don't, make a copy of /etc/inittab before you begin this process). You do have to reboot before proceeding to the next step. You then run 'mkdev hd' again, and answer the same questions.

If you got it wrong:

If you guessed wrong about the controller, bus, or ID, you won't get the screens that ask about the partitions. If that's the case, don't use mkdev hd, simply go directly to /etc/conf/cf.d/mscsi, make the corrections, and link a new kernel. The controller is the first column after Sdsk, the ID is the second, then lun and bus. Simply change the appropriate column, and then relink.

If you don't feel comfortable with that, at least vi mscsi to remove the line that represents the error. Once you've got that correct, 'mkdev hd' will proceed to the second phase, where you create the Unix partition and then divide it into one or more filesystems.

During that second phase, you are asked if you want "block by block control". If you answer that affirmatively, you get to control everything about the division(s) created, including the name(s).

If you have existing data

You may want to transfer an existing disk to another system, as for an upgrade. The procedure is the same, but do NOT change the partition info, do NOT change the bad track table, and do NOT create new filesystems. You'll see your divisions; all you need to do is (n)ame them and proceed from there.

If you don't, an arbitrary (e.g. "d1150" ) name is generated. It's not actually completely arbitrary: it is related to the drive number and its id if scsi. I think it's been documented somewhere, but I never pay attention to it because:

  • You can name the divisions sensibly
  • You can always find out what someone else named them

The "finding out" can be accomplished by using 'divvy' on the appropriate device. "man HW hd" gives tables of drive names, and from that it's easy to find out /dev/hd1a will represent the second physical disk. Therefor, 'divvy -P -N /dev/hd1a' will print out info about the divisions, including the names.

Or, you can use divvy interactively, leaving out the -N and -P. By doing this, you can even change the name to something more sensible. I like to use names that are reminiscent of the mount points, so my Jaz drive has a division 'jaz', which creates a /dev/jaz, which I mount at /jaz.

Note here that the second pass of "mkdev hd" will have invoked divvy for you: you don't need these commands unless you need to get back to the divvy tables after this. Note also that if you already know the name of the division (such as /dev/u), you can get there with "divvy /dev/u"

You may want to creat multiple partitions. See Adding disk space for suggestions.

Mount

The final step, of course, is to do the mount. You can manually edit /etc/default/filesys ('man filesys'), or you can use 'mkdev fs'. This does NOTHING TO EXISTING DATA. It only creates /lost+found and adds the drive to /etc/default/filesys. You can safely use this with any drive.

For some reason, there is no mention of 'fs' in the man page for 'mkdev', but it's been in /usr/lib/mkdev for a very long time. It asks the appropriate questions, and if you give it appropriate answers, it will create the appropriate entry in /etc/default/filesys.

You didn't pay attention to the name of the division and didn't change it from the default? Look at the "Existing Data" section just above this.

You get asked for the device name. Answer that with the name of the division. You are then asked for a mount point, and finally you are asked if you want to always mount this filesystem. Generally, you'll answer yes to that.

If you told it to "always mount", you can then mount it by any of "mountall", "mount /mount_point", or by rebooting.

For ideas about what to do with this extra space see Adding disk space.

See also:

  • Filesystems


  • © 1998 A.P. Lawrence. All rights reserved


    Comments /Unixart/newdisk.html
    UnixartNewdisk :


    Add your comments

    Enter your email address for automatic notification of new posts here
    (be sure to whitelist 'feedburner.com' if you use spam filtering)

    Or use any RSS reader

    Delivered by FeedBurner





    Views for this page
    Today This Week This Month This Year  Overall
    231613,233 44,063

    Have you tried Searching this site?

    Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

    This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

    Publishing your articles here

pavatar.jpg
More:
       - Administration
       - Disks/Filesystems
       - Installation/Upgrades
       - OSR5




Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!


http://www.vss3.com SCO/Caldera OpenServer, Unixware & Linux. Tarantella & Non-stop Clustering


http://www.m3ipinc.com Security, firewalls, ids, audits, vulnerability assesments, BS7799, HIPAA, GLB, incident handling




card_image








Change Congress


Related Posts

Disk space