HP-UX fasdm fails with vx_nospace

HP-UX file systems can be extended with a combination of the lvextend and fsadm commands. It’s well known procedure that has been in widespread use for several years, allowing online file system extensions, ie. the file system can be extended while it is mounted and busy. The file system type must be of type “vxfs” and enclosed in an LVM logical volume.

Occasional difficulties can occur if the file system is 100% full. I recently encountered the following vx_nospace error when trying to extend a file system from 9 Gb to 59 Gb under HP-UX 11.31. Continue reading

http_proxy in Red Hat 5

This post is about setting the http_proxy environment variable in Red Hat 5. Newer versions of the OS allow the variable to be set in either of two ways, that is:

# export http_proxy=http://192.168.1.100:8080
# export http_proxy=192.168.1.100:8080

Both will work. A subsequent call to yum will read the http_proxy environment variable and act on it, using the named proxy to obtain a network connection to the relevant repository. I have tested this successfully on Red Hat 5.7.

Yum Failures

Older versions of Red Hat 5 are more fussy. RHEL 5.4 will allow the first form above (export http_proxy=http://192.168.1.100:8080), but use the second form and yum will barf extravagantly, leaving you with a lengthy Python trace back. Continue reading

Root Password Recovery on a Sparc LDOM

If the root password for a Unix system is lost or forgotten, it can be very difficult to regain root access and perform further administration work. Often it will be impossible. You could be lucky – there might be a user account with sudo access, or even a root shell still open on the system somewhere, for example on the system console. If the system is x86, you might be able to boot it from a live CD and restore root access by doctoring the root disk. Otherwise, with most systems (physical and virtual), it will often be a case of rebuilding the system from scratch.

Solaris is a bit different. It has long been possible with Solaris to regain root access by booting the physical system from a Solaris installation CD, mounting the original root disk and removing the root password string from the relevant file, usually /etc/shadow. The same technique works, surprisingly, with SPARC virtual systems, aka LDOMs. Proceed as follows. Continue reading

Sorting a Directory in the FAT File System

The venerable fat16 and fat32 file systems are still in widespread use today. Devices such as digital cameras, satellite navigation systems, memory sticks and mp3 players all make use of FAT.

The files in a FAT file system are arranged in a strict order. This can affect the way that some devices behave. For example, some MP3 players will play songs only in the order in which they are arranged on the device, rather than the more convenient alphabetical or alphanumeric order. Music players that use USB memory sticks and in-car USB systems can be affected in the same way. The only way to get the songs to play in a more sensible order is to sort the directory (folder) in which they are located. Continue reading

Fast Installation of AIX on to IBM LPARs

An LPAR, or logical partition, is an IBM virtual machine. LPARs run on a variety of IMB hardware and provide strong isolation between partitions. This article describes a method for quickly building LPARs running AIX on IBM pSeries hardware

AIX can be installed onto an LAPR using the distribution CDs (or rather, since this is a virtual machine, the ISO image files derived from those physical CDs). There are, however, two drawbacks with this:

  • it does not include site specific customizations. If a piece of software like Apache or ssh is required on the LPAR, it must be installed separately – a pain if you have many LPARs to build.
  • it is a slow process. AIX is supplied spread over several CDs. The administrator must swap CDs several times during the installation. This means hanging around and typing commands needed to mount and dismount the cd ISO images on the target LPAR, something that will have to be done several times during the installation.

Continue reading

Upgrading the Sheevaplug to Debian 6 Squeeze

The Sheevaplug is is a very small computer made by Globalscale. It is designed to offer standard computing functions in a very small space. Consuming just a few watts of power, the Sheevaplug makes a good home server, with applications ranging from network storage to web hosting and home security.

This article explains how to upgrade a Sheevaplug to Debian 6 using a pre-built image available from New IT. It is a quick and simple procedure, requiring less technical knowledge than, for example, installing Debian from scratch. Continue reading

Linux does not see all memory

The other day I upgraded the memory in a customer’s Linux system from 2 to 8 Gb. Afterwards though, only 4 Gb was “visible”. The “free” and “top” commands confirmed that only half the expected memory was there. The system was running 32 bit Red Hat 4.7 in a vmware virtual machine. Continue reading

Solaris Disk EFI Headers

“format” is the Solaris tool used to initialize disks. Format can sometimes have a problem with disks that bear an EFI disk label. In which case, replacing the EFI label with a more traditional VTOC disk label can help.

The problem appears when an attempt is made to label the disk using format. The label operation fails with “Current disk is unformatted”. Many other format options fail with the same message. Newfs will not recognise the disk and it is therefore impossible to create a file system. Continue reading

HPVM Mass Production with hpvmclone

This post is about cloning HP-UX virtual machines, or HPVMs.

Once you have built an HPVM, the hpvmclone command can be used to produce many more.  hpvmclone does not create a copy of the HPVM, it just creates a copy of the configuration.  The data copy is done manually, for example with the dd command.

Basic HPVM Cloning

The following procedure is a simplified version of that found on Juanma’s Blog, in the section “Method 1”. Continue reading

Copying Directories with SSH

Copying data is something every administrator does.  A single file or directory file can be copied with a single command.  Moving information from one system to another needs a bit more work, but it needn’t be a pain.

The ssh command can be used to copy data from one Unix system to another.    Here is an example for HP-UX, but it works on Linux too.  A directory, called /var/opt/ignite, is copied from the system “pluto” to another machine called “jupiter”. Continue reading