Cover V09, I03
Article

mar2000.tar


Questions and Answers

Jim McKinstry

 Q I need to determine the specifications for a new server for use in UNIX classes. It has to be something that students at various levels can utilize. Do you have any suggestions?

 A This really depends a lot on what you want to do. If you want cheap, buy a PC and run Solaris 7 (“free”) or Linux (“free”). I'd recommend Solaris and that you set up another PC and run FreeBSD. This way you will have a BSD and svr4 system allowing students to see the difference between the two. You can also go with a small Sun box (e.g., Ultra Sparc 5), which will only cost about $3500 (monitor included).

 Q I have an e4500 server with the fault LED on. My Sun support is stating that this condition is right, but I need a second opinion.

 A If the “wrench” light is on then there is a problem somewhere. Check the box to make sure that there are no amber lights on any of the cards. Ask support to send you documentation on how to read the lights. I've never seen a Sun box with the wrench light on that didn't have a problem. However, it is normal for the wrench light to be on during the boot process. It should be off afterwards.

 Q Should a systems administrator have any concerns about the order of a SCSI chain consisting only of disk drives that have different performance levels (i.e., an 8-device chain with an adapter at 7 and disk drives at 0 - 6)? Should effort be made to put faster (such as 10K, 5ms) drives at lower SCSI ID than slower drives (such as 7200, 9ms)?

 A I'd suggest adding another SCSI bus and separating the two different speeds. Your 7200/9 ms drives will, essentially, throttle back the speed of the SCSI bus. Adding another SCSI bus almost always increases performance and gives you room to grow.

 Q Under SCO OpenServer 5.0.x, how do I remove a file whose name includes “/” slashes in it? We had a system problem due to bad memory, and the root filesystem, while running fsck, attached a file into lost+found. Instead of using the inode number as the file name, it used a bunch of gibberish (text from the file, I'm assuming) as the file name. Unfortunately, the file name now has “/” slashes in it, and I cannot get this file removed. Things like mv, rename, rm -r, find . -exec rm {} \, do not work. Help!

 A You should be able to do a ls -i. That will give you the inode of the file. Then do a:

find . -inum <number> -exec rm {} \;

from the directory containing the file. For example, let's say you want to remove a file jim. cd to the directory. Do a ls -i jim and get:

56 jim

“56” is the inode number for the file “jim”. Now do the find command:

find . -inum 56 -exec rm {} \;

I recommend doing a find . -inum 56 and verify that it only returns the file you want removed.

 Q I need to upgrade a 9.05 HP box to 10.20. Currently the system is not using LVM. Can I reinstall 9.05 and use LVM? Does 9.05 offer LVM configuration capabilities?

 A HP-UX 10.x does not support disk slices or partitioning -- everything is LVM based now. To convert your 9.x system to LVM, you can add another disk and convert it one filesystem (or one disk) at a time by copying everything to the new disk, blow-away the old filesystem, re-create it with LVM, then copy everything back. Also, to upgrade from 9.x to 10.20, you must first upgrade to 10.01 then to 10.20. 10.01 has a bunch of pre-upgrade analysis tools to assist you. You will have better luck if you do a fresh 10.20 install to an alternate boot disk, upgrade all of your applications, and migrate the data. Either way, the 9.x to 10.x upgrade path is a real pain.

 Q How do I restore a specified directory from a tar backup?

 A First thing you need to do is find the name of the directory as it is stored in the tar file. Do a tar tv to get the name of the directory (if the directory is stored in the tar file as ./dirname, then you must include the ./ in the name when trying to extract it). Use the command tar -xv to extract the directory and its contents. For example, tar tv shows the directory you want to recover is jim/is/great. You need to run tar xv jim/is/great to extract it.

 Q How do I change the IP address range in a Sco UNIX 4.2 server? It has a class “C” IP address and we would like to change to a class “B” address.

 A If you have a “real” class C address then you need to obtain a class B address before you continue. Most people behind firewalls run with a Class A address that they break into class C addresses with subnetting. Look in /etc/tcp for a line like:

ifconfig -p net0 10.2.2.2  netmask 255.255.255.0 broadcast 10.2.2.255 ...

Notice that we are using the 10. Class A address. The netmask (255.255.255.0) tells the system that the network part of the address is 10.2.2 and that you can have 255 nodes on that network. To make this example a class B network, you will need to change the netmask (255.255.255.0) to 255.255.0.0 and the broadcast (10.2.2.255) to 10.2.255.255.

 Q What are the real functions and differences of the different RAID levels in practical environments?

 A “Practical environments” is a vague statement. Applications that are moving lots of data all over the place (databases, video, etc.) can see some dramatic performance increases with stripped RAID levels (0, 0+1, and to some extent, 5). I would not even consider implementing Oracle, Sybase, etc. without taking advantage of a stripped RAID level. For a small amount of normal user data (email on a ten-person server, print servers, etc.), RAID will add little to no increased performance.

The more important part of RAID is the Redundant part. Redundancy (all RAID levels except RAID level 0) is very important when dealing with mission critical data. In general, use RAID level 1 for important data where speed is not important. Use RAID level 0+1 for important data where performance is an issue, and RAID level 5 for a cost effective, redundant solution. RAID level 0 and 0+1 allow you to lose up to 50% of the hard drives before data is lost. With RAID level 5 you can only lose up to 1 disk.

 Q I normally set swap to be a little larger than system memory on clients. If I add more system memory to a client, can I increase swap size accordingly without recreating the user's disk, which has his home and swap on it? I'm using Solaris 2.5.

 A There are two ways to increase swap space for a Solaris 2.x system. The first way is to create a swap file and the second is to dedicate a disk partition as swap. (I recommend spreading the swap areas across multiple drives.) Here's how to create a swap file:

1. Pick a file system that has plenty of room available (preferably a low utilized file system).

2. Figure out how much more swap space you want (I'll use 256meg in the example).

3. Create a swap file in the filesystem you picked (I'll use /example as the mountpoint for the filesystem in this example):

mkfile 256m /example/more_swap

4. Add the new file to swap:

swap -a /example/more_swap

5. If you want this to continue across boots, add the following to /etc/vfstab:

/example/more_swap    -   -   swap  -  no  -

Here's how to add another disk partition:

1. Determine the partition you are going to use. For this example I'll use:

/dev/dsk/c3t2d0s7)

2. Add the new file to swap:

swap -a /dev/dsk/c3t2d0s7

3. If you want this to continue across boots, add the following to /etc/vfstab:

/dev/dsk/c3t2d0s7    -    -   swap   -   no   -

4. Then, check to see that it's being used:

swap -l

About the Author

Jim is a Technical Analyst specializing in UNIX. He has worked for IBM, Rite Aid, EDS, and is currently working for Sprint Paranet. He can be reached at: jrmckins@yahoo.com.