Speeding up web interface in NexentaStor

The default install of NexentaStor's web interface is incredibly slow. I'm not sure why, but they limit it to a single thread, which doesn't work out that well when you have images and things like that that need to be loaded.

The way to up the number of threads is to edit the /var/lib/nza/prod.cfg from a shell. First start up Putty and ssh to the nexenta IP, and log in with the root password. If you have not already set up expert mode

option expert_mode=1 -s

Now we need to get into a shell.

$ !bash
Warning: using low-level UNIX commands is not recommended! Execute? Yes
root@Nexenta:/volumes#

Now lets edit the file

# vi /var/lib/nza/prod.cfg

Find the line that says

server.thread_pool = 0

and change it to something higher (the nexenta docs recommend setting it no higher then 10

server.thread_pool = 10

Now we need to restart the NMS service for things to take effect

svcadm restart nms

This tends to knock me off the ssh session, and I have to go and reconfigure the network interface from a terminal.

How to break into bash shell in NexentaStor

nmc$ option expert_mode=1 -s
nmc$ !bash
#

Detect new network cards on XenServer 5

I installed XenServer 5, and then added some gigabit NICs, but the server wasn't seeing them. Turned out I needed to do the following from the server console:

#xe host-list
uuid ( RO) : 9ec3de63-30fe-4575-b972-1234ed235345
name-label ( RW): xenserver-lfiuljac
name-description ( RO): Default install of XenServer
#
xe pif-scan host-uuid=9ec3de63-30fe-4575-b972-1234ed235345

This made the NICs show up in XenCenter.

BackupPC - rsync over ssh on an alternate port

I recently set up BackupPC to back up a remote server using rsync over ssh. I won't go into the gory details now, but in order to make it work on an alternate port, I had to make the following change to the config file for this host:

$Conf{RsyncClientCmd} = '$sshPath -p 1234 -q -x -l root $host rsync $argList+';

This will connect to ssh running on port 1234 on the remote $host.

If you try changing $sshPath to include the switch, BackupPC tries to escape the arguments when using them, and that results in weird errors.

BackupPC - enabling compression

BackupPC is a high-performance, enterprise-grade system for backing up Linux, WinXX and MacOSX PCs and laptops to a server's disk. BackupPC is highly configurable and easy to install and maintain.

I recently set up BackupPC , and although it took a little bit of setting up and getting used to, I'm pretty happy with it. One thing that I didn't realize right away is that it doesn't do transfer compression, as the perl RSync library it uses doesn't support it.

The way to enable compression is to use ssh compression and to backup using method 'rsync'.

Here is the configuration option that I used to enable it.

$Conf{RsyncClientCmd} = '$sshPath -C -o CompressionLevel=9 -q -x -l root $host rsync $argList+';

-C enables compression and -o CompressionLevel=9 sets the compression level to 9 (same as gzip). According to the man page, the default level is 6, and you should probably leave it at 6, unless you've got CPU power to spare.

The man page also mentions that for backups on a fast network, ssh compression will probably slow things down instead of speeding them up.

Subversion svnserve "Could not obtain the list of SASL mechanisms"

I've decided to move our subversion repository to a new server. Put up a fresh install of CentOS 5.2 x32, updated and installed subversion on it.

Decided to set it up using svnserve with sasl, as 1.5 supports that. Following the SVN Book, I set up my svnserve.conf file as follows

[general]
anon-access = none
auth-access = write
realm = isf
[sasl]
use-sasl = true
min-encryption = 128
max-encryption = 256

I had set up the /etc/sasl/svn.conf file as follows

pwcheck_method: auxprop
auxprop_plugin: sasldb
sasldb_path: /svn/sassl
mech_list: DIGEST-MD5

Unfortunately, I kept getting the "Could not obtain the list of SASL mechanisms" error in TortoiseSVN and other clients. Nobody seemed to be able to help, until I finally figured it out - the DIGEST-MD5 plugin wasn't installed for cyrus by default on CentOS 5.2. All I had to do was run the following command and everything started working.

yum install cyrus-sasl-md5

Xen 3.2 on CentOS 5.2 x86_64 / RHEL 5.2 x86_64

Since my drivers are not signed, you will need to temporarily disable signature checking for yum.

# vi /etc/yum.conf
Make sure it says gpgcheck=0

Download the file and untar it.

# tar xvzf xen-3.2.0-CentOS5.2.tar.gz
xen-3.2.0-CentOS5.2/
xen-3.2.0-CentOS5.2/xen-3.2.0-0xs.x86_64.rpm
xen-3.2.0-CentOS5.2/xen-libs-3.2.0-0xs.x86_64.rpm
xen-3.2.0-CentOS5.2/xen-devel-3.2.0-0xs.x86_64.rpm

# cd xen-3.2.0-CentOS5.2

Install the RPMs.

#yum install -y xen-3.2.0-0xs.x86_64.rpm xen-libs-3.2.0-0xs.x86_64.rpm xen-devel-3.2.0-0xs.x86_64.rpm

It will download a bunch of dependencies and install them. Among them will be a new kernel - kernel-xen.

# vi /etc/yum.conf
Set gpgcheck back to the old value: gpgcheck=1 if it was originally 1.

The only problem at this point is that yum for some reason doesn't update the boot entry, so we have to do this manually.

# vi /boot/grub/menu.lst

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.6.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-92.1.6.el5
module /vmlinuz-2.6.18-92.1.6.el5xen ro root=/dev/VolGroup00/LogVol00
module /initrd-2.6.18-92.1.6.el5xen.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.el5.img

We want to update the CentOS (2.6.18-53.1.21.el5xen) entry, and set it to use the proper kernel - xen.gz-3.2

This is what my updated menu.lst looks like - yours may differ. I have also set the default to 0, so that it boots my xen kernel automatically.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-92.1.6.el5xen)
root (hd0,0)
kernel /xen.gz-3.2
module /vmlinuz-2.6.18-92.1.6.el5xen ro root=/dev/VolGroup00/LogVol00
module /initrd-2.6.18-92.1.6.el5xen.img
title CentOS (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-92.el5.img

Once you reboot you should automatically boot into the xen kernel and be able to create virtual machines.

BlogCFC was created by Raymond Camden.