1 2 Previous Next 19 Replies Latest reply on Aug 3, 2008 12:55 AM by necron73

    Preallocated Disks were not preallocated

    necron73 Novice

      Hello Community,

       

      maybe someone can give me a hint. When I try to create a virtual machine with preallocated disk space in 2GB chunks, the space is not really preallocated like with VMware Server 1.0.5. When I create a virtual disk on 1.0.5 the creation process took a while. Using VMware Beta2 the disks where created very quickly on the first glance. After the creation process I started the VMware and installed a small base system and cloned this system to 4 different vmwares and started those machines.

       

       

       

      In one of those machines I compiled some software using rpm and gcc. After some iterations in the compiling/building process I relized that some of the source files got corrupted suddenly and also I recognized poor performance of this vm. After replacing those files and and build the software successfully I installed this software in one of the other machine. First the software ran well but after some reboots of this virtual machine the were also corrupted files. And I look deeper into the problem.

       

       

       

      First of all I thought the virtual disks were preallocated. An 'ls -l' on the host system shows that the files have the desired size.

       

       

       

      ramses:/data-vmware # ll atum/

      total 3419200

      -rw------- 1 root root  536870912 Jun 30 04:01 564daf27-3a54-143b-984d-cca339550                                                                           c9f.vmem

      drwxrwxrwx 2 root root         23 Jun 30 04:01 564daf27-3a54-143b-984d-cca339550                                                                           c9f.vmem.lck

      -rw------- 1 root root 2147221504 Jun 30 07:57 atum-f001.vmdk

      -rw------- 1 root root 2147221504 Jun 30 15:39 atum-f002.vmdk

      -rw------- 1 root root 2147221504 Jun 30 15:45 atum-f003.vmdk

      -rw------- 1 root root 2147221504 Jun 30 15:45 atum-f004.vmdk

      -rw------- 1 root root 2147221504 Jun 30 01:48 atum-f005.vmdk

      -rw------- 1 root root 2147221504 Jun 29 19:25 atum-f006.vmdk

      -rw------- 1 root root 2147221504 Jun 29 22:24 atum-f007.vmdk

      -rw------- 1 root root 2147221504 Jun 29 19:25 atum-f008.vmdk

      -rw------- 1 root root 2147221504 Jun 29 19:25 atum-f009.vmdk

      -rw------- 1 root root 2147221504 Jun 28 22:02 atum-f010.vmdk

      -rw------- 1 root root    2621440 Jun 28 21:10 atum-f011.vmdk

      -rw------- 1 root root       8684 Jun 30 04:01 atum.nvram

      -rw------- 1 root root        759 Jun 30 06:40 atum.vmdk

      drwxrwxrwx 2 root root         23 Jun 30 04:01 atum.vmdk.lck

      -rw------- 1 root root          0 Jun 28 21:10 atum.vmsd

      -rwxr-xr-x 1 root root       1703 Jun 30 04:01 atum.vmx

      -rw------- 1 root root        259 Jun 29 09:56 atum.vmxf

      -rw-rr 1 root root      43739 Jun 29 11:03 vmware-0.log

      -rw-rr 1 root root      45167 Jun 29 09:56 vmware-1.log

      -rw-rr 1 root root     265114 Jun 30 15:45 vmware.log

       

      But the performance of the system was such bad that I couldn't believe that this is true and I tried "du -csh" on that directory, which pointed out that only 1.5GB (now 3GB) were used.

       

       

       

      ramses:/data-vmware # date && du -csk atum/

      Mon Jun 30 15:48:15 CEST 2008

      3420148 atum/

      3420148 total

       

      ramses:/data-vmware # date && du -csk atum/

      Mon Jun 30 15:50:25 CEST 2008

      3424488 atum/

      3424488 total

       

      The VMs were created yesterday an I thought: ok It'll take a while but since yesterday the disk only grew just a little bit. To me it seems that the disks are only growing in size if I work in them but as I mentioned earlier by doing this I got corrupted files. Now I am a little bit frustrated because I don't know what I am doing wrong. Maybe someone got a hint for me.

       

       

       

      Host:

       

       

       

      CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ (2 Core)

      RAM: 8GB

      OS: openSUSE 11.0 (X86-64)

      Kernel: Linux version 2.6.25.5-1.1-default

       

       

       

      Guest:

       

       

       

       

       

      • 4x1 Proc

      • 512 MB

      • 20GB preallocated disk

      • OS: openSUSE 11.0 (X86-64)

      • Kernel: Linux version 2.6.25.5-1.1-default

       

       

       

       

       

      I hope someone can help me with this issue ...

       

       

       

       

       

       

       

      Best regards

        • 1. Re: Preallocated Disks were not preallocated
          Peter_vm Guru

          Please post(attach) two files:

          atum.vmdk

          vmware.log

          • 2. Re: Preallocated Disks were not preallocated
            necron73 Novice

             

            Hello peter_vm,

             

             

            ok, I think I know what you are pointing on. I attached the two files. The vmdk is missing a parameter I think. Using vmware 1.0.5 there was a label preallocated I think and this is missing.  Hmm.... ok on my windows system running vmware 1.0.5 this label is also not present but I think  I saw it somewhere in the configuration files ?!

             

             

            • 3. Re: Preallocated Disks were not preallocated
              necron73 Novice

               

              Hello peter_vm,

               

               

              here is also a screen shot of the gui screen:

               

               

                 

               

               

              • 4. Re: Preallocated Disks were not preallocated
                Peter_vm Guru

                Looks normal... What host filesystem do you have virtual disks on (fstab on host)?

                • 5. Re: Preallocated Disks were not preallocated
                  necron73 Novice

                   

                  one moment I attached them before. so, know a second time

                   

                   

                   

                   

                   

                   

                   

                   

                  • 6. Re: Preallocated Disks were not preallocated
                    necron73 Novice

                     

                    and here is the other one. When I attached them last time the browser shows an error but displayed the files to be attached.

                     

                     

                    sorry

                     

                     

                     

                     

                     

                     

                     

                     

                    • 7. Re: Preallocated Disks were not preallocated
                      necron73 Novice

                      Hello Peter,

                       

                      didn't saw this question:

                       

                       

                       

                      On all systems I use XFS with LVM up to now there was no problem:

                       

                       

                       

                      Host:

                       

                       

                       

                      /dev/vg2/data-vmware          /data-vmware           xfs        defaults              1 2

                       

                       

                      This filesystem is on an ATABOY2 Raid System Raid Level5 with 12 disks and two spare disks.

                       

                       

                       

                      Guest:

                       

                       

                       

                      Also in guest system I use LVM and XFS but at the moment I couldn't contact the VM neither with console window nor with ssh. A few moments before I opened this post I issued an installation via yast and now it sees to be frozen again for a while. I will post the fstab if i can connect to it again.

                      • 8. Re: Preallocated Disks were not preallocated
                        Peter_vm Guru

                        Maybe this is due to sparse address space in XFS....

                        http://en.wikipedia.org/wiki/XFS

                        and check this out:

                        http://everything2.com/index.pl?node_id=1479435

                        • 9. Re: Preallocated Disks were not preallocated
                          necron73 Novice

                          That sounds bad. XFS was very usefull. Simple online resizing of filesystem etc. You mean I should try this with ext3? By the way all my other VMs on 1.0.5 are also running under LVM and XFS.

                           

                           

                          And which filesystem should be changed host or guest or both?

                          • 10. Re: Preallocated Disks were not preallocated
                            Peter_vm Guru

                            To be safe: both

                            mount with noatime,nodiratime for better speed.

                            • 11. Re: Preallocated Disks were not preallocated
                              necron73 Novice

                              ok,

                               

                              i will try this tomorrow - I think - because this will take a while and I got only two hours left before I have to go to bed. But there is never the less the question why does this work under 1.0.5 and not under 2.0 and why the disk is not created in whole after building the vm, just like under 1.0.5.

                               

                              how i mentioned before i ran 1.0.5 on windows and for a long time under suse 10.3 just with the same setup and there was no problem at all. I also ran the VMs under 2 Beta from an NFS mount but the performance was very bad (btw. this was a hardware problem "IB-NAS4220"). So that I copied a whole vm to it before using it and I didn't create the disk from scratch because it was not possible. This device is using ext3.

                               

                               

                               

                               

                              Ahh, before I forget it to mention 1.0.5 seems to be no opinnion under suse11, because I couldn't get it running. Compile problems with the host modules. And back to 10.3 is also a hard thing.

                               

                               

                               

                              Ok, after sleeping a while I looked back on the size of the disk and now this usage is shown:

                               

                               

                               

                              ramses:/data-vmware # du -csk atum/

                              3436200 atum/

                              3436200 total

                               

                               

                              I think 2.0b is working in another way with preallocation as the other versions. Don't you think so? If it would have worked like the other versions the space for the vm's had to be allocated before I could use the vm?! So I think it should be independend of the filesystem running in the vm.

                              • 12. Re: Preallocated Disks were not preallocated
                                necron73 Novice

                                 

                                Hello peter_vm,

                                 

                                 

                                I build a seperate filesystem store on an ext3-filesystem:

                                 

                                 

                                /dev/mapper/vg2-vmware--ext3 on /data-vmware-ext3 type ext3 (rw,noatime,nodiratime)

                                 

                                and created a new vm on it over the http-gui. The preallocation- and the 2GB chunk were checked.

                                 

                                 

                                Same situation 'ls -l' shows:

                                 

                                 

                                ramses:/data-vmware-ext3 # ls -l vmext3/

                                total 140

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f001.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f002.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f003.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f004.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f005.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f006.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f007.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f008.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f009.vmdk

                                -rw------- 1 root root 2147221504 Jul  1 03:57 vmext3-f010.vmdk

                                -rw------- 1 root root    2621440 Jul  1 03:57 vmext3-f011.vmdk

                                -rw------- 1 root root        755 Jul  1 03:57 vmext3.vmdk

                                -rw------- 1 root root          0 Jul  1 03:57 vmext3.vmsd

                                -rwxr-xr-x 1 root root       1264 Jul  1 03:57 vmext3.vmx

                                -rw------- 1 root root        261 Jul  1 03:57 vmext3.vmxf

                                 

                                And 'du -csk' shows

                                 

                                 

                                ramses:/data-vmware-ext3 # date && du -csk vmext3/

                                Tue Jul  1 04:01:18 CEST 2008

                                144     vmext3/

                                144     total

                                 

                                ramses:/data-vmware-ext3 # date && du -csk vmext3/

                                Tue Jul  1 04:14:11 CEST 2008

                                144     vmext3/

                                144     total

                                 

                                Ok, in the afternoon I will try to install the basesystem and will see what happens then.

                                 

                                 

                                 

                                 

                                 

                                • 13. Re: Preallocated Disks were not preallocated
                                  Peter_vm Guru

                                  I think ext3 also supports sparse files...but not ext2.

                                  You may find it interesting:

                                  http://linux.derkeiler.com/Newsgroups/comp.os.linux.development.system/2005-11/0261.html

                                  Apparently with ext3, data block is allocated only when is written to. Server 2.0 must be creating 2GB file blocks differently than 1.0.x.

                                  • 14. Re: Preallocated Disks were not preallocated
                                    necron73 Novice

                                     

                                    Hello peter_vm,

                                     

                                     

                                    on the first glance it seems ext3 solved the performance problem. After doing a base install of a suse11 guest the disk growed quikly in space.

                                     

                                     

                                    Tue Jul  1 15:43:06 CEST 2008

                                    977M    ../data-vmware-ext3/vmext3/

                                    977M    total

                                    ramses:/data-vmware # date && du -csh ../data-vmware-ext3/vmext3/

                                    Tue Jul  1 15:43:19 CEST 2008

                                    993M    ../data-vmware-ext3/vmext3/

                                    993M    total

                                    ramses:/data-vmware # date && du -csh ../data-vmware-ext3/vmext3/

                                    Tue Jul  1 15:43:42 CEST 2008

                                    1019M   ../data-vmware-ext3/vmext3/

                                    1019M   total

                                    ramses:/data-vmware # date && du -csh ../data-vmware-ext3/vmext3/

                                    Tue Jul  1 15:44:23 CEST 2008

                                    1.1G    ../data-vmware-ext3/vmext3/

                                    1.1G    total

                                    ramses:/data-vmware # date && du -csh ../data-vmware-ext3/vmext3/

                                    Tue Jul  1 15:56:07 CEST 2008

                                    1.8G    ../data-vmware-ext3/vmext3/

                                    1.8G    total

                                     

                                    in the meantime I found a solution to grow an ext3 partition online, so there is no need to use xfs anymore. so I growed the ext3 partition created yesterday. and now I will copy the old vms to the new volume. I will see, if it is really a solution for my problem.

                                     

                                     

                                    Btw. stopping the last VM on the XFS filesystem took about two hours and a half.

                                     

                                     

                                    I will give you a note if it works better afterward.

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                    1 2 Previous Next