How to increase the capacity of the ZFS Storage Simulator under VirtualBox

The ZFSSA Simulator is a good way to learn all about the ZFS Storage Appliance. The simulator introduces you to the power and simplicity of the ZFS Storage Appliance software using VirtualBox or VMware Workstation and is identical in every way to the appliance version, with the exception of clustering.

Out of the box, the simulator image uses 16 disks occupying 125GB of dynamically allocated disk space (1x 50GB system disk and 15x 5GB disks for the data pool). Whilst this capacity is adequate for testing the simulator, I use the simulator for different purposes from monitoring via the API, scripting solutions and on occasions other tests, the storage size is too small for some tests — I need more storage!

In this article, I discuss how we increase the default storage for the ZFS Storage Simulator virtual appliance in VirtualBox prior it's initial configuration.

For the purpose of the examples in this article, I am using a VirtualBox VM image named zfssa on an Ubuntu desktop, but the steps should work equally well on other platforms.

Prerequisites

Before you begin the setup and configuration procedures, complete the following prerequisite steps:

  1. Ensure that your host system (laptop, desktop, server) has sufficient resources to support the simulator's configuration of 2560 megabytes of memory and at least enough storage for the dynamically allocated disk space (minimum 125GB).
  2. Check that your CPU has 64-bit capability and supports hardware virtualization.
  3. Check that either Intel Virtualization Technology (VT-x) or Advanced Micro Devices Virtualization (AMD-V) is enabled on your system.

Getting started

Install and Configure the Oracle ZFS Storage Appliance Simulator Follow these steps to import the Simulator:

  1. Install and start VirtualBox 4.3.12 or later.
  2. Download the simulator OVA installable image for VirtualBox. ZFS Storage Appliance Home
  3. Select "File > Import Appliance" in VirtualBox VirtualBox Import
  4. Select the simulator OVA archive file and click on 'Import'. Be patient it can take quite a while for the VM and all the VirtualBox VDI files to be created.
  5. Do NOT start the virtual machine — If we do start the VM then we won't be able to increase the storage size.

Increasing storage capacity

Before we start our new virtual machine, let's increase the storage capacity by performing the following steps:

  1. Locate the VM disk image names and controller
  2. Detach the disks from the VM image
  3. Remove the detached disks
  4. Create new disks with increased capacity
  5. Attach new disks to the VM image

Step 1 — Locate the VM disk image names and controller

  • Firstly, let's check on the location and names of the attached disks:
    $ VBoxManage showvminfo zfssa
       :
       :
    SATA (0, 0): /u01/virtual/zfssa/zfssa-disk001.vdi (UUID: df99d759-a125-4d69-adcf-c5739084916d)
    SATA (1, 0): /u01/virtual/zfssa/zfssa-disk002.vdi (UUID: 1c702665-01bb-4787-a055-c8a761a07772)
    SATA (2, 0): /u01/virtual/zfssa/zfssa-disk003.vdi (UUID: 08418592-25ad-4c24-9de6-3cf34dad29ef)
       :
       :
    SATA (14, 0): /u01/virtual/zfssa/zfssa-disk015.vdi (UUID: a9500688-590e-44ad-bfb8-ee87254ca4e4)
    SATA (15, 0): /u01/virtual/zfssa/zfssa-disk016.vdi (UUID: 5d971564-a158-4131-b264-acf5a10d7bec)
       :
       :
    

    Step 2 — Detach the existing disks from the VM image

    From the output in step 1, we see that all are disks are located on the storage controller SATA with controller ID 0. With this information we can detach the disks using the following:

    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 1 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 2 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 3 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 4 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 5 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 6 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 7 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 8 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 9 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 10 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 11 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 12 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 13 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 14 --type hdd --medium none
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 15 --type hdd --medium none

    No output will be displayed if no errors occur.

    NOTE: We do not detach the disk zfssa-disk001.vdi on controller 0 port 0 as this is the system disk for the VM, we are simply removing the disks that will be used to create the data pool.

    Step 3 — Remove the detached disks

    Now the virtual disks have been disassociated from the virtual machine, we can go ahead and delete these devices.

    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk002.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk003.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk004.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk005.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk006.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk007.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk008.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk009.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk010.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk011.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk012.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk013.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk014.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk015.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    $ VBoxManage closemedium disk /u01/virtual/zfssa/zfssa-disk016.vdi --delete
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

     

    Step 4 — Create new disks with increased capacity

    In this step, we are creating the new storage with double the capacity of the original virtual storage. Thus for each virtual disk, we are using a value of 10240 equating to 10GB per disk.

    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk002.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 6623b442-3235-481a-8e56-f72880a738f1
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk003.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 31d86440-7400-4c2b-b731-8704e075f3ca
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk004.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 35042c4d-6505-424e-be6b-7b3ef3d8c28b
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk005.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: dfa0fa63-fec8-4c8c-bfc7-01e05f4dbd26
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk006.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: a951db69-81b6-4742-8718-bc1b0244b823
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk007.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 03bd2146-f42f-42fb-a154-5c41647b9fd5
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk008.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 78ac4bfa-97fc-431d-9c32-d1168e87d905
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk009.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 5324962a-ba18-41c7-8ec9-3256910c2831
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk010.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 97c7f9ba-c92e-47e4-ba9f-2f80b40d2d43
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk011.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 18d356be-735d-4c19-940f-e0ac66e36ae3
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk012.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 0ed41b22-a4e4-429c-82d4-a23932b72785
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk013.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 48193e63-133c-4fa4-b726-d6d248a93717
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk014.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 7d281502-a796-4b6b-98a4-3d83b8f2a91e
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk015.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: 388f6eb8-a8c2-4f05-9c92-7b92b0cc841f
    $ VBoxManage createmedium disk --filename /u01/virtual/zfssa/zfssa-disk016.vdi --size=10240 --variant Standard
    0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
    Medium created. UUID: c8556547-662e-4f7b-97f6-ae4936c1ed62

    NOTE: We can change the value 10240 to whatever capacity we require as long as we have the physical storage available (ie: for 50GB virtual drives we'd use the value 51200, for 100GB we use the value 102400, etc.). Do make sure that all the disks have the same capacity.

    Step 5 — Attach new disks to the VM image

    Now that we have the new virtual storage devices, let's attach them to our virtual machine.

    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 1 --type hdd --medium zfssa-disk002.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 2 --type hdd --medium zfssa-disk003.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 3 --type hdd --medium zfssa-disk004.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 4 --type hdd --medium zfssa-disk005.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 5 --type hdd --medium zfssa-disk006.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 6 --type hdd --medium zfssa-disk007.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 7 --type hdd --medium zfssa-disk008.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 8 --type hdd --medium zfssa-disk009.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 9 --type hdd --medium zfssa-disk010.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 10 --type hdd --medium zfssa-disk011.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 11 --type hdd --medium zfssa-disk012.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 12 --type hdd --medium zfssa-disk013.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 13 --type hdd --medium zfssa-disk014.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 14 --type hdd --medium zfssa-disk015.vdi
    $ VBoxManage storageattach zfssa --storagectl "SATA" --device 0 --port 15 --type hdd --medium zfssa-disk016.vdi
    

    No output will be displayed if no errors occur

    At this point, we can now start the VM to begin the appliance configuration.

    Initial Configuration

    When the simulator initially boots you will be prompted for some basic network settings (this is exactly the same as if you were using an actual Oracle ZFS Storage Appliance). Many of these fields should be filled in for you. Here are some tips if you're unsure how to fill in any of the required fields:

    • Host Name: Any name you want.
    • DNS Domain: "localdomain"
    • IP Address: Any spare IP address on your network.
    • IP Netmask: The netmask for your network.
    • Default Router: The same as the IP address, but put 1 as the final octet.
    • Default Router: The same as the IP address, but put 1 as the final octet.
    • DNS Server: The same as the IP address, but put 1 as the final octet.
    • Password: Whatever you want for your 'root' Super-User.

    After you enter this information, wait until the screen provides you with two URLs to use for subsequent configuration and administration, one with an IP address and one with the hostname you specified. Direct a web browser to the URL with the IP address (for example, https://192.168.56.101:215/) to complete appliance configuration. The login name is 'root' and the password is what you entered in the initial configuration screen.

    For assistance on the initial configuration of the ZFS Storage Simulator. Download the Oracle ZFS Storage Simulator Quick Start Guide.

    Visit my post on Installing the ZFS Storage Appliance Simulator for quick steps to installing the virtual machine.