OpenMediaVault – Expanding the Filesystem

I recently had the opportunity to replace a bunch of ageing 2TB drives in my OpenMediaVault NAS with some 3TB drives. I run it in a 6+2 RAID-6 configuration (yes, I know, RAID is dead). I was a bit cheeky and replaced 2 drives at a time and let it rebuild. This isn’t something I recommend you do in the real world. Everything came up clean after the drives were replaced. I even got to modify the mdadm.conf file again to tell it I had 0 spares. The problem was that the size of the filesystem in OpenMediaVault was the same as it was before. When you click on Grow it expects you to be adding drives. So, you can grow the filesystem, but you need to expand the device to fill the drives. I recommend taking a backup before you do this. And I unmounted my shares before I did this too.

If you’re using a bitmap, you’ll need to remove it first.

mdadm --grow /dev/md0 --bitmap none
mdadm --grow /dev/md0 --size max
mdadm --wait /dev/md0
mdadm --grow /dev/md0 --bitmap internal

In this example, /dev/md0 is the device you want to grow. It’s likely that your device is called /dev/md0. Note, also, that this will take some time to complete. The next step is to expand the filesystem to fit the RAID device. It’s a good idea to run a filesystem check before you do this.

fsck /dev/md0

Then it’s time to resize (assuming you had no problems in the last step).

resize2fs /dev/md0

You should then be able to remount the device and see the additional capacity. Big thanks to kernel.org for having some useful instructions here.

VMware – vSphere Basics – Create a Custom Role

I’ve been evaluating a data protection solution in the lab recently and wanted to create a custom role in vCenter for the solution to use. It’s a basic thing, but if you don’t do it often it might not be that obvious where to click. The VMware documentation site has more information on creating a custom role as well. Why would you do this? In the same way it’s a bad idea to give every service Domain Administrator privileges, it’s also a bad idea to give your data protection solutions elevated privileges in your environment. If you’re into that kind of thing, read this guidance on roles and permissions too. In this example, I created a “CohesityTest” user as a domain user in Active Directory. I then wanted to assign that user to a custom role in vCenter and assign it certain privileges. In this example I’m using vCenter 6.5 with the Web Client. The process is as follows.

Go to the Home screen in vCenter and click on “Administration”.

In this example, I’ve already created a Role called Cohesity (following the instructions above) and assigned privileges to that Role.

Click on “Global Permissions” and the click on the green plus sign.

I want to add a user to a role. Click on “Add”.

The user I want to add is a domain user, so I use the drop down box to select the domain the user resides in.

Typing “coh” into the search field yields the only user with those letters in their name.

Once the user is selected, you can click on “Add” and then “OK”.

Make sure the user has the appropriate Role assigned. In this example, I’m assigning the CohesityTest user to the Cohesity Role and propagating these changes to child objects. Click “OK”. And then you’re done.

To check your role has the correct privileges, click on “Roles”, “Role Name”, and then “Privileges” and you can expand the items to check the correct privileges are assigned.

Once I’d done this I went back and re-added the vCenter to the Cohesity environment using the CohesityTest user and I was good to go.

Updated Articles Page

I recently had the opportunity to deploy a Cohesity C2500 4-node appliance and thought I’d run through the basics of the installation. There’s a new document outlining the process on the articles page.

Updated Articles Page

I recently replaced one of my NAS devices at home (after over 8 years of pretty solid service) and thought I’d run through the installation process. There’s a new document outlining the process on the articles page covering the deployment of the QNAP TS-831X.

OpenMediaVault – Modifying Monit Parameters

You can file this article under “not terribly useful but something I may refer to again in the future”. I’ve been migrating a bunch of data from one of my QNAP NAS devices at home to my OpenMediaVault NAS. Monit, my “faithful employee”, sent me an email to let me know I was filling up the filesystem on the OMV NAS.

By default OMV alerts at 80% full. You can change this though. Just jump on a terminal and run the following:

nano /etc/default/openmediavault

Add this line to the file

OMV_MONIT_SERVICE_FILESYSTEM_SPACEUSAGE=95

Then run the following commands to update the configuration

omv-mkconf collectd
monit restart collectd

Of course, you need to determine what level of filesystem usage you’re comfortable with. In this example, I’ve set it to 95% as it’s a fairly static environment. If, however, you’re capable of putting a lot of data on the device quickly, then 5% buffer may be insufficient. I’d also like to clarify that I’m not unhappy with QNAP, but the device I’m migrating off is 8 years old now and it would be a pain to have to recover if something went wrong. If you’re interested in reading more about Monit you can find documentation here.

VMUG – Getting Started With The New VMUG Website

I wrote previously about the next Brisbane VMUG meeting coming up in February. Registration numbers have been very low. Some of that is no doubt due to summer holidays and lack motivation to think about “work-related” things. Some of it is due to local folk being interested in other events, or not having time to go to an event on a Tuesday afternoon. And some of it might be that they aren’t into the topic. However, some of it might also be due to the fact that people were finding the new VMUG website a little confusing to navigate. At least, I hope that’s why. In any case I put together a brief article that shows you in 22 or so simple steps how to sign up for a VMUG account and register for a local meeting. Now you have no excuse. You can check it out here.

EMC – naviseccli – checking your iSCSI ports are running at the correct speed

It’s been a while since I wrote about naviseccli and I admit I’ve missed it. I once wrote about using naviseccli to identify MirrorView ports on a CLARiiON array. Normally the MirrorView port is consistently located, but in that example we’d upgraded from a CX3-80 to a Cx4-960 and it was in a different spot. Oh how we laughed when we realised what the problem was. Anyway, we’ve been doing some work on an ever so slightly more modern VNX5300 and needed to confirm that some newly installed iSCSI SLICs were operating at the correct speed. (Note that these commands were run from the Control Station).

The first step is to list the ports

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2016.09.07 08:59:37 =~=~=~=~=~=~=~=~=~=~=~=
[nasadmin@NAS001 ~]$ navicli -h A_VNXSP connection -getport

SP:  A
Port ID:  8
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.a8
iSCSI Alias:  0017.a8
IP Address:  192.168.0.13
Subnet Mask:  255.255.255.0
Gateway Address:  192.168.0.254
Initiator Authentication:  false

SP:  A
Port ID:  9
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.a9
iSCSI Alias:  0017.a9

SP:  A
Port ID:  10
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.a10
iSCSI Alias:  017.a10

SP:  A
Port ID:  11
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.a11
iSCSI Alias:  017.a11

SP:  B
Port ID:  8
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.b8
iSCSI Alias:  0017.b8
IP Address:  192.168.0.14
Subnet Mask:  255.255.255.0
Gateway Address:  192.168.0.254
Initiator Authentication:  false

SP:  B
Port ID:  9
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.b9
iSCSI Alias:  0017.b9

SP:  B
Port ID:  10
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.b10
iSCSI Alias:  017.b10

SP:  B
Port ID:  11
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.b11
iSCSI Alias:  017.b11

Once you’ve done that, you can list the port speed for a particular port

[nasadmin@NAS001 ~]$ navicli -h A_VNXSP connection -getport -sp a -portid 8 -speed
SP:  A
Port ID:  8
Port WWN:  iqn.1992-04.com.emc:cx.cetv2223700017.a8
iSCSI Alias:  0017.a8
IP Address:  192.168.0.13
Subnet Mask:  255.255.255.0
Gateway Address:  192.168.0.254
Initiator Authentication:  false
Port Speed:  1000 Mb
Auto-Negotiate:  Yes
Available Speeds:  10 Mb
-               :  100 Mb
-               :  1000 Mb
-               :  Auto

If you have a lot of ports to check this may not be the most efficient way to do it (ioportconfig may be more sensible), but if your network team are reporting on one particular port being an issue – this is a great way to narrow it down.

Ravello – Basics – Deploying an ESXi instance

I’ve been using Ravello a bit recently, thanks primarily to their kind offer of free time for vExperts. I thought it would be worth while doing a few posts on what you need to do to get started. While this information is available via a number of sources already, I thought I’d update it a little to reflect the steps required when using the latest version of the dashboard and ESXi 6. Documentation is also a good way for me to learn things, and it’s my blog so I can afford to be self-indulgent.

In any case, the original steps I followed are here. The article I did is available here. Justin Warren did a nice series on using Ravello, and his post on “How To Import OVA/OVF Into Ravello” was particularly useful. Emad Younis also has an excellent article on deploying the vCenter Server Appliance 6 on Ravello – you can read it here.

I like what Ravello does, so much so that I put a little badge on my blog. And I think there’s a crapload of cool use cases for this technology. If you’re a vExpert and not taking advantage of Ravello’s offer – what’s wrong with you? Get on there and check it out.

FreeNAS – Using one SSD for ZIL and L2ARC

Following on from my previous musings on FreeNAS, I thought I’d do a quick howto post on using one SSD for both ZIL and L2ARC. This has been covered here and here, but I found myself missing a few steps, so I thought I’d cover it here for my own benefit if nothing else. Before I start though, you should really consider using two drives, particularly with ZIL. And before you start, you’ve obviously already gone through the exercise of understanding your workload, and you’ve thought about the ramifications of what you’re doing, right? Because using one drive isn’t necessarily recommended …

So, let’s get started by connecting to your NAS via SSH are some other console mechanism.

Last login: Sun Dec 13 10:25:29 on console
dans-MacBook-Pro:~ dan$ ssh dan@freenas1

dan@freenas1's password: 
Last login: Wed Dec 30 06:57:25 2015 from 192.168.0.100
FreeBSD 9.3-RELEASE-p28 (FREENAS.amd64) #0 r288272+f229c79: Sat Dec 12 11:58:01 PST 2015

FreeNAS (c) 2009-2015, The FreeNAS Development Team
All rights reserved.
FreeNAS is released under the modified BSD license.

For more information, documentation, help or support, go here:
  http://freenas.org

Welcome to FreeNAS

You then need to find your SSD.

dan@freenas1:~ % sudo camcontrol devlist
Password:
<INTEL SSDSC2CT060A3 300i>         at scbus0 target 0 lun 0 (ada0,pass0)
<ST32000644NS 130C>                at scbus1 target 0 lun 0 (ada1,pass1)
<ST32000644NS 130C>                at scbus2 target 0 lun 0 (ada2,pass2)
<ST32000644NS 130C>                at scbus3 target 0 lun 0 (ada3,pass3)
<ST32000644NS 130C>                at scbus4 target 0 lun 0 (ada4,pass4)
<ST32000644NS 130C>                at scbus5 target 0 lun 0 (ada5,pass5)
<SanDisk Cruzer Force 1.26>        at scbus7 target 0 lun 0 (pass6,da0)

I then wanted to look at ada0, this being the SSD.

dan@freenas1:~ % sudo gpart show ada0
gpart: No such geom: ada0.

No dice. But it’s there, isn’t it?

dan@freenas1:~ % zpool list -v
NAME                                     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
freenas-boot                            14.9G   533M  14.4G         -      -     3%  1.00x  ONLINE  -
  gptid/57344c8a-ae4d-11e5-b98c-bc5ff42c6cb2  14.9G   533M  14.4G         -      -     3%
volume0                                 9.06T  2.99M  9.06T         -     0%     0%  1.00x  ONLINE  /mnt
  raidz1                                9.06T  2.99M  9.06T         -     0%     0%
    gptid/6b604f11-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6c25f30c-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6cf26f5b-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6dc0508f-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6e88fc7a-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
dan@freenas1:~ % geom disk list
Geom name: da0
Providers:
1. Name: da0
   Mediasize: 16008609792 (14G)
   Sectorsize: 512
   Mode: r1w1e3
   descr: SanDisk Cruzer Force
   lunname: SanDisk Cruzer Force    4C532000050815116541
   lunid: SanDisk Cruzer Force    4C532000050815116541
   ident: 4C532000050815116541
   fwsectors: 63
   fwheads: 255
Geom name: ada0
Providers:
1. Name: ada0
   Mediasize: 60022480896 (55G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   descr: INTEL SSDSC2CT060A3
   lunid: 5001517bb28ade6a
   ident: CVMP213600AQ060AGN
   fwsectors: 63
   fwheads: 16
Geom name: ada1
Providers:
1. Name: ada1
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Mode: r2w2e5
   descr: ST32000644NS
   lunid: 5000c5004027e7b5
   ident: 9WM88536
   fwsectors: 63
   fwheads: 16
Geom name: ada2
Providers:
1. Name: ada2
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Mode: r2w2e5
   descr: ST32000644NS
   lunid: 5000c50040276a46
   ident: 9WM88DV9
   fwsectors: 63
   fwheads: 16

[snip]

Ok, so I can see it, but I can’t. I mucked about a bit, and came up with this approach.

dan@freenas1:~ % sudo gpart create -s gpt ada0
ada0 created
dan@freenas1:~ % sudo gpart add -a 4k -b 128 -t freebsd-zfs -s 10G ada0
ada0p1 added
dan@freenas1:~ % sudo gpart add -a 4k -t freebsd-zfs ada0
ada0p2 added

Which worked well. Now I need to get the UUIDs.

dan@freenas1:~ % sudo gpart list
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 31266782
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: da0p1
   Mediasize: 524288 (512k)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 17408
   Mode: r0w0e0
   rawuuid: 572c8954-ae4d-11e5-b98c-bc5ff42c6cb2
   rawtype: 21686148-6449-6e6f-744e-656564454649
   label: 1
   length: 524288
   offset: 17408
   type: bios-boot
   index: 1
   end: 1057
   start: 34
2. Name: da0p2
   Mediasize: 16008044544 (14G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 544768
   Mode: r1w1e2
   rawuuid: 57344c8a-ae4d-11e5-b98c-bc5ff42c6cb2
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: 1
   length: 16008044544
   offset: 544768
   type: freebsd-zfs
   index: 2
   end: 31266775
   start: 1064
Consumers:
1. Name: da0
   Mediasize: 16008609792 (14G)
   Sectorsize: 512
   Mode: r1w1e3

[snip]

Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 117231374
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
   Mediasize: 10737418240 (10G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: 94a4bd28-aeb7-11e5-99ac-bc5ff42c6cb2
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: 1
   length: 10737418240
   offset: 65536
   type: freebsd-zfs
   index: 1
   end: 20971647
   start: 128
2. Name: ada0p2
   Mediasize: 49284976640 (45G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawuuid: 9a79622f-aeb7-11e5-99ac-bc5ff42c6cb2
   rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
   label: 1
   length: 49284976640
   offset: 10737483776
   type: freebsd-zfs
   index: 2
   end: 117231367
   start: 20971648
Consumers:
1. Name: ada0
   Mediasize: 60022480896 (55G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0

Let’s double-check.

dan@freenas1:~ % sudo gpart show ada0
=>       34  117231341  ada0  GPT  (55G)
         34         94        - free -  (47k)
        128   20971520     1  freebsd-zfs  (10G)
   20971648   96259720     2  freebsd-zfs  (45G)
  117231368          7        - free -  (3.5k)

Everything looks copacetic. Let’s add them to the zpool. ZIL is log and L2ARC is cache. My pool is volume0 and I’m using the rawuuid value.

dan@freenas1:~ % sudo zpool add volume0 log gptid/94a4bd28-aeb7-11e5-99ac-bc5ff42c6cb2
dan@freenas1:~ % sudo zpool add volume0 cache gptid/9a79622f-aeb7-11e5-99ac-bc5ff42c6cb2

And here it is, all done.

dan@freenas1:~ % zpool list -v
NAME                                     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
freenas-boot                            14.9G   533M  14.4G         -      -     3%  1.00x  ONLINE  -
  gptid/57344c8a-ae4d-11e5-b98c-bc5ff42c6cb2  14.9G   533M  14.4G         -      -     3%
volume0                                 9.06T  3.02M  9.06T         -     0%     0%  1.00x  ONLINE  /mnt
  raidz1                                9.06T  3.02M  9.06T         -     0%     0%
    gptid/6b604f11-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6c25f30c-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6cf26f5b-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6dc0508f-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
    gptid/6e88fc7a-aeb5-11e5-99ac-bc5ff42c6cb2      -      -      -         -      -      -
  gptid/94a4bd28-aeb7-11e5-99ac-bc5ff42c6cb2  9.94G   132K  9.94G         -     0%     0%
cache                                       -      -      -      -      -      -
  gptid/9a79622f-aeb7-11e5-99ac-bc5ff42c6cb2  45.9G   190K  45.9G         -     0%     0%
dan@freenas1:~ %

 

EMC – Isilon – Joining Active Directory

I’ve been doing some work in the EMC vLabs and I thought I’d take note of how to join an Isilon cluster to Active Directory. The cluster in this example is running 3 Isilon virtual nodes with OneFS 7.1.0.0.

Once you’ve logged in, click on Cluster Management and Access Management. Under Access Management, click on Active Directory. Note that there are no Active Directory providers configured in this example.

Isilon_AD1

Click on “Join a domain”. You can then specify the Domain Name, etc. You can also specify the OU and Machine Account if required.

Isilon_AD2

Once you click on Join, you’ll be joined to the AD.

Isilon_AD3

To confirm this, you can also use isi auth status to confirm the status.

Isilon_AD4

And that’s it. As always, I recommend you use a directory service of some type on all of your devices for authentication.