VMware Cloud Community
mla_
Contributor
Contributor
Jump to solution

cannot add new vmdk to vm from free datastore space

Hello,

what I am doing wrong?

When try to add new vmdk to VM (SQL) from free datastore space I get an error. See attach....

I tried 19GB, 18GB and even 10GB... the same error. As you can see there is 19.46GB of free space on datastore.

Thanks.

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
1 Solution

Accepted Solutions
opbz
Hot Shot
Hot Shot
Jump to solution

chances are that you have memory swap files or snapshots using that space.

Vmware best practices is to leave 25+% free on your VMFS volumes.

I weoud suggest using a different VMFS volume if possible

View solution in original post

Reply
0 Kudos
19 Replies
idle-jam
Immortal
Immortal
Jump to solution

can you do a refresh as the value might be outdated.

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal
Jump to solution

Enable SSH or the console and try with this command:

vdf

IMHO, do not fill a datastore with all his free space. You can have several issue, like snapshots problems and the impossibility to poweron a VM (during the poweron a swap file must be created).

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
opbz
Hot Shot
Hot Shot
Jump to solution

chances are that you have memory swap files or snapshots using that space.

Vmware best practices is to leave 25+% free on your VMFS volumes.

I weoud suggest using a different VMFS volume if possible

Reply
0 Kudos
mla_
Contributor
Contributor
Jump to solution

Philip Brindley wrote:

chances are that you have memory swap files or snapshots using that space.

Vmware best practices is to leave 25+% free on your VMFS volumes.

I weoud suggest using a different VMFS volume if possible


Philip, sinse you mention 25+% I have a doubt that my host will be OK with only 19GB available...

As you can see from a screen shot in initial post I have one volume only - 410GB and 19GB is free.

The host dedicated for 2 VMs. To leave 100GB (25%) on RAID10 is not efficient in my case.

Sure I can forget about 19GB free space. But the question is would it be enough? The machines are not yet in production.

Thx.

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

The fact that you are trying to add an additional disk says you do not have enough space available. Without a good cushion you will have problems. With only 19GB free you could have the free space consumed overnight with forgotten snapshots. The consequences could be huge including data loss. Get more storage now before you get to production or you will be back here crying.

-- David -- VMware Communities Moderator
mla_
Contributor
Contributor
Jump to solution

DSTAVERT,

no snapshots planning.

The data only will be backed up. Later VM backup will be implemented.

What you will say now Smiley Happy ?

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

There just isn't enough room. Did you choose thick or thin disks? If thin you will be in trouble very quickly -- DAYS.

-- David -- VMware Communities Moderator
Reply
0 Kudos
mla_
Contributor
Contributor
Jump to solution

thick

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

You still need to account for VM swap space and log files.

-- David -- VMware Communities Moderator
Reply
0 Kudos
mla_
Contributor
Contributor
Jump to solution

BTW, ESX running on 8 GB USB key. Does it make something positive in current situation.

Let say I can  add 11GB to free volume space. Would 30GB free space be enough? Or 25% is required.

Brief, I need the max Data Store space for VM on 410GB volume.

Thanks much...

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Add up the amount of RAM that you have alocated to your VMs. You will need that amount of free datastore space for VM swap files. Add additional RAM to a VM and you will need to add that to your disk total. Count on a couple of GB for log files etc. You wanted to add an aditional virtual disk. Consider other near future needs. You need a cushion. If you were to run out of room your VMs would fail. The cost of failure is high. Extra disk space is inexpensive by comparison.

-- David -- VMware Communities Moderator
Walfordr
Expert
Expert
Jump to solution

mla!

Can you enable the remote or local TSM and get the results of these commands?

1. vmkfstools -Ph -v 10 /vmfs/volumes/DATASTORENAME/

2. vdf -h

3. fdisk -l

That would be very helpful.

I noticed that your VMs are on so the swap files for memory provisioned should already be created in the datatore and acounted for.

It seems as if you will have a static setup (no snapshots, etc) but you need to leave some head room on the storage/lun.  Try not go go past 90-95% usage on your storage even if you do not think usage will change.

Robert -- BSIT, VCP3/VCP4, A+, MCP (Wow I haven't updated my profile since 4.1 days) -- Please consider awarding points for "helpful" and/or "correct" answers.
Reply
0 Kudos
mla_
Contributor
Contributor
Jump to solution

Walfordr,

I removed second VMDK in SQL VM in order to reduce it size and provide more free disk space for the host.

Now I have a problem with free space.

As you can see on screenshot of initial post I have 410GB datastore and it was 19GB free spase when my machine had two VMDKs.

I removed second VMDK that was  100GB +. The disk disappeared in VM and currently I have one VMDK for SQL VM.

But my free space is now 31.6GB (see screenshot) when VMs are down and 7.46GB when they are up.

I rebooted the host but I still don't see my free space increased after removing VMDK.

It is even less now: 7GB vs 19GB before removing more than 100GB

Where is my FREE space?

I need to recreate my second VMDK.

Thanks.

Output of commands that you asked:

1.  vmkfstools -Ph -v 10 /vmfs/volumes/SIAD Datastore/

gives options for command (probably something wrong in syntax)

2.

~ # ~ #  vdf -h
Tardisk                  Space      Used
SYS1                      201M      201M
-ash: /: Permission denied
SYS2                       55M       55M
~ # Tardisk                  Space      Used
-ash: Tardisk: not found
~ # SYS1                      201M      201M
-ash: SYS1: not found
~ # SYS2                       55M       55M
Ramdisk                   Size      Used Available Use% Mounted on
-ash: SYS2: not found
~ # SYS3                        1M        1M
-ash: SYS3: not found
~ # SYS4                       12K       12K
-ash: SYS4: not found
~ # SYS5                       12K       12K
hostdstats                 78M        2M       75M   3% --
-ash: SYS5: not found
~ # -----
-ash: -----: not found
~ # Ramdisk                   Size      Used Available Use% Mounted on
-ash: Ramdisk: not found
~ # MAINSYS                    32M        2M       29M   6% --
-ash: MAINSYS: not found
~ # tmp                       192M        0B      192M   0% --
-ash: tmp: not found
~ # updatestg                 750M       12K      749M   0% --
-ash: updatestg: not found
~ # hostdstats                 78M        2M       75M   3% --
-ash: hostdstats: not found
~ # ~ #
-ash: /: Permission denied

3.

~ # fdisk -l

Disk /dev/disks/naa.600508b1001c8404c436d79cc661f462: 440.3 GB, 440345714688 byt                                                                                                  es
255 heads, 63 sectors/track, 53535 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

                                           Device Boot      Start         End                                                                                                        Blocks  Id System
/dev/disks/naa.600508b1001c8404c436d79cc661f462p1             1     53535 430019                                                                                                  823+  fb  VMFS

Disk /dev/disks/mpx.vmhba32:C0:T0:L0: 4000 MB, 4000317440 bytes
64 heads, 32 sectors/track, 3815 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

                           Device Boot      Start         End      Blocks  Id Sy                                                                                                  stem
/dev/disks/mpx.vmhba32:C0:T0:L0p1             5       900    917504    5  Extend                                                                                                  ed
/dev/disks/mpx.vmhba32:C0:T0:L0p4   *         1         4      4080    4  FAT16                                                                                                   <32M
/dev/disks/mpx.vmhba32:C0:T0:L0p5             5       254    255984    6  FAT16
/dev/disks/mpx.vmhba32:C0:T0:L0p6           255       504    255984    6  FAT16
/dev/disks/mpx.vmhba32:C0:T0:L0p7           505       614    112624   fc  VMKcor                                                                                                  e
/dev/disks/mpx.vmhba32:C0:T0:L0p8           615       900    292848    6  FAT16

Partition table entries are not in disk order

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

When you removed the 100GB disk did you delete it from the datastore or just remove it from the VM settings? The difference between powered on and off is the VM swap files. As soon as you power on a VM ESX(i) creates swap files equal to the RAM allocated to the VM.

-- David -- VMware Communities Moderator
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

You are working way too hard to use up all the disk space. I hope this points out just how easy it will be to get yourself in trouble when you move to production.

-- David -- VMware Communities Moderator
Reply
0 Kudos
mla_
Contributor
Contributor
Jump to solution

DSTAVERT wrote:

When you removed the 100GB disk did you delete it from the datastore or just remove it from the VM settings?

The difference between powered on and off is the VM swap files. As soon as you power on a VM ESX(i) creates swap files equal to the RAM allocated to the VM.

1. removed from the machine only. After your tip found it on datastore Smiley Happy

2.  each VMs use 12GB of RAM (32GB total on host). I will leave 30GB of free space on Datastore. Is there a settings for log file size control?

Sure, I have to read more... Didn't touch ESX during 2 years (worked with Hyper-V). And definitely forgot some important things.

Thanks to all for the help...

"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis
Reply
0 Kudos
Walfordr
Expert
Expert
Jump to solution

Are you now all set after deleting the actual VMDK from the datastore?  When you remove virtual disk pay attention to the pompt on the right side.  This way you do not have to go to the datastore to manually remove it.

Output of commands that you asked:

1.  vmkfstools -Ph -v 10 /vmfs/volumes/SIAD Datastore/

gives options for command (probably something wrong in syntax)

You got the error because of your datastore name.  If you press tab while typing the name autocomplete will escape the space for you, otherwize use quotes for the path.  This command will show you the datastore capacity and maximum files/files hooks available.  Its a handy command.  I renamed one of my lab datastore and completed the command to show you the output.

# vmkfstools -Ph -v 10 /vmfs/volumes/SIAD\ Datastore/
VMFS-3.46 file system spanning 1 partitions.
File system label (if any): SIAD Datastore
Mode: public
Capacity 10 GB, 31 MB available, file block size 1 MB
Volume Creation Time: Tue Apr  5 10:19:09 2011
Files (max/free): 27920/27888
Ptr Blocks (max/free): 9992/9974
Sub Blocks (max/free): 3968/3950
UUID: 4d9aec9d-588f05c0-557b-000c2922a350
Partitions spanned (on "lvm"):
        mpx.vmhba1:C0:T0:L0:3
~ #

Robert -- BSIT, VCP3/VCP4, A+, MCP (Wow I haven't updated my profile since 4.1 days) -- Please consider awarding points for "helpful" and/or "correct" answers.
Reply
0 Kudos
Walfordr
Expert
Expert
Jump to solution

Michael A. wrote:

Walfordr,

I removed second VMDK in SQL VM in order to reduce it size and provide more free disk space for the host.

Now I have a problem with free space.

As you can see on screenshot of initial post I have 410GB datastore and it was 19GB free spase when my machine had two VMDKs.

I removed second VMDK that was  100GB +. The disk disappeared in VM and currently I have one VMDK for SQL VM.

But my free space is now 31.6GB (see screenshot) when VMs are down and 7.46GB when they are up.

I rebooted the host but I still don't see my free space increased after removing VMDK.

It is even less now: 7GB vs 19GB before removing more than 100GB

Where is my FREE space?

I need to recreate my second VMDK.

Thanks.

Note that when you power on a VM it creates a swap file that is the size of memory that you provision for the VM.  So if your 2 VMs are 12GB each, they each are going to create a 12GB (24GB total) swap file when powered on.  The swap file is gone when you power off.

Keep this in mind when sizing your datastores.

Robert -- BSIT, VCP3/VCP4, A+, MCP (Wow I haven't updated my profile since 4.1 days) -- Please consider awarding points for "helpful" and/or "correct" answers.
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

2.  each VMs use 12GB of RAM (32GB total on host). I will leave 30GB of free space on Datastore. Is there a settings for log file size control?

Sure, I have to read more... Didn't touch ESX during 2 years (worked with Hyper-V). And definitely forgot some important things.

Thanks to all for the help...

Glad you are back to ESXSmiley Happy

You can change the destination, size and number of retained log files. They won't consume enough space to make a huge difference so I wouldn't worry about it. I would make sure that you set the datastore alarms in vCenter to monitor available space. You might also want to use one of the available scripts to keep a watch on the space as well. http://communities.vmware.com/docs/DOC-9842 is a great example.

-- David -- VMware Communities Moderator
Reply
0 Kudos