{"id":257,"date":"2015-12-05T14:45:55","date_gmt":"2015-12-05T13:45:55","guid":{"rendered":"https:\/\/ilmarkerm.eu\/blog\/?p=257"},"modified":"2015-12-05T18:23:49","modified_gmt":"2015-12-05T17:23:49","slug":"installing-oracle-zfs-storage-appliance-simulator-for-you-virtualhome-storage-requirements","status":"publish","type":"post","link":"https:\/\/ilmarkerm.eu\/blog\/2015\/12\/installing-oracle-zfs-storage-appliance-simulator-for-you-virtualhome-storage-requirements\/","title":{"rendered":"Installing Oracle ZFS Storage Appliance simulator for you virtual storage requirements"},"content":{"rendered":"<p>Oracle has released it ZFS Storage Appliance software simulator. It is sold as an Tier 2 storage hardware, but using the simulator you can get all its powerful storage management features on your Virtualbox. The simulator is free and it has no time limits nor restrictions (although one restriction &#8211; the simulator is not clustered).<\/p>\n<p>Some use cases for the simulator:<br \/>\n* You can try out the new ZFS Storage Applicance software patches before applying them on the real physical storage box<br \/>\n* You want to test some Oracle database features that are only activated when using Oracle storage (HCC)<br \/>\n* You want to provide shared network storage fro your VM-s, with advanced storage capabilities, like snapshots, cloning, compression, deduplication, remote replication, encryption etc<br \/>\n* You want to evaluate ZFS Storage Appliance features before purchasing the real box or before using a specific feature in production<\/p>\n<p><a href=\"https:\/\/www.oracle.com\/storage\/nas\/zfs-appliance-software\/index.html\">You can download it here<\/a><\/p>\n<p>Setting up the simulator under virtualbox is very simple and quick. On the configuration below I make no effort to secure the system, since it is intended to be used only in my Virtualbox environment.<\/p>\n<h1>Requirements<\/h1>\n<p><a href=\"https:\/\/www.virtualbox.org\/\">Virtualbox 4.2.12 or later<\/a>.<br \/>\nI&#8217;m using Virtualbox 5.<\/p>\n<h1>Download the software<\/h1>\n<p>Go to the <a href=\"https:\/\/www.oracle.com\/storage\/nas\/zfs-appliance-software\/index.html\">ZFS Storage software page<\/a> and click <strong>Try the simulator<\/strong>. First you have to register the download and then you can download ZIP file containing the software.<br \/>\nUnzip the file you downloaded, then you&#8217;ll get <strong>OracleZFSStorageVM<\/strong> directory with 18 files under it.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfsfiles.png\" alt=\"\" \/><\/p>\n<h1>Import VM to Virtualbox<\/h1>\n<p>Open Virtualbox Manager, go to <strong>File > Import Appliance<\/strong>.<br \/>\nBrowse to <strong>Oracle_ZFS_Storage.ovf<\/strong> from the unzipped software directory.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfsimport.png\" alt=\"\" \/><\/p>\n<p>Click <strong>Continue<\/strong>.<br \/>\nOn the next screen you can view the imported VM settings and then press <strong>Import<\/strong>.<\/p>\n<h1>Initial configuration<\/h1>\n<p>After importing you will have a new VM called <strong>Oracle_ZFS_Storage<\/strong>.<br \/>\nOpen <strong>Settings<\/strong> for this VM and go to <strong>Network<\/strong> tab. Verify that it is connected to the correct virtual network. Mine is automatically imported under the only Host-only Adapter network I have and I&#8217;m going to keep that setting.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfsvmsettings.png\" alt=\"\" \/><\/p>\n<p>Now launch the VM.<\/p>\n<p>It will take a 10+ seconds to boot up and then on the first boot it will ask you a few questions on basic network settings and root user password.<br \/>\nSupply the requested values:<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfsconfig.png\" alt=\"\" \/><\/p>\n<p>Press <strong>Enter<\/strong> when done. After that it will show you a blank screen for 30+ seconds and after it is done the system is ready.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfsready.png\" alt=\"\" \/><\/p>\n<p>Now open the URL requested <em>https:\/\/192.168.56.98:215\/<\/em> in your browser to finish the initial setup.<\/p>\n<p>Log in as <strong>root<\/strong> supplying the password you set previously.<br \/>\nWelcome screen appears. Click <strong>Start<\/strong> to go through a small initial setup wizard. Everything can also be changed later.<\/p>\n<p>First screen, networking, just press <strong>Commit<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfs1.png\" alt=\"\" \/><\/p>\n<p>Second screen, DNS, just press <strong>Commit<\/strong>.<br \/>\nNext, NTP, just press <strong>Commit<\/strong>.<br \/>\nNext, Name Services&#8230; here you need to set up LD&#8230; just kidding, press <strong>Commit<\/strong>.<\/p>\n<p>Now, <strong>Configure storage<\/strong>, here you can set up the storage pool.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfs2.png\" alt=\"\" \/><\/p>\n<p>Press the plus sign before <strong>Available pools<\/strong> and supply a pool name &#8211; <strong>pool1<\/strong> in my example.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfs3.png\" alt=\"\" \/><\/p>\n<p>On <strong>Verify and allocate devices<\/strong> screen you can just press <strong>Commit<\/strong><br \/>\nThe next, <strong>Choose storage profile<\/strong> is the most interesting. In production it requires <em>a lot of consideration<\/em>, because every choice has very different availability, read performance and write performance implications. Here, I\u00e4ll just choose <strong>Striped<\/strong> to get the maximum performance and no loss in available storage size. Obviously this would be a very bad choice for production system due to no availability or fault tolerance at all.<\/p>\n<p><img decoding=\"async\" src=\"\\pics\\zfs1\\zfs4.png\" alt=\"\" \/><\/p>\n<p>Press <strong>Commit<\/strong>. You are now back in <strong>Configure storage<\/strong> screen, here again press <strong>Commit<\/strong>.<br \/>\nOn the final <strong>Registration &amp; Support<\/strong> page there is no <strong>Commit<\/strong> button, but there is a button called <strong>Later<\/strong>, press it and then confirm it by pressing <strong>OK<\/strong>.<\/p>\n<p>All done \ud83d\ude42<\/p>\n<h1>Set up iSCSI<\/h1>\n<p>If you want to share iSCSI block devices, then first need to create iSCSI Target.<br \/>\nGo to <strong>Configuration > SAN<\/strong> and click on <strong>ISCSI<\/strong>.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfs5.png\" alt=\"\" \/><br \/>\nClick the plus sign before <strong>Targets<\/strong>.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfs6.png\" alt=\"\" \/><br \/>\nIf you don&#8217;t care how the IQN looks, just provide some name for <strong>Alias<\/strong> and press <strong>OK<\/strong>.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfs7.png\" alt=\"\" \/><br \/>\nIt will then automatically generate IQN for you, so in my example it is named: <em>iqn.1986-03.com.sun:02:455fe302-6504-6eaf-d478-9b3acf9f4afe<\/em><\/p>\n<h1>Set up SNMP<\/h1>\n<p>By default SNMP service is not enabled, but if you want to test Hybrid Columnar Compression it is required. You can get more details about it <a href=\"https:\/\/jongsma.wordpress.com\/category\/zfs-storage-appliance\/\">from this blog post<\/a>.<br \/>\nGo to <strong>Configuration > Services<\/strong>, and click on the aroow button to expand the <strong>Services<\/strong> menu.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\snmp1.png\" alt=\"\" \/><br \/>\nClick on <strong>SNMP<\/strong> from the left-side menu.<br \/>\nFirst click on the <strong>power button<\/strong> symbol under SNMP to enable the service and set the following values:<br \/>\n* Authorized network\/mask: <strong>0.0.0.0<\/strong> \/ <strong>0<\/strong><br \/>\n* Appliance contact: your email address<br \/>\n* Trap destination: 127.0.0.1<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\snmp3.png\" alt=\"\" \/><\/p>\n<p>Click <strong>Apply<\/strong>.<\/p>\n<h1>REST API<\/h1>\n<p>All storage configuration can also be done using REST API. You can create new LUNs, filesystems, change thir properties, snapshot, clone, drop&#8230; everything that you can do in GUI you can also do over REST API.<br \/>\nI use it a lot in production in database backup&amp;restore scripts and also in providing production database clones for testing.<br \/>\nI have also blogged about it before: <a href=\"\/blog\/2014\/12\/sample-code-using-the-oracle-zfs-storage-appliance-rest-api-from-python\/\">SAMPLE CODE: USING THE ORACLE ZFS STORAGE APPLIANCE REST API FROM PYTHON<\/a><br \/>\nI really hope I can soon publish my full Oracle database backup&amp;restore script suite that also relies on ZFSSA sotrage features heavily.<\/p>\n<p><a href=\"http:\/\/docs.oracle.com\/cd\/E56047_01\/html\/E56084\/index.html\">ZFSSA REST API documentation is here<\/a><\/p>\n<p>REST API is turned on by default and it is accessible over the same URL as the management GUI: https:\/\/192.168.56.98:215\/<\/p>\n<h1>Create NFS filesystem<\/h1>\n<p>To create a new NFS filesystem go to <strong>Shares<\/strong><br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfsnfs1.png\" alt=\"\" \/><br \/>\nClick the plus sign next to <strong>Filesystems<\/strong>.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfsnfs2.png\" alt=\"\" \/><br \/>\nWrite filesystem <strong>name<\/strong> and you can also set the share UID, GID and permissions. For example if you are using it for oracle database and have installed the oracle-rdbms-preinstall rpm package under linux, then you could set User and Group values to 54321 to get the correct permissions on mount.<br \/>\nClick <strong>Apply<\/strong>.<\/p>\n<p>The newly created filesystem appears on the list.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfsnfs3.png\" alt=\"\" \/><\/p>\n<p>You can now mount the NFS filesystem on a target machine, in my example using the settings:<\/p>\n<pre><code>mount -t nfs 192.168.56.98:\/export\/oradata \/mnt\n<\/code><\/pre>\n<p>If you hover over the filesystem entry, you notice a pencil icon on the left. If you click it you can change filesystem properties, restrictions and snapshots.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfsnfs4.png\" alt=\"\" \/><br \/>\nIf the filesystem is going to be used for Oracle database data files (not for RMAN, UNDO, REDO, TEMP) , then one thing that you may want to change is <strong>Database record size<\/strong> to be equal to the tablespace block size 8K.<br \/>\nClick <strong>Apply<\/strong>.<\/p>\n<h1>Create iSCSI LUN<\/h1>\n<p>Go to <strong>Shares<\/strong> and click on <strong>LUNs<\/strong>. This way you can present block devices to servers, to be used for example as ASM disks.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfslun1.png\" alt=\"\" \/><br \/>\nClick plus sign next to <strong>LUNs<\/strong>.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfslun2.png\" alt=\"\" \/><\/p>\n<p>Fill out the properties, again, if the LUN is to be used for Oracle tablespace data files, then you may want to set the <strong>Volume block size<\/strong> to tablespace block size (8K).<br \/>\nClick <strong>Apply<\/strong>.<br \/>\nThe newly create LUN appears on the list.<br \/>\n<img decoding=\"async\" src=\"\\pics\\zfs1\\zfslun3.png\" alt=\"\" \/><br \/>\nAgain, the pencil icon opens the LUN detailed properties page.<\/p>\n<p>NB! LUNs can also be compressed and deduplicated!<\/p>\n<p>Let&#8217;s try accessing this LUN from Linux. First connect to ZFS:<\/p>\n<pre><code>[root@localhost ~]# iscsiadm -m discovery -t sendtargets -p 192.168.56.98\n192.168.56.98:3260,2 iqn.1986-03.com.sun:02:455fe302-6504-6eaf-d478-9b3acf9f4afe\n[root@localhost ~]# iscsiadm -m node --login\nLogging in to [iface: default, target: iqn.1986-03.com.sun:02:455fe302-6504-6eaf-d478-9b3acf9f4afe, portal: 192.168.56.98,3260] (multiple)\nLogin to [iface: default, target: iqn.1986-03.com.sun:02:455fe302-6504-6eaf-d478-9b3acf9f4afe, portal: 192.168.56.98,3260] successful.\n<\/code><\/pre>\n<p>Now I should have the new LUN mapped to linux:<\/p>\n<pre><code>[root@localhost proc]# cat \/proc\/scsi\/scsi\nAttached devices:\nHost: scsi1 Channel: 00 Id: 00 Lun: 00\n  Vendor: VBOX     Model: CD-ROM           Rev: 1.0\n  Type:   CD-ROM                           ANSI  SCSI revision: 05\nHost: scsi2 Channel: 00 Id: 00 Lun: 00\n  Vendor: ATA      Model: VBOX HARDDISK    Rev: 1.0\n  Type:   Direct-Access                    ANSI  SCSI revision: 05\nHost: scsi3 Channel: 00 Id: 00 Lun: 00\n  Vendor: SUN      Model: Sun Storage 7000 Rev: 1.0\n  Type:   Direct-Access                    ANSI  SCSI revision: 05\n\n[root@localhost proc]# cat \/proc\/partitions\nmajor minor  #blocks  name\n\n  11        0      57620 sr0\n   8        0   12582912 sda\n   8        1     204800 sda1\n   8        2   12377088 sda2\n 252        0   11325440 dm-0\n 252        1    1048576 dm-1\n   8       16   10485760 sdb    \n<\/code><\/pre>\n<p>My new device is \/dev\/sdb. Lets confirm its SCSI ID.<\/p>\n<pre><code>[root@localhost proc]# \/usr\/lib\/udev\/scsi_id -g -u \/dev\/sdb\n3600144f09ff1616800005662f2f40001\n<\/code><\/pre>\n<p>Matches perfectly with the ID in ZFS management interface GUID column (ignore the first digit).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle has released it ZFS Storage Appliance software simulator. It is sold as an Tier 2 storage hardware, but using the simulator you can get all its powerful storage management features on your Virtualbox. The simulator is free and it has no time limits nor restrictions (although one restriction &#8211; the simulator is not clustered). [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[4,7],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-blog-entry","tag-oracle","tag-zfssa"],"_links":{"self":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":17,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ilmarkerm.eu\/blog\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}