Tag: How To

  • XenServer 6.2: How to boot a VM to CD/DVD rather than disk

      We had a situation recently where a customer was experimenting with XenServer 6.2 and Ubuntu VMs; he accidentally powered off the VM during a distribution upgrade and the VM would only boot with a read-only filesystem. Loading an ISO into the virtual CD drive didn’t do the trick; there’s no obvious way of booting…

  • How to install XenServer 6.2 – Step By Step

      With the recent public availability of XenServer 6.2 there are an increasing number of people wanting to try it; here is a walk-through of an install so that you know what to expect if you want to try it yourself. In this example we are using a NFS datastore on the network to store…

  • Ubuntu: Bringing a detached tmux session back

    Ubuntu: Bringing a detached tmux session back

      If you’re just starting out with tmux you may have installed it, set up a session, detached and then… what?   To re-join your detached session, simply run:   tmux attach   and you’re back in business.  

  • Ubuntu: How to change tmux’s ctrl+b binding to ctrl+a

    Ubuntu: How to change tmux’s ctrl+b binding to ctrl+a

      If you’re used to screen you’ll be in the habit of using ctrl+a, for example detaching a session with ctrl+a then d – if you make the move to tmux it’s ctrl+b then d, which can take some getting used to. Often it’s easier to make tmux get used to you! To change tmux…

  • Ubuntu: How to create a file or folder using today’s date

    Ubuntu: How to create a file or folder using today’s date

    This is a useful little trick to use in your scripts – particularly for things like periodic backups.   For a file:   touch $(date +%F)   creates the file 2012-11-18   For a folder, let’s add the time after the date:   mkdir $(date +%F-%H:%M)   creates the folder 2012-11-18-09:00   We can use…

  • How to exclude results from grep

      Sometimes you may wish to further filter grep output, such as in the following situation:   # zfs get all | grep compressratio backup01         compressratio         1.23x                  – backup01         refcompressratio      1.00x                  – backup01/data    compressratio         1.50x                  – backup01/data    refcompressratio      1.50x                  – backup01/photos  compressratio         1.05x                  – backup01/photos  refcompressratio      1.05x                  – Here we only really want to see…

  • ZFS: How to check compression efficiency

    ZFS: How to check compression efficiency

      If you have enabled compression on a ZFS folder you can check to see just how much disk space you’re saving. Use the following command:   sudo zfs get all [poolname]/[folder] | grep compressratio   An example:   sudo zfs get all backup01/data | grep compressratio   returns the following:   backup01/data compressratio  1.50x …

  • Ubuntu: How to list drives by ID

    Ubuntu: How to list drives by ID

    If you’re creating a  zpool on Ubuntu you have several options when it comes to referring to the drives; the most common is /dev/sda, /dev/sdb and so on. This can cause problems with zpools as the letter designated to a drive can change if you move the drives around, add or remove a drive –…

  • How to find kernel version in Ubuntu 12.04 Precise Pangolin

    How to find kernel version in Ubuntu 12.04 Precise Pangolin

    Note: This also works in other versions of Ubuntu, such as 11.10, 11.04, 10.10, 10.04 and earlier.   Sometimes you may wish to find out which kernel you’re  currently running; fortunately, this is quite easy to do with the uname command. If you’re running Ubuntu Desktop, open up a Terminal; if you’re using Ubuntu Server…

  • How to reset a ProCurve 2510-24g to default settings

    Here’s one someone asked me today – it’s reasonably straight-forward, though not necessarily obvious:   Press in both the Clear and Reset buttons (tiny buttons on the left edge) Release the Reset button after the port lights come on (~2 seconds) When the Self-Test LED starts flashing (to the left of the Clear and Reset…