my digital notebook

Main menu

Tag Archives: solaris

Post navigation

If you’re running Solaris 8 or 9 and an upgrade results in broken SSH X11 forwarding, the problem may be Sun’s socfs bug. The symptom will be SSH’s failure to set the $DISPLAY variable and an error in your system log looking something like this:

When moving or copying really really large directories on Solaris, you can sometimes run into trouble, especially when some of the files in those directories are larger than 8 Gigabytes. One solution is to use a “ufsdump pipe to ufsrestore” command, but I have even had problems with this from time to time. My perfered method these days is to use a “tar pipe to tar” command. Be aware, however, that on Solaris you will need to include the “E” flag if the directory you are copying contains files larger than 8 Gigabytes.

Here is an example. Simply “CD” into the directory you want to copy and execute the following command, replacing “/new/directory” with path to the new destination directory.

Sun Microsystems likes the QLA 2310 Fiber Channel HBA. It’s only a 2Gig card, but it works with the Sun native driver, which makes it wonderful for us Solaris Administrators. Unfortunately, it does not integrate perfectly with EMC CLARiiON SANs because it does not register properly with Navasphere. Even if you manually register the host, the LUNs will not be presented to the host because the agent can’t pass commands to the array.

To remedy this situation on my Solaris 8 host, I used the following procedure:

Edit the /etc/system file and add the following line:

set fcp:ssfcp_enable_auto_configuration=1

Next, I rebooted my Solaris host with the “-r” flag:

reboot -- -r

Next I checked Navisphere to make sure my paths have logged in. They were, so I logged into the Solaris host and ran the following commands:

cfgadmdevfsadmformat

I then saw the storage that was presented to my host. Finally, I restarted the Navisphere agent and started using my new LUNs.

STATUS: Sold
We have another used Sun Fire T2000 server. Since the first one was sold in less than 24 hours, I thought it would be nice to offer this one up to this site’s readers as well. It has never been used in production and is in like-new condition.

Sun Fire T2000 Server

8 core 1.0 Ghz UltraSPARC T1 processor

16GB DDR memory (16 1GB DIMMs)

2X 73GB 10,000PRM disk drives

1X DVD-ROM/CDRW drive

Serial Number: 0639VB0053

Starting Bid: $13,000

If you are interested, or would like any further information, please leave a comment or visit this link. Our university campus policy states that big ticket items like this must be sold using an auction style bidding system. I should add, however, that most items in the surplus system are sold with only one bid, so please don’t let the process discourage you if you are at all interested.

STATUS: Sold
The University where I work is currently selling a used Sun Fire T2000 server. Since many of this site’s readers are fellow Solaris administrators, I thought it would be nice to offer it up to them. It has never been used in production and is in like-new condition.

Sun Fire T2000 Server

4 core 1.0 Ghz UltraSPARC T1 processor

8GB DDR memory (16 512MB DIMMs)

2X 73GB 10,000PRM disk drives

1X DVD-ROM/CDRW drive

Serial Number: 0617NNN1FY

Starting Bid: $6,000

If you are interested, or would like any further information, please leave a comment of visit this link. Our campus policy states that big ticket items like this must be sold using an auction style bidding system. I should add, however, that most items in the surplus system are sold with only one bid, so please don’t let the process discourage you if you are at all interested.

Kids… DO NOT TRY THIS AT HOME! If this is not done exactly right, you will render your system unbootable and corrupt your data. That being said, under some circumstances you can take some space from your swap partition and add it to an unused one without initializing your entire disk. This is particularly useful if you decide you want to use DiskSuite to mirror your system disk, but have not allocated the 100MB partition that is needed to hold the state databases. As always, BACK EVERYTHING UP FIRST. Better yet, make two backups and store them on two different systems. This is a risky procedure, and you don’t want to lose any data!

The first thing you need to do is figure out if your disk layout will allow for this procedure. Usually the swap partition is the second one on the disk, making it partition number 1 (Partition number 0 is root). If partition number 1 is swap on your system, and partition number 3 or 4 are unused, you are in good shape, and this should work. To figure this out, you should do something like this:

# format
Select the boot disk – usually disk 0Specify disk (enter its number): 0
format> partition
format> print
This will show you the current disk layout.

Here we see that partitions 3 and 4 are unused and directly after partition 1, so we can take some space from swap and assign it to one of these. Partition 2 is, of course the entire disk. I have not tried it, so I don’t know if you could assign non-sequential cylinders to a partition that is not directly after swap.

So to take some space from partition 1 and add it to partition 3, the first thing we have to do is disable swap, so the format utility will let us change it.

Comment out the following lines in your /etc/vfstab file and reboot the system.

#/dev/dsk/c1t0d0s1 - - swap - no -
#swap - /tmp tmpfs - yes -

This will bring the system up without swap enabled. You can now edit the disk label. Remember that our cylinders need to be sequential, so always work in cylinders when using the format utility.

Re-enter the format utility, select your system disk and view the partition table:

The first thing we need to do is take some cylinders away from partition 1. In this example, we are looking to make partition 3 roughly 100MB, so we need to take about 75 cylinders from partition 1 so that we can add it to partition 3. Parititon 1 ends at cylinder 9436, so we need to subtract 75 from that number. 9436 – 75 = 9361, so that is the new ending cylinder for partition 1. We then subtract the beginning cylinder (726) from that number to give us the new total number of cylinders for partition 1. 9361 – 726 = 8635, so this is the number we enter when format asks for the size of the partition. Like so:

Partition 1 ends at cylinder 9360, and partition 3 picks right up at cylinder 9361. Partition 3 ends at cylinder 9436, and partition 5 begins at cylinder 9437. Partition 4, of course, remains unused. Since none of the cylinders overlap, we can go ahead and write the disk label out. DO NOT DO THIS if you have any doubt at all about what you have just done. By writing out the disk label, you could corrupt the data on your formated filesystems if any cylinders overlap into them. The format utility is usually pretty smart about keeping you from making mistakes, but be very careful anyway! You don’t want to end up with scrambled eggs on a disk that has valuable data on it.

partition> label
This writes out the disk label, so you can now exit the format utility and re-enable swap in your /etc/vfstab file. Simply uncomment out the following two lines and reboot the system.

/dev/dsk/c1t0d0s1 - - swap - no -
swap - /tmp tmpfs - yes -

Reboot your system, and if all goes well, it will come up, and you will see that partition 3 will have a little over 100MB on it. Usually people want to do this so they can store the DiskSuite meta database on the newly created partition. If this is the case for you, you can now move on to mirroring the system disk.

Zach over at NoSheep has written a really nice article about how to configure a SSH trust relationship on UNIX systems. By doing this, you can prevent the system from prompting you for a password, thus allowing the user to use scripted solutions to move files around with sftp, etc. He didn’t mention, however, that to get this up and working correctly under Solaris, you have to uncomment the following lines in your /usr/local/etc/ssh_config file:

RSAAuthentication yes

And one of these lines. In most cases the Identity File will be id_rsa.