| Subcribe via RSS

Hard Drive Capacity – Advertised vs Actual

April 17th, 2010 | No Comments | Posted in Storage

Well recently I was asked the question “Why, when i buy an 80GB drive, does it only see around 74GB in the OS? Thats like 6GB lost!”.

Simply put, It’s base10 vs base2; or as a colleague of mine would say, “we arent comparing apples with apples”. There are 2 different methods used to calculate how much information can be stored on the hard disk drive. They are base-2 system and the base-10 system.

In the base-2 system used by the OS, 1GB = 1,073,741,824 bytes. While the base-10 system used by the manufacturing company, 1GB = 1,000,000,000 bytes. Here we begin to see the “1GB vs 1GB” discrepancy already. Now amplify it, and you begin to understand where your 6GB is :)

Here is a good reference table I found on the internet a while back:

Base 2        Base 10

————————–
80 GB        76.3 GB
120 GB      114.4 GB
160 GB      152.6 GB
250 GB      238.4 GB
1000 GB    953.7 GB

Hope this helps clarify things!
Sam

Sharing folders beetween a Linux Host and a Windows VM using VirtualBox and VBoxManage

January 23rd, 2010 | No Comments | Posted in Storage, Virtualization

Had a predicament recently, whereby on my Fedora 12 box i couldnt manage music on my IPhone.

Now i installed VirtualBox, install Windows XP within that, Itunes within that etc etc and mapped the USB Path of the phone through to the Virtual machine. Now, all my music is on my host drives, and not accessible by the virtual machine – unless i want to do it very elementarily and create samba shares (which i dont!).

So, I researched how to share host folders using “VBoxManage” – a tool bundled with VirtualBox. Now, say you have a virtual machine called “x” – and you want to share the folder “/home/Sam/share”, with the share name showing as “HostShare1″ on the Windows side, you need to fire open the CLI (NOTE: Dont run as root if you made the VM as your user, UID’s problems) and run the following:

  • [Sam@SMNET ~]$ VBoxManage sharedfolder add x -name HostShare -hostpath /home/Sam/share

Now, lets deconstruct. “VBoxManage” is the program, and it IS case sensitive so bear it in mind.
“sharedfolder” is a parameter of the program which tells it you are about to create a shared folder.
“add x” tells it the ACTION (add) and what virtual machine name you want to action to (“x”).
“-name HostShare” is what the share will be called from the Windows clients perspective, again this is a parameter.
“-hostpath /home/Sam/share” tells the virtualbox program where to map the name “HostShare” to, i.e. /home/Sam/..

  • Once this command is ran, it should pass successfully:
  • [Sam@SMNET ~]$ VBoxManage sharedfolder add x -name HostShare -hostpath /home/Sam/share
  • VirtualBox Command Line Management Interface Version 3.1.0
  • (C) 2005-2009 Sun Microsystems, Inc.
  • All rights reserved.
  • [Sam@SMNET ~]$

However, if it does not you may need to re-read the notes. For example, if you get the message like below:

  • [Sam@SMNET ~]$ VBoxManage sharedfolder add x -name Media2 -hostpath /media/Other\ Media/
  • VirtualBox Command Line Management Interface Version 3.1.0
  • (C) 2005-2009 Sun Microsystems, Inc.
  • All rights reserved.
  • ERROR: A session for the machine ‘x’ is currently open (or being closed)
  • Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
  • Context: “OpenSession(a->session, uuid)” at line 750 of file VBoxManageMisc.cpp

The above means the virtual machine is not powered off when you ran the command, which it needs to be. Also, if you get the message “command not found” you will need to ensure you have the case sensitive, i.e. Capital VB etc.

Now, we have configured the Linux side successfully, time for the easy bit. Turn on the VM, and go to “Start” and then “Run..”. In there, type “\\vboxsrv\HostShare” – and hit enter. And voila, you shared folder will appear. Now, to deconstruct again. “\\vboxsrv” is a preset parameter which tells the virtual machine the shared folder is stored on the host PC/Server (Your Linux install in this case). The “\HostShare” should look familiar as that is the name we set in our “…add x -name HostShare….” command.

Now, go forth and share!

Sam.

Fibre Channel: An Idiots Introduction

September 10th, 2009 | No Comments | Posted in Storage

First of all, let me apologise in advance for confusing you with this blog. It is quite probably going to be completely wrong – but i’m going to try anyway :)

Recently i joined a storage company and as such i have been cramming Fibre channel as much as i can. Below is what i understand to be the main differences beetween the 3 main different types of Fibre Channel topologies if you will:

FC-AL: Fibre Channel Arbitrary Loop. Much like a token ring topology, uses loops and and WWDN (WorldWide Device Numbers) to transmit data. Very old topology used as it was cheaper and more economical. Problems occur when the ring is broken, or when chatter occurs by a faulty host which causes all hosts in the FCAL to back off and wait.

FC-P2P – Like a PC plugged into another PC, P2P allows one host to communicate with the other host over a dedicated medium. This solution is effective and economical but again it is not very scalable especially in a multi-node environment such as a corporation etc.

FC-SW: Fibre Channel Switched Fabric, this is much like the modern day ethernet, whereby nodes communicate with each other using a common device such as a switch (Infiniband switch for example). The Host-bus adapters (HBA’s) connect to the switch and allow nodes to communicate with the other nodes via the switch, creating “fabrics” (i think). This is obviously a smarter solution as it is scalable and more flexible but is very expensive.

Tags: , ,