How to expand a LUN with SteelFusion

 Why would you want to do this?

No matter how well you plan, resources are almost never in abundance. There could be a few reasons why you want to expand a LUN. Perhaps you want to add more vmdks to the same VMFS volume. Another reason could be that you might want to increase the size of the partition of the guest VM. In either case, you might want some of the workarounds listed at the end of the article before continuing. If you’re convinced that expanding the LUN is what you’re going to do, here is how to do it.

Check feasibility. First check at the maximum size and expandability of the partitions involved.

  • Check the guest OS partition. If NTFS, the maximum partition size for NTFS is 256TiB according to http://en.wikipedia.org/wiki/NTFS. You probably don’t need to go beyond that.
  • Check the partition size of VMFS. Consult VMware documentation http://www.vmware.com/support/pubs/ to ensure that you do not exceed maximum size for your partition. For example, if your partition is VMFS-3 and formatted with a 1MB block size, your maximum is 2TB-512bytes. If you’re already at the maximum, see workarounds further in this document.

These are the steps in a nutshell:

  • Resize/expand the LUN on the backend array.
  • If the SteelFusion Core is a virtual machine and LUN is connected via fiber, run a Rescan/Refresh on the HBA on the ESXi server where the Core is hosted.
  • On SteelFusion Core, perform a LUN rescan
  • Following VMware documentation, resize the VMFS volume http://kb.vmware.com/kb/1752
  • Resize or map the device in Windows

Resizing the LUN on the backend array.

Consult your array’s documentation for resizing the LUN. Here’s an illustration on how it’s done with a Netapp array.

1) Locate the LUN you want to expand, right click and select Edit.

01locate_lun

2) In the Edit LUN window, assign the new LUN size, and click save and close.

02editlun

Seeing the new size on the SteelFusion Core

The SteelFusion Core may automatically detect the change in LUN size depending on how busy the LUN is. If there are read/write operations from the backup with a “LUN configuration changed” status, the Core will be forced to rescan and retry and it will automatically change. There’s also a periodic rescan every 5 minutes that would cover change it. If you need the change immediately, you can do a manual rescan and force the change. The size will highlight in orange when it changes.

03addlun

Once the Core sees the change, the new size will be propagated to the Edge. If the LUN was pinned, the Edge will approve or deny the size increase based on Blockstore capacity.

Extending the VMFS volume size

Reference this http://kb.vmware.com/kb/1752 VMware KB article for extending your VMFS volume. Here’s how it’s done with the vSphere Web Client if you’re using vCenter:

 

Find the Datastore, right click and select Increase Datastore Capacity.

04increasedscap

Select Use Free space to expand the Datastore.

05usefree

If you’re using the deprecated Windows client, you can effectively do the same in the Datastore view here:

07increase

Select the Datastore you are expanding, go to the Configuration tab and select the Properties of the Datastore. In the Properties box, Select Increase.

08epxand

Follow the wizard and it will expand the volume.

Expanding the size of the virtual disk on the VMFS volume

If the UI doesn’t allow you perform the following steps, refer to this VMware KB:

http://kb.vmware.com/kb/1004047

Find the VM settings and change the size of the VMDK.

09find

In the Windows client, it’s in the same area.

10find

Expanding the partition in Windows

Lastly, go into the Windows guest and expand the volume size.

First, go to the Disk Management in the Computer Management application, right click and select Rescan Disks.

11rescan

Upon rescanning, you should see the newly added space as unallocated.

12unallocated

Right click on the primary partition of the disk and select Extend Volume.

13extend

At completion, you now should have your expanded disk.

Consideration

Consider inflating the VMDK file after doing the extension during non-peak hours. Because the added capacity that you just added to the VMDK file is sparse, you may want to fill it up with zeroes. The reasoning behind this is so that you are not struck with first write or double-write penalty (in all copy-on-write disks) when your guest writes to the disk. You can read a little about the penalty here: https://blogs.vmware.com/vsphere/2014/05/thick-vs-thin-disks-flash-arrays.html

http://blogs.vmware.com/vsphere/2012/03/thin-provisioning-whats-the-scoop.html

You can do this in the Datastore browser. Just find the VMDK file of your VM, right click and select Inflate.

14inflate

Functionality also is available in the Windows client.

15inflate

Workarounds

Here are some workarounds to consider LUN expansion is not feasible:

  • Consider moving swap files to another VMFS volume, preferably on a Local LUN. You can do this in the Options tab of a VM’s settings. This will require your VM to be shutdown, but the benefit of having this on a Local LUN is that it does not need to be replicated.
  • Consider moving guest page file, swap files, and print spools to another drive. Like workaround #1, these things do not need to be replicated, so moving them to a Local LUN can help with your WAN traffic.

Not-recommended workaround

A workaround that may sound logical, but is not recommended is to Storage vMotion the disk to another LUN. This should be your last resort. This may be something that vSphere administrators do commonly, but because the Blockstore on the Edge is a cache and not ordinary storage, this will result in a lot of WAN traffic and can be potentially dangerous.

Microsoft PowerShell takes forever to open!

If you’re in a situation where it appears to take forever to open a PowerShell prompt, Internet access might be the problem.

The easiest resolution at this point appears to allow Internet access to the machine. If that is not possible, you can disable the check for the publisher’s certificate revocation. You can do this from Internet Explorer (or Control Panel, Internet Options) by clicking on Tools, Internet Options. Under the Security section of the Advanced tab, uncheck “Check for publisher’s certificate revocation”.

internetoptions

NOTE: These type of security features are in place for a reason. Take caution when considering disabling these.

How to install ESXi on an Intel NUC (video)

Running a home lab with ESXi doesn’t require a big heavy server that consumes a lot of power. I wanted to build a lab machine that could be portable so I could take it along with me if I’m traveling. Fortunately, this machine also is tiny and consumes with very little power.

Here are the details for the NUC:
The Intel NUC is an awesome little PC with a tiny form factor and small power footprint. You can use this for a great media player, desktop, or even a server! I will be using it as an ESXi server.

Here’s the list of components that I bought to build it:
D54250WYKH (Core i5 with 2.5″ slot) – $ 350
Crucial 16GB Kit (2x 8GB) DDR3 1600 Mhz – $ 160
Samsung 250GB mSATA SSD – $ 150 – Fast storage for quick deployment, swap space, temp files, etc.
Seagate 1TB Hybrid SSD – $ 100 – Slower storage to store other VMs that will have a lot of data at rest. Since it’s a Hybrid disk, chances are, the active data will be on the SSD portion of the disk.

So, I did a little bit of research when trying to figure out whether or not ESXi ran on the NUC. I read through a number of blog posts and the one that helped me was this one:

ESXi 5.x Installation on Intel NUC fails with “No Network Adapters”


Here’s a shameless copy/paste of the resources required:
– ESXi 5.x U1 ISO image (from VMware downloads)
– ESXi-Customizer (ESXi-Customizer-v2.7.1.exe)
– Intel Driver (net-e1001e-1.0.0.x86_64.vib) (3rd Gen NUC)
– Intel Driver (net-e1000e-2.3.2.x86_64.vib) (4th Gen NUC)
– SATA Controller (sata-xahci-1.10-1.x86_64.vib) (4th Gen NUC) from v-front.de

Enjoy the video and please post comments!

Why are my VM’s custom attributes not backed up? Work around with PowerCLI

This posting is for those that might want to backup a VM on one vCenter and restore it in another vCenter, but seeing that the custom attributes are not copied over. For now, this is a workaround. Moving forward, VMware is deprecating custom attributes in favor of tags. For tagging, it makes sense because if you’re searching for a particular VM, that’s how you do it, but custom attributes are key-valued pairs. I’m not sure how that makes sense with tags.

First off, you will need PowerShell and PowerCLI both installed on your machine. You can do this from any Windows host that can talk to vCenter. If you’re using Windows 7 or above, you should not need to download PowerShell, but you can download it here if necessary: http://www.microsoft.com/en-us/download/details.aspx?id=34595. You can get the VMware PowerCLI here: https://my.vmware.com/group/vmware/get-download?downloadGroup=PCLI501. There’s an access restriction in PowerShell by default that will not allow PowerCLI commands to run if it’s turned on. The installer will ask if you want to turn it off – you can have the installer do it for you. After it’s all installed, you can move onto the next step.

The first thing we need to do is to authenticate against vCenter. You can do this with:
We’ll need to find out what the custom attributes are. You can get them by running:
Connect-VIServer -user -pass for example:
Connect-VIServer 10.5.10.204 -user domain\administrator -pass P@SSw0RD!

Before we do any backup, we need to find out what the custom attributes are. You can do this by running
$vm=get-vm

If you want to read the custom fields, you can type:
$vm.Customfields

You can output those custom fields into a file or whatever you want. When you want to write those field back into a VM, you would do it this way:

After registering the VM, you can run this to assign the new vm:
$newvm = get-vm

Then loop through the custom fields and set them
foreach ($field in $vm.Customfields) {set-annotation -Entity $newvm -customattribute $field.Key -Value $field.Value }

This should set the custom fields that you will need.

How to backup your iPhoto pictures and videos to a NAS w/ rsync

This is how I backup my iPhoto stuff. I know that Apple has tools to do this, but I don’t use TimeMachine and keep most of my backups on my NAS.

I also keep my iPhoto Library on an external drive (to save space on my local SSD drive).

This is the simple script that I run in the Terminal:

#!/bin/bash
    if [ -d /Volumes/Monster/Private/iphoto_pictures ]; then
    if [ -f lock ]; then
exit 1
    fi
      touch lock
rsync -av /Volumes/Fujin/iPhoto\ Library.photolibrary/ /Volumes/Monster/Private/iphoto_pictures/iPhoto\ Library
   rm -rf lock
     fi;

What I’m doing here is first off, checking to see if the NAS is mounted. In my case, my mount name is “Monster” and the directory were I put my pictures is /Private/iphoto_pictures, so I check to see if the directory exists. If it does, I proceed to check if a lock exists. The reason I create a lock is so that I don’t have more than 1 backup job running at once. I keep this script running in my crontab, so that if the NAS is mounted and there is no lock, it will call rsync to copy all of the files in my iPhoto library into the one on the NAS.

I’ve had no issues with restoring so far – to restore, just need to rsync the other way.

Hope this helps.

Wait … before you move to Tomato from DD-WRT!

If you’re reading this, it’s probably too late. You’re probably already running into this issue:

401

and it’s probably driving you nuts!

If you haven’t done the move yet, good. Telnet into the router and run:

nvram get http_username

and

nvram get http_passwd

The way that Tomato and DD-WRT store passwords usernames and passwords is different – DD-WRT stores them encrypted whereas Tomato doesn’t, so with this, you can use it to log into Tomato after you’ve done the move. I call it a move and would hate to call it an upgrade, because some hardcore DD-WRT users might be offended.

Now, if you haven’t done this already and are seeing the error, this will be interesting. With the ASUS router, I think I was able to just do a 30-30-30 reset and it took care of it. Unfortunately with Shibby’s implementation of Tomato, they don’t implement the reset button, so you can press the reset button until you’re blue in the face and it won’t do a thing. On other routers, you may need to press the SES/AOSS button. On the Netgear Nighthawk, it’s the WIFI on/off button. You can hold it down and it will start a password-less telnet daemon at port 233 if held for 20+ seconds. So, when you’re booted into Tomato (the web login will still say DD-WRT) and you can’t log in, hold the button down for 20+ seconds and then go to the command prompt and run:

telnet <router IP> 223

There, you should be able to run the 2 ‘nvram get’ commands and use that info to log into the router and do a reset from there.

Hope this helps!

Why I choose TomatoUSB over DD-WRT

I recently bought a Netgear Nighthawk R7000 for my home router. I figured it would be a good time to get a new router, so I was debating between this on and the ASUS (RT-AC68U). I chose the Nighthawk purely based on price. It was 10% off at Target. 🙂 When I shop for a router, I normally try to get open-source. The reason for this is so that I can hack it as I enjoy doing things like that and I like to use features that are not designed the original product. Why companies build routers and put their own firmware on it is beside me. I really wonder why they don’t just use the open-source stuff since it’s so good. If you look at my blog, you’ll see that I have run DD-WRT on my older routers as well.

The reason I decided to go with Tomato instead of DD-WRT is because of a couple of features that I like in Tomato. The first feature is the QOS transfer rates.

Screen Shot 2014-06-11 at 10.59.05 PM

I haven’t found where I can easily do this in DD-WRT. The reason I like this feature is because I can instantly know who is using up my bandwidth.

Another feature I like that unfortunately does not work on this router yet is A feature where I could see all of the URLs that I’ve visited and searches that I’ve done. I hope that Shibby fixes this in the 121 build.

Screen Shot 2014-06-11 at 11.01.41 PM

These are the two major reasons why I decided to use Tomato over DD-WRT. I’ve also run into issues with using the wireless bridge feature in DD-WRT where Tomato worked very easily.

I would love for some DD-WRT hardcore fans to debate with me. I’ve used DD-WRT firmware for a long time and just switched to Tomato very recently. The main reason I switched to Tomato was back in the days when I had the ASUS RT-N16 router. DD-WRT had Wi-Fi that kept dropping off almost daily and I had to find something better and Tomato was the answer at the time.

Please post your comments! Thanks!

P.S. Here‘s a good link on how to set up DD-WRT with a VPN.

 

 

NFS is better than CIFS (at least for streaming video) or How and why to use NFS instead of CIFS on Mac OS X

For the longest time, I thought that my wifi connection was just too slow. Trying to play a movie with VLC player was just painful! I was trying to play movies and it would buffer for a long time and while it was playing, would stop for a little while, pixelate, and play again. I just finished gave up on it for a long time. I bought a new router, a Netgear Nighthawk 802.11ac router that was supposed to be much faster. Unfortunately I didn’t look at my MacBook Pro specs and see that my wireless on the laptop didn’t support 802.11ac! No problem though – still keeping the router. The range on the router is much better than my old Belkin Play N600.

Just for the heck of it yesterday I decided that maybe NFS would be better than CIFS. I worked at Sun Microsystems for 4 1/2 years. I should’ve known this!

I think I tried using NFS on Mac a while back and it didn’t work and I just gave up. The error I got was this one:

Screen Shot 2014-06-09 at 12.35.19 PM

 

I’m glad I revisited this. Because of this error, I just figured that Finder didn’t mount NFS. Since Mac OS X does include showmount however, I thought maybe it does it via command line.

Doing a quick google search, I found that to mount NFS, because Linux wants the server to use ports <1024 and Mac OS X wants >1024, you need to use the ” -o resvport” option when doing the mount via command line.

sudo mount -t nfs -o resvport 192.168.0.11:/home/Monster /s

You don’t need to do it that way. Finder works just just fine. All you need to do is on the server side, add insecure as an option into /etc/exports like this:

/home/Monster *(rw,sync,no_subtree_check,insecure)

Then in Finder, you can use the familiar  ⌘K and give

nfs://192.168.0.11/home/Monster

Then, your network share should be mounted and you should have access to it. That said, you now are subject to POSIX file permissions.

Hope this helps!

Does the nightlight bother you on the Prince Lionheart diaper wipe warmer?

First off, we love our Prince Lionheart diaper wipe warmer. A friend of ours convinced us to buy one when he said, “How would you like it if someone put a wet towel to your butt in the middle of the night when you’re half asleep?”. So, we got one. That said though, our little one sometimes does get unhappy when it’s not available – i.e. when changing her outside or at a restaurant or a friend’s house.

A couple of issues I have with it though is 1) there’s no adjustable temperature. The wipes feel like they get cold really fast (once you take it out), but it’s still much better than wipes that aren’t warmed at all. 2) The nightlight keeps me awake at night.

I don’t know how I could hack it to adjust the temperature, but if you want to remove the nightlight, I can show you how. Just don’t do it the way I did!

So here are the steps:

The warmer opens up with just 4 Phillips screws. 2 of which are under a couple of the pads that keep the warmer propped up. Just remove the pads and remove the screws as shown in the picture.

When it opens up, you’ll see that the warmer is built very simply. It’s just a styrofoam insulated box with a hot plate and the little LED nightlight!

To remove the nightlight, all you need to do is snip one of the wires going to the nightlight. Just don’t do it where I did! The idiot in me for some reason thought the shrink tubing was just used to connect a couple of wires. Well, it was. The problem was, that there was a diode or resistor or something (I never took any electronics classes, so I don’t know!) in there that I cut in half! Now, unless I ever replace that component, I will probably never have the light working again.

One drawback to turning the light off is that you don’t know when the warmer is turned on or off. Since there’s no off switch, I guess you can assume that it’s on when it’s plugged in. Otherwise, it works as designed.

Here are some other pictures of what the warmer looks like on the inside. Any questions?