Author: sotech

  • Using rsync with a non-standard SSH port

     

    There are many reasons you may be using an SSH port other than 22; perhaps you changed it as a security measure, or perhaps you have multiple machines behind your firewall which you are port forwarding to and thus have to use other ports in addition to 22. Rsync is an extremely powerful file synchronization tool which by default uses SSH to connect your source and destination, thus if you have changed your SSH port you will need to tell rsync. This can be easily done with the e switch like so (using 2222 as the new SSH port as an example):

     

    rsync -e “ssh -p 2222” /path/to/source [email protected]:/path/to/destination

     

    As a practical example using the other options -avzP (our typical selection) your command might look like:

     

    rsync -avzP -e “ssh -p 2222” /home/user/myfile [email protected]:/home/user/

     

     

  • New Intel Motherboard in-house: S1200KPR Mini-ITX Server board

     

     

    We’ve been building a few mini servers with these lately and finally found the time for a bit of a write-up – we’re almost finished, so keep your eyes peeled for a review shortly!

  • ESXi: Entering and exiting maintenance mode via command line

     

    Following on from yesterday’s post, here is how to enter or leave maintenance mode on an ESXi host via SSH:

     

    vim-cmd hostsvc/maintenance_mode_enter

     

    to go into maintenance mode – and to leave it:

     

    vim-cmd hostsvc/maintenance_mode_exit

     

    If you’re interested in other useful commands, you can see more hostsvc options by running:

     

    vim-cmd hostsvc

     

    This is a useful command to know as it is one of the critical steps in applying some patches to ESXi remotely.

  • ESXi: Determining maintanance mode status from the command line

     

    If you need to know if a host is in maintenance mode via the command line, SSH into your server and run the following:

     

    vim-cmd hostsvc/hostsummary | grep -i maintenance

     

    This will return the following line (in this example the host is NOT in maintenance mode):

     

     inMaintenanceMode = false,

    To see the entire host summary printout without filtering everything apart from maintenance, run:

     

    vim-cmd hostsvc/hostsummary

     

    …but you’ll soon see why grep is useful here!

  • How to find which version of ESXi you’re running from the command line?

     

    If you’re remotely logging in to a server to apply the latest patch but can’t remember whether you’re running 4, 4.1, 5.0 or 5.1 – and it can certainly happen when you’re managing quite a few of them remotely – there is a handy command to see which version and build number you’re actually using. After you’ve SSH’d in, run:

     

    vmware -v

     

    This will display output along the lines of the following:

     

    VMware ESXi 5.0.0 build-469512

     

    You can also use:

     

    vmware -l

     

    which doesn’t display the build number:

     

    VMware ESXi 5.0.0 GA

     

    Straightforward but very handy if you haven’t got the proper notes with you.

  • Lightroom 4: “Sort” option/dropdown box missing from Library view

     

    This one isn’t related to computer parts for a change but is something that happens to me regularly – I’ll import a handful of photos and want to sort them by capture time, but the “sort” box is missing from the Library view in Lightroom 4.0. You can bring it back by pressing T.

     

    I don’t know how it is I keep on accidentally hitting T but it seems I must do so regularly judging by how often this happens…

  • Y2K memories…

    Found this little gem when going through some old gear a few weeks ago;

    Hard to believe it was only 13 years ago – feels like much more. Oh the memories…

    Happy New Year everyone.

  • Intel SSD 330 120GB benchmarks

     

     

    As promised, here are some benchmarks of Intel’s SSD:

    An average of 390MB/s for sequential reads? Nice. IOPS:

    HD Tune Pro’s File Transfer test:

    Hovering around 500MB/s there – impressive. Last benchmark for now:

    Overall this is a well performing drive and is the only Sandforce-controller-based drive that we currently use.

  • How to restart NFS server on Ubuntu

     

    Once you set up your NFS exports by adding lines to /etc/exports you need to restart your NFS server; do this with the following:

     

    sudo /etc/init.d/nfs-kernel-server restart

     

    You should see output along the lines of:

     * Stopping NFS kernel daemon                 [ OK ]
    * Unexporting directories for NFS kernel daemon…           [ OK ]
    * Exporting directories for NFS kernel daemon…
    exportfs: /etc/exports [1]: Neither ‘subtree_check’ or ‘no_subtree_check’ specified for export “10.1.1.87/24:/nfs/sharedDir”.
    Assuming default behaviour (‘no_subtree_check’).
    NOTE: this default has changed since nfs-utils version 1.0.x

     

    Assuming no error messages pop up here you should now try to connect to your NFS share.