In this guide we will add a dedicated storage device or partition to an existing Origo OS installation for image storage, so you should have completed this guide. Putting your engine’s shared images on a dedicated device or partion has several advantages – you can obviously get improved performance and capacity, depending on the device you are adding, but the main advantage, in our view, is that by letting Origo OS control an entire device or partition and format it with ZFS, Origo OS can leverage ZFS storage snapshots.
Origo OS can use any available local storage for shared storage. A distinct storage area assigned to Origo OS is called a storage pool. Storage pools are exported via NFS to the nodes, and are configured in the Origo OS configuration files (config.cfg and nodeconfig.cfg).
The default Origo OS storage configuration is to use the directory “/mnt/stabile/images” for shared image storage with whatever file system this directory happens to be located on. This guide assumes that your Origo OS installation has this simple configuration, and we will add a new storage pool to your configuration, corresponding to the device/partition you are adding. The new storage pool will be mounted on “/stabile-images/images”. You can use either an existing partition or an entire new device as a new storage pool.
You can add a new storage pool to Origo OS in two ways. Either way, please note that any existing data will be lost.
wipefs -a /dev/sdb
To verify your new storage configuration, go to the “Images” tab and select “All” from the “Show” drop-down. Click on any image and in the image dialog, click on the “Storage pool” drop-down. There should now be 3 options in the drop-down, typically: “On node”, “Default” and “images on sda1”. All your images will typically be located in your old storage pool. If you select the new storage pool, “Default” from the drop-down, and click “Save”, your image will be moved to the new ZFS storage pool.
When Origo OS is first installed it does not try to use ZFS – the default and only shared storage pool is simply a dirctory on you hard drive (“/mnt/stabile/images”). If you add a storage pool, by adding a dedicated partition or device, like in the above, it will be formatted with ZFS and a ZFS pool will be created with the name “stabile-images”. If you add another partition or device by simply repeating the above procedure, it will simply be added to the existing ZFS pool in a raid0 configuration. If you have multiple storage devices you want to use, and want to use ZFS for redundancy, you should configure ZFS by hand, in whatever configuration you prefer (miroring, raidz2, raidz3, etc.). As long as you name your ZFS pool “stabile-images”, and your ZFS file system “images”, things should work.