How Big is the 4.x User Layer Disk, and How Can You Change That?

How Big is the 4.x User Layer Disk, and How Can You Change That?

book

Article ID: CTX222095

calendar_today

Updated On:

Resolution

By default, the User Layer is 10GB.

If you have set User Quotas on your file share, then we will size the User Layer disk to be equal to your user quote. We assume that the share is specific to layering, and the only thing a user is going to be writing to it is their User Disk. So we assume that any user-specific quota is how big you want to make the User Disk. This supersedes the default.  Setting the file share quota is the standard, preferred method for setting the User Layer size.

There are three registry keys in your image which govern this behavior. If you want to modify them, you can do it with a GPO or a layer. I suspect the best place to put it is in the Platform Layer, but you could put it in the OS or App Layers too.

[HKEY_LOCAL_MACHINE\Software\Unidesk\Ulayer]

"UseQuotaIfAvailable" String Value

Values: "True" (Default), "False"

True to enable discovery and use of quotas. False to disable.

"DefaultUserLayerSizeInGb" DWord Value
The size of the user layer in GB without quotas (E.g. 5, 10, 23, etc.)

When not specified, the default is 10.

"QuotaQuerySleepMS" DWord Value
The number of milliseconds to wait after creating the directory for the user layer before checking to see if it has a quota. This is necessary to give some quota systems time to apply the quota to the new directory (FSRM requires this).

When not specified the default is 1000.

You'll probably never use the last one, but try it if you are sure you have set a quota and it seems to be not working.

Expanding the User Layer

If you already have a User Layer disk and you want to expand it, you just need to expand the VHD itself, and then expand the filesystem on it. PowerShell on Hyper-V servers, for instance, has a CmdLet named "resize-vhd" which will take a local filename and a total number of bytes and resize your disk. For some reason, resize-vhd is only available on Hyper-V servers, but you just need to enable the Role in your server to have access to the cmdlet.  Obviously you can only do this while the user is not logged in and not using the disk. Otherwise, any third-party VHD-resizing tool will work.

Once you resize the VHD, run Disk Management and expand the filesystem in the disk to fill the extra space, and that space will be reflected when the user logs in.  You can use the Attach VHD function in Disk Management to expand the filesystem after you expand it, or you can let the user log back in, run Disk Management themselves, and expand the filesystem themselves.  It will be the only disk with free space at the end.  The space will become immediately available.

Note: resize-vhd command can be run from Hyper-V only. You will need a Hyper-V server to run the command, or you can temporarily add Hyper-V role to a machine, then run the command.