Browsing the archives for the UNIX category

Unable to shrink VXFS volume

Solaris, UNIX

Never seen this before. This volume is about 50% full, total size 300GB. I tried defragging the file system with fsadm, but didn’t seem to help. I even unmounted it, mounted it somewhere else and immediately tried the resize again – still the same error. I know there are no open files on the file system.

server# vxresize -g rootdg perforce 285g
UX:vxfs fsadm: ERROR: V-3-20343: cannot shrink /dev/vx/rdsk/rootdg/perforce - blocks are currently in use.
VxVM vxresize ERROR V-5-1-7514 Problem running fsadm command for volume perforce, in diskgroup rootdg

I may have to backup/newfs/restore on this one. Too lazy to open a Symantec case because it’s not a big priority.

Share

Sparse vs. Whole-root Zones patching times

Solaris, UNIX

Someone had a question for me – does patching a sparse zone take less time than patching a whole-root zone? My first instinct was “yes”, because there would be much less data to copy into each zone, as some file systems like /usr are shared with the global zone. I decided to test both scenarios.

Here is the procedure I used:

Rebooted server to clear inode cache, memory pages, etc. With 3 whole-root zones installed, used PCA (http://www.par.univie.ac.at/solaris/pca/), and patched, adding 106 patches to the system. Rebooted, removed the zones and backed out the 106 patches. Rebooted and installed 3 sparse zones and performed the same patching again.

Patching whole-root zones: 88 minutes to install 106 patches

Patching sparse zones: 72 minutes to install 106 patches

Hmm not all that different. Not quite what I expected, but good to know.

Setup : SunFire V440, using all local disk/ SVM mirrored, 4GB RAM, Solaris 10 update 4, patching to the EIS May 2008 level.

UPDATE: I patched the server without any zones also, and it took only 30 minutes. My sub-par math tells me each sparse zone took 14 minutes to patch, and each whole root took 19 minutes.

Share

Mounting soft partitions from network boot?

Solaris, UNIX

Let’s say you hosed your root partition and have to boot from CD or network. You have data on soft partitions you need to access, which aren’t very easily accessible, because  they are…well..soft. Here’s the answer. Just import the SVM configuration from the root disk and mount it up.

# mount -o ro /dev/dsk/c0t0d0s0 /a
# cp /a/kernel/drv/md.conf /kernel/drv/md.conf
# umount /a
# update_drv -fmd
Cannot unload module: md
Will be unloaded upon reboot.
Forcing update of md.conf.
devfsadm: mkdir fialed for /dev 0xled: Read-only file system
devfsadm: inst_sync failed for /etc/path_to_inst.1359: Read-only file system
devfsadm: WARNING: failed to update /etc/path_to_inst
# metainit -r
# mount /dev/md/dsk/d52 /mnt #(soft partition)
Share

en_US.utf-8 locale in Solaris 10

Solaris, UNIX

We were missing this locale on our Solaris machines, and some developers needed it for new applications. It turns out our Jumpstart server wasn’t installing the package that contains the locale: SUNWeu8os

Once installed, it shows up in the “locale -a” list.

Share

sudo loses environment variables

HPUX, linux, Solaris, UNIX

Tricky. When a user uses sudo to “su” to another user, certain environment variables will not remain.

From the man page:

Variables that control how dynamic loading and binding is done can be used to subvert the program that sudo runs. To combat this the LD_*, _RLD_*, SHLIB_PATH (HP-UX only), and LIBPATH (AIX only) environment variables are removed from the environment passed on to all commands executed. sudo will also remove the IFS, ENV, BASH_ENV, KRB_CONF, KRBCONFDIR, KRBTKFILE, KRB5_CONFIG, LOCALDOMAIN, RES_OPTIONS, HOSTALIASES, NLSPATH, PATH_LOCALE, TERMINFO, TERMINFO_DIRS and TERMPATH variables as they too can pose a threat. If the TERMCAP variable is set and is a pathname, it too is ignored. Additionally, if the LC_* or LANGUAGE
variables contain the / or % characters, they are ignored. If sudo has been compiled with SecurID support, the VAR_ACE, USR_ACE and DLC_ACE variables are cleared as well. The list of environment variables that sudo clears is contained in the output of sudo -V when run as root.

Share
Newer Posts »