Powercli oneliner for changing MTU to 9000

I wanted to set MTU on number of standard vSwitches across multiple ESXi hosts and Powercli made that job easier. Here’s a oneliner to get the job done across multiple vSwitches.

Get-VMHost My-ESXi-Host| Get-VirtualPortGroup "PG_SearchString*" | Get-VirtualSwitch | Set-VirtualSwitch -Mtu 9000 -Confirm:$false




Mounting a USB Drive in FreeBSD

Search for NTFS package

pkg search ntfs

Install NTFS packages

pkg install fusefs-ntfs-2014.2.15_2

Read through basic instructions

less /usr/local/share/doc/ntfs-3g/README.FreeBSD

Link the NTFS mount binary

ln -s `which ntfs-3g` /usr/sbin/mount_ntfs-3g

Enable FuseFS in /etc/rc.conf

echo '' >> /etc/rc.conf
echo '# Enable fusefs support required for ntfs-3g' >> /etc/rc.conf
echo 'fusefs_enable="YES"' >> /etc/rc.conf
echo '' >> /etc/rc.conf

Connect the USB drive and search for your USB drive in the discovered disks

dmesg | grep -i da

Inspect the disk partitions on the USB drive

fdisk /dev/da10

Create a mount point

mkdir /media/usb-hdd

Mount the USB partition

mount_ntfs-3g -o ro /dev/da8s1 /media/usb-hdd

Verify the disk contents

ls -alR /media/usb-hdd

Comparison between SATA and SAS HDD connector

Like different SATA connectors (SATA1, SATA2 & SATA3) the SAS connectors are compatible. So a SAS1 HDD can be connect to a SAS2 port and SAS2 HDD can be connect to a SAS1 port. This is a connector compatibility, without the speed improvements.

Additional thing to remember is SAS connectors, because of the way the connectors are constructed, SAS connectors are compatible with SATA HDDs. It is part of the SAS specification. a SAS connector can take a SATA drive, but a SATA cable cannot take a SAS drive. A SAS connector can connect to SATA HDD, but a SATA connector cannot connector to a SAS HDD.

Refer to the picture shown below for a pictorial comparison between the 2 connectors types.


Additional Reference:
SAS/SATA Compatibility Simplifies Storage by Design

A Salute to “The Master Blaster”

Who is not a fan of “The Master Blaster” on this side of the world. And what an illustrious career he has had. Yes I am writing about one and only SRT: “Sachin Ramesh Tendulkar”.

The ongoing test against West Indies his 200th and the last, where he will wear the India cap. He has already said goodbye to the ODI. And I am sad that I will not be able to watch him bat again for India. I feel all the more sad that, in the last 24 years I never went to watch him in action in “live” on a Stadium.

Great talent with greater hard work & dedication. He has been an inspiration. A great player, a soft spoken and a very humble human being.

What else can I say, SACHINCREDIBLE.

Some quotes about Sachin by the foreign media.

FreeBSD slices and partitions

Although I have worked with various Unices over the last few years. However there was a time when I was confused the the partitioning scheme in Unix. Based on some of my earlier notes, for my benefit ;-), FreeBSD partitions explained:

Straight from The Linux+FreeBSD mini-howto:

FreeBSD needs one of the four entries in the partition table on your PC’s hard drive. This primary partition is called a ‘slice’ in FreeBSD terminology. It then uses the disklabel program to make up to eight partitions in this primary partition. These logical partitions are called ‘partitions’ in FreeBSD terminology.

From the FreeBSD handbook:

A disk can have up to eight partitions, labeled a-h.

Partition ‘a‘ normally contains the root file system (/). Typically there would be only one disk with the ‘a’ partition.

Partition ‘b‘ is used for swap. Multiple disks can contain swap partitions.

Partition ‘c‘ is used to address the entire disk in dedicated mode, or the entire FreeBSD slice in slice mode. Typically useful for debugging and troubleshooting (say a bad block scanner). You would never want to create a file system on this partition.

Partition ‘d‘ used to have a special meaning associated with it, although that is now gone and d may work as any normal partition.

Thus partitions ‘d’, ‘e’, ‘f’, ‘i’ & ‘h’ can be used for any general purpose.

I guess the disk layout diagram from the FreeBSD handbook would make things clear!

FreeBSD disk layout

PowerShell Goodness

I have been a Perl user for years now. And hence I was a bit slow and probably less than willing to learn PowerShell. However over the last couple of years I have seen the popularity of rising and VMware also ships a very cool PSSnapin called as PowerCLI, hence decided take up learning PowerShell.

However I have to admit the learning experience was very pleasant and I was bowled over by all the goodness PowerShell. The PSSnapin being shipped by VMware is also equally great. Crossing over from Perl I found learning PowerShell to be very easy. In the last 1 month I have ended up re-writing some of my Perl scripts in PowerCLI.

VMware offers a free second chance for VCP4 exam (code VCP410)

VMware has come out with a very good promotional offer. For this you need to take both (first take & retake) of the VCP4 exam (code VCP410) before 31st July 2011. If you fail to clear the first take you will get a second chance to appear for the exam for free. Here are the exact details:

Use the code “VCPTAKE1” during initial exam registration for the first take. This is required otherwise if needed you won’t be able to schedule a free second take exam.

Use the code “VCPTAKE2” when you schedule for the second take of the exam. Yes its that simple.

Important: both exams have to be taken before July 31, 2011.

Check out for additional details about the offer on VMware Education Portal.