1 2 3 Previous Next 31 Replies Latest reply on Jul 9, 2009 10:23 AM by chethank Go to original post
      • 15. Re: I/O performance of vSphere
        dconvery Virtuoso
        vExpert

        Is there an easy way to align the C: drive on a windows system? I have

        gone through the process using a helper VM to partition and format the

        VMDK and then install the OS on the newly-formatted disk, but there

        must be a better way. Is it really necessary?

         

         

         

         

        Dave Convery

        VMware vExpert 2009

        http://www.dailyhypervisor.com

        http://communities.vmware.com/servlet/JiveServlet/download/38-20623/vExpert_logo_100x57.jpg

        Careful. We don't want to learn from this.

        Bill Watterson, "Calvin and Hobbes"

        • 16. Re: I/O performance of vSphere
          Novice

          CLARIFICATION: As some of the readers have pointed out, creation of a VMFS datastore from VI client automatically aligns VMFS on a LUN. And yes, this is what I did too. Sorry for the confusion in my earlier response.

           

          But creation of a partition on a virtual disk (.vmdk) inside a guest OS doesn't align the partition. This has to be done manually (diskpart in windows; fdisk in linux). This article has some helpful information on alignment: http://www.vmware.com/pdf/esx3_partition_align.pdf

           

           

           

           

          >> As far as guest OS is concerned, no file system was created on these virtualdisks. For the guest OS (and iometer) they appeared as raw disks.

           

           

          In our case, since we didn't create any file system on the virtual disks in the guest, we didn't need to align the .vmdks.

           

           

           

           

          Hope it is clearer now.

          • 17. Re: I/O performance of vSphere
            kcollo Enthusiast

             

            I actually have nothing to add, but wanted to at least say great thread!  Should make all people looking to post to the communities read this first.  Will solve a lot of issues and have good information concearning the typical IO testing for vmware (using raw storage with iometer).  Also, still a lot of people do not know about alignment issues with vmfs.  Again, this would be a great intro post for VMware and storage

             

            Kevin Goodman

            kevin@colovirt.com

            http://blog.colovirt.com

             

             

            • 18. Re: I/O performance of vSphere
              jasonboche Champion
              vExpert
              dconvery wrote:

              Is there an easy way to align the C: drive on a windows system? I have

              gone through the process using a helper VM to partition and format the

              VMDK and then install the OS on the newly-formatted disk, but there

              must be a better way. Is it really necessary?

               

              Yes.  NetApp mbrscan will scan your .vmdk file(s) to see if they need alignment and mbralign will perform the alignment on both Windows and Linux VMs.  The utilities run from the command line on an ESX host.  I use the tools on both NFS and block storage and it works well.  There's a caveat with Linux that I'll tell you about if you have any Linux guest VMs.

               

              Jas

               






              [i]Jason Boche, vExpert[/i]

              [boche.net - VMware Virtualization Evangelist|http://www.boche.net/blog/][/i]

              [VMware Communities User Moderator|http://www.vmware.com/communities/content/community_terms/][/i]

              [Minneapolis Area VMware User Group Leader|http://communities.vmware.com/community/vmug/us-central/minneapolis][/i]

              • 19. Re: I/O performance of vSphere
                depping Guru
                VMware EmployeesUser Moderators

                there's no point in aligning your C:\ drive unless you have a lot of data traffic on the C:\ which is unlikely. The mbr-tools by NetApp could do this indeed.

                 

                 

                 

                 

                Duncan

                VMware Communities User Moderator | VCP | VCDX

                -


                Blogging: http://www.yellow-bricks.com

                Twitter: http://www.twitter.com/depping

                 

                If you find this information useful, please award points for "correct" or "helpful".

                • 20. Re: I/O performance of vSphere
                  dconvery Virtuoso
                  vExpert

                   

                  Jas -

                   

                   

                  Give it up! What's the caveat for Linux? I have some customers with sizeable Linux environments too. Also, is mbrscan a freeware tool? I don't work for a NetApp partner right now.

                   

                   

                   

                   

                   

                  Duncan -

                   

                   

                  That's what I thought. If your data is on an aligned drive, ther is probably no reason to worry about the system drive, but I wanted some other opinions as well.

                   

                   

                   

                   

                   

                  Dave Convery

                  VMware vExpert 2009

                  http://www.dailyhypervisor.com

                  http://communities.vmware.com/servlet/JiveServlet/download/38-20623/vExpert_logo_100x57.jpg

                  Careful. We don't want to learn from this.

                  Bill Watterson, "Calvin and Hobbes"

                   

                   

                  • 21. Re: I/O performance of vSphere
                    jasonboche Champion
                    vExpert
                    dconvery wrote:

                     

                    Jas -

                     

                     

                    Give it up! What's the caveat for Linux? I have some customers with sizeable Linux environments too. Also, is mbrscan a freeware tool? I don't work for a NetApp partner right now.

                     

                    Sometimes (most of the time) after running NetApp's MBRALIGN on Linux VMs, the VM is no longer bootable.  It will immediately hang at a GRUB prompt.  There is a repair procedure that involves booting from a Knoppix CD and running a few commands to repair the boot loader of the affected Linux VM.  I've been through it dozens of time.  Once the boot loader is repaired, the Linux VM will boot and its partitions will be aligned.  I have seen rare cases where the fix does not actually work and you have no choice but to revert to the backed up .vmdk files that mbralign automatically creates for you.  At that point, you can try the align process again or give up.  The align process takes a while and it varies upon how large each .vmdk file is of course.  On average what I see is an alignment of a 50GB .vmdk file in half an hour or less.

                     

                    -  Once the knoppix CDROM has booted, From the 'boot>' prompt type 'knoppix 2' and hit RETURN

                     

                    -  From the Command Line, type 'grub' to get to the grub prompt

                     

                    - Run "find /boot/grub/stage1" and note all of the drives it finds (e.g., "(hd0,0)")

                     

                    - From the GRUB prompt, for each Drive, Run the following:

                     

                    grub> find /boot/grub/stage1

                    (hd0,0)

                    (hd1,0)

                    (hd2,0)

                     

                    grub> root (hd0,0)

                    Filesystem type is ext2fs, partition type 0x83

                     

                    grub> setup (hd0)

                    Checking if "/boot/grub/stage1" exists... yes

                    Checking if "/boot/grub/stage2" exists... yes

                    Checking if "/boot/grub/e2fs_stage1_5" exists... yes

                    Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  15 sectors are embedded.

                    succeeded

                    Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded

                    Done.

                     

                    grub>

                     

                    - You can batch process multiple boot drives, just attach all of the drives you wish to fix to a dedicated knoppix appliance that boots from the Knoppix CD.

                     

                     

                    You should be able to download the NetApp tools.  Just go create yourself a now.netapp.com account and download the mbrscan and mbralign tools

                    http://communities.netapp.com/docs/DOC-2563;jsessionid=3FAC4EB6245FD8344D98EA9247C2FE34

                     

                    Don't forget that MBRALIGN creates backups of your .vmdk files which will chew up double the amount of storage you use so go back and delete those backup files once you've determined the alignment is a success.

                     

                    Duncan -

                     

                     

                    That's what I thought. If your data is on an aligned drive, ther is probably no reason to worry about the system drive, but I wanted some other opinions as well.

                     

                     

                    I align all drives as a best practice.  Not as a performance benefit for the individual VM, but as a performance benefit for the storage array that all VMs point back to.  Disk alignment converts all unaligned disk I/Os from a maximum possible value of 2 IOs to a value of 1 IO.  If you multiply that factor by hundreds or thousands you start to see a little performance increase for the VMs.  Now multiple that savings by X number of VMs on each LUN, disk group, etc. and you might see how aligning C: drives collectively improves the maximum amount of performance you can squeeze out of that LUN, disk group, storage array, etc.  This is an example of where the value of the savings is greater than the sum of all of its parts.

                     

                     

                    Dave Convery

                    VMware vExpert 2009

                    http://www.dailyhypervisor.com

                    http://communities.vmware.com/servlet/JiveServlet/download/38-20623/vExpert_logo_100x57.jpg

                    Careful. We don't want to learn from this.

                    Bill Watterson, "Calvin and Hobbes"

                     

                     






                    [i]Jason Boche, vExpert[/i]

                    [boche.net - VMware Virtualization Evangelist|http://www.boche.net/blog/][/i]

                    [VMware Communities User Moderator|http://www.vmware.com/communities/content/community_terms/][/i]

                    [Minneapolis Area VMware User Group Leader|http://communities.vmware.com/community/vmug/us-central/minneapolis][/i]

                    • 22. Re: I/O performance of vSphere
                      dconvery Virtuoso
                      vExpert

                      VERY NICE! Thanks Jas. I always forget about Knoppix (I have the latest DVD image) and always revert to DSL or a RHEL rescue CD.

                       

                       

                       

                       

                      Dave Convery

                      VMware vExpert 2009

                      http://www.dailyhypervisor.com

                      http://communities.vmware.com/servlet/JiveServlet/download/38-20623/vExpert_logo_100x57.jpg

                      Careful. We don't want to learn from this.

                      Bill Watterson, "Calvin and Hobbes"

                      • 23. Re: I/O performance of vSphere
                        hstagner Hot Shot
                        VMware Employees

                        I have aligned the system partition (and created a template from an aligned VM) in the past as well. I have even written an article on it. Then it occured to me after reading the VMware whitepaper again that I must be missing something. Why does this question (how to align C: drives) keep coming up when the VMware whitepaper on partition alignment has this note:

                         

                         

                         

                         

                         

                         

                             Note: Aligning the boot disk in the virtual machine is neither recommended nor required.
                              Align only the data disks in the virtual machine.
                              The following sections discuss how to align guest operating system partitions in Linux and
                              Windows environments.

                         

                        What am I missing guys? I found another thread (can't find it at the moment) claiming that aligned C: drives may cause problems with VSS on certain arrays. Is this true? Does anyone know what arrays have this issue? Should the best practice going forward be to not align the C: drive at all because of the note in the VMware whitepaper? I know I have more questions than answers. I am just trying to get to the bottom of this.

                         

                         

                         

                         

                         

                         

                         

                         

                         

                        Don't forget to use the buttons on the side to award points if you found this useful (you'll get points too).

                         

                        Regards,

                         

                        Harley Stagner

                        • 24. Re: I/O performance of vSphere
                          LucasAlbers Expert

                          Windows 2008 automatically aligns the drive starting at a 1024 k offset.

                          Aligning windows 2003 was tedious.  Set alignment with diskpart, format.

                          Install and use existing file system.

                          • 25. Re: I/O performance of vSphere
                            cxo Enthusiast

                             

                            Reading the instructions for MBRALIGN, it notes with Linux and Solaris running GRUB there may be issues on bootup.  The instructions are quite clear on how to remedy this for Linux (as well as documented here), but they leave out the analogous step-by-step instructions for Solaris.

                             

                             

                             

                             

                             

                            So, the question I have is, has anyone used MBRALIGN on a Solaris 10 VM and what were the caviates and solutions to such issues?

                             

                             

                             

                             

                             

                             

                             

                             

                            Charlie

                             

                             

                            • 26. Re: I/O performance of vSphere
                              za_mkh Enthusiast

                               

                              Great discussion, especially as we are busy implementing our vmware infrastructure onto our new SAN.

                               

                               

                              I do have a question/solution...  Since it is a tedious process to align the system drive on a Win 2K3 / etc box, would the following scenario be valid:

                               

                               

                              1) In an existing VM - add a new VMDK (say 15GB) and align this disk as per normal - I don't format it.

                               

                               

                              2) I then use this VMDK as the system drive for a new VM and configure/format as necessary.  I then convert this VM to a Template e.g. Windows 2003 Std Template

                               

                               

                              3) Would all subsequent VM's cloned from this new template also have their drives aligned, or what I need to go down the knoppix route to solve this

                               

                               

                              If the above solution does work, then, it could be an easy fix for new VM's created but we would still have to go through the pain for the existing VM's,

                               

                               

                               

                               

                               

                              • 27. Re: I/O performance of vSphere
                                hstagner Hot Shot
                                VMware Employees

                                 

                                Hello za_mkh,

                                 

                                 

                                I did write an article on this in January.

                                 

                                 

                                http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1344730_mem1,00.html

                                 

                                 

                                Basically, I used a WinPE disk to align a system partition, then I created a template. Every VM cloned from that template will be aligned.

                                 

                                 

                                However: Now I question whether this should be done. As I said above, this note is in the Disk Alignment whitepaper from VMware:

                                 

                                Note: Aligning the boot disk in the virtual machine is neither recommended nor required.
                                *           Align only the data disks in the virtual machine.*

                                 

                                I hope this helps.

                                 

                                 

                                 

                                 

                                 

                                Don't forget to use the buttons on the side to award points if you found this useful (you'll get points too).

                                 

                                Regards,

                                 

                                Harley Stagner

                                 

                                 

                                • 28. Re: I/O performance of vSphere
                                  za_mkh Enthusiast

                                  Thanks Harley,

                                   

                                  That makes sense, and means it our workload will be made us. Since we

                                  are re architecting our Virtual Infrastructure, this comes at a good

                                  time!

                                   

                                  Many thanks once again

                                  za_mkh

                                  • 29. Re: I/O performance of vSphere
                                    dconvery Virtuoso
                                    vExpert

                                    So...Since VI3 anly aligns VMFS when created via the VIC, how about ESX4? This requires a VMFS on install for the COS VM. Is it aligned?

                                     

                                     

                                     

                                     

                                    Dave Convery

                                    VMware vExpert 2009

                                    http://www.dailyhypervisor.com

                                    http://twitter.com/dconvery

                                    http://communities.vmware.com/servlet/JiveServlet/download/38-20623/vExpert_logo_100x57.jpg

                                    Careful. We don't want to learn from this.

                                    Bill Watterson, "Calvin and Hobbes"