~ Bindusar Kushwaha
Hi everyone, here in product support we regularly see issues relating to how the Content Library in System Center 2012 Configuration Manager uses and managed disk space so I thought I would take a minute and walk through a couple scenarios.
Hopefully you already have good working knowledge of each subdirectory in the Content Library and its role, but if not please refer to following articles:
- http://blogs.technet.com/b/configmgrteam/archive/2013/10/29/understanding-the-configuration-manager-content-library.aspx
- http://technet.microsoft.com/en-us/library/gg682083.aspx#BKMK_ManagingContent
- http://blogs.technet.com/b/hhoy/archive/2012/05/31/an-adventure-in-the-sccmcontentlib-single-instance-store.aspx
Also, if you need information on what to do if the drive where the Content Library is located becomes full. You can find that at the link here:
So with all that said, what happens if the drive gets full before we realize it and we attempt to distribute packages and/or applications?
Answer is simple:
1. ConfigMgr will locate the next drive that has the maximum amount of space and “no_sms_on_drive” file (which makes that drive off limits). In our example, SCCMContentLib is on the C: drive however now it is full, and the E: drive is the next available drive for ConfigMgr.
2. ConfigMgr will then create SCCMContentLib\FileLib on the E: drive (yes, only FileLib). The Registry value for ContentLibraryPath (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP\ContentLibraryPath) will still be pointing to C: since the rest of the files are still located there. Only SCCMContentLib\FileLib will move because it contains the actual file.
This is by design to make sure that the package and application creation and/or distribution does not fail.
However, this raises a few more questions. Since we realized after the fact that the C: drive was full, and now SCCMContentLib is spread over both C: and E:, what if I want to move all content to the E: drive or any other drive? Or what if I want to go back and free disk space on C: so that I can keep all my content there? If I do that will SCCMContentLib from C: merge with SCCMContentLib\FileLib on E: drive? If yes, will ConfigMgr be able to utilize all of the files inside? The answer is yes, but here’s how I tested this in my lab environment before implementing it in production.
STEPS:
1. SCCMContentLib was on C: and the drive became full, however we didn’t realize this until it was too late.
2. SCCMContentLib\FileLib got created automatically on E:
3. After some additional time, let’s say that E: also got full and SCCMContentLib\FileLib got created on K: (just to make the situation more complex ;)
4. To consolidate things, we move SCCMContentLib from C: to K: using ContentLibraryTransfer.exe which merges SCCMContentLib\FileLib from K: into SCCMContentLib, and we also change the registry key “ContentLibraryPath” from C: to K:
5. Next we moved SCCMContentLib\FileLib from E: to K: using the same ContentLibraryTransfer.exe which merges SCCMContentLib\FileLib from E: to SCCMContentLib on K:
6. When complete we test the applications to see if they are still working and yes, they are!
Here is a deeper look at the steps involved and what takes place.
STEP 1:
Registry is pointing to C: for ContentLibraryPath.
The C: drive is full and we have an E: drive with plenty of space.
As of now, SCCMContentLib is on C: and the E: drive doesn’t have any files in it.
STEP 2:
We create a new Application for the ConfigMgr 2012 Toolkit R2. Note that no failure is observed even though the disk is full.
In the background, the E: drive sees SCCMContentLib created with only SCCMContentLib\FileLib in it.
The screen shot below simply shows that FileLib contains the actual file and DataLib and PackageLib only have pointers to it.
STEP 3:
Now we shrink the E: drive and copy some random files to it to make it full.
Next we created another drive K: and verify that it is empty.
Now we’ll create another application for ReportBuilder.
SCCMContentLib gets created in K: with only SCCMContentLib\FileLib as expected. We can track the SCCMContentLib\DataLib in C: to verified that it’s created there.
This clearly shows that the SCCMContentLib\FileLib is on other drives as the drive is full, however SCCMContentLib\DataLib and SCCMContentLib\PkgLib are still at the location specified in registry (C:\SCCMContentLib in our case).
STEP 4:
Next we run the following command to move the SCCMContentLib from the C: drive to the K: drive where we already have SCCMContentLib\FileLib.
As per logs:
CLT:04/30/2014 11:25:13 ***************************************************************************************************
CLT:04/30/2014 11:25:13 Content Library Transfer
…
CLT:04/30/2014 11:25:13 Run this tool when the server hosting the content library is offline. If you run this tool when
CLT:04/30/2014 11:25:13 data is being written to or removed from the content library, you may introduce errors.
…
CLT:04/30/2014 11:25:13 Read Input Arguments
CLT:04/30/2014 11:25:13 CurrDir C NewDir K
…
CLT:04/30/2014 11:25:13 Loaded Configuration
CLT:04/30/2014 11:25:13 Folder Source:
CLT:04/30/2014 11:25:13 C:\SMSSIG$
CLT:04/30/2014 11:25:13 C:\SMSPKGC$
CLT:04/30/2014 11:25:13 C:\SMSPKGSIG
CLT:04/30/2014 11:25:13 C:\SMSPKG
CLT:04/30/2014 11:25:13 C:\SCCMContentLib
CLT:04/30/2014 11:25:13
CLT:04/30/2014 11:25:13 Folder Destination:
CLT:04/30/2014 11:25:13 K:\SMSSIG$
CLT:04/30/2014 11:25:13 K:\SMSPKGK$
CLT:04/30/2014 11:25:13 K:\SMSPKGSIG
CLT:04/30/2014 11:25:13 K:\SMSPKG
CLT:04/30/2014 11:25:13 K:\SCCMContentLib
CLT:04/30/2014 11:25:13
CLT:04/30/2014 11:25:13 Share Source:
CLT:04/30/2014 11:25:13 SMSSIG$,C:\SMSSIG$
CLT:04/30/2014 11:25:13 SMSPKGC$,C:\SMSPKGC$
CLT:04/30/2014 11:25:13 SMS_CPSC$,C:\SMSPKG
CLT:04/30/2014 11:25:13 SCCMContentLib$,C:\SCCMContentLib
The changes observed in the drives explain everything:
The tool transferred the following directories from C: to K:
Also, in the Registry the location is changed to K:
Now we’ll look for the ReportBuilder application which was previously in K: to verify if it’s still there or overwritten, and if still there, is it really working or not.
We can see that it is still there and the date modified stamp tells the complete story.
In order to check whether this application still works we’ll distribute it:
Distribution was successful so I decided to deploy it to a test machine:
We are able to see that the application is downloaded by the client and saved in CCMcache on the client machine.
This clearly means the application is working, thus moving SCCMContentLib from the source drive to the target drive will merge the content and NOT overwrite it.
STEP 5:
So now we have E: with only SCCMContentLib\FileLib and the Resource ToolKit application in it. SCCMContentLib with all other information is currently moved to K: so we need to see if SCCMContentLib\FileLib from E: can also be merged to K:
We run the following command again
And check the log for verification:
CLT:04/30/2014 12:22:40 ***************************************************************************************************
…
CLT:04/30/2014 12:22:40 Read Input Arguments
CLT:04/30/2014 12:22:40 CurrDir E NewDir K
CLT:04/30/2014 12:22:40 Read Input Arguments: Completed Successfully
…
CLT:04/30/2014 12:22:40 Folder Source:
CLT:04/30/2014 12:22:40 E:\SMSSIG$
CLT:04/30/2014 12:22:40 E:\SMSPKGE$
CLT:04/30/2014 12:22:40 E:\SMSPKGSIG
CLT:04/30/2014 12:22:40 E:\SMSPKG
CLT:04/30/2014 12:22:40 E:\SCCMContentLib
CLT:04/30/2014 12:22:40
CLT:04/30/2014 12:22:40 Folder Destination:
CLT:04/30/2014 12:22:40 K:\SMSSIG$
CLT:04/30/2014 12:22:40 K:\SMSPKGK$
CLT:04/30/2014 12:22:40 K:\SMSPKGSIG
CLT:04/30/2014 12:22:40 K:\SMSPKG
CLT:04/30/2014 12:22:40 K:\SCCMContentLib
CLT:04/30/2014 12:22:40
CLT:04/30/2014 12:22:40 Share Source:
CLT:04/30/2014 12:22:40 SMSSIG$,E:\SMSSIG$
CLT:04/30/2014 12:22:40 SMSPKGE$,E:\SMSPKGE$
CLT:04/30/2014 12:22:40 SMS_CPSE$,E:\SMSPKG
CLT:04/30/2014 12:22:40 SCCMContentLib$,E:\SCCMContentLib
CLT:04/30/2014 12:22:40
Share Destination:CLT:04/30/2014 12:22:40 SMSSIG$,K:\SMSSIG$
CLT:04/30/2014 12:22:40 SMSPKGK$,K:\SMSPKGK$
CLT:04/30/2014 12:22:40 SMS_CPSK$,K:\SMSPKG
CLT:04/30/2014 12:22:40 SCCMContentLib$,K:\SCCMContentLib
…
CLT:04/30/2014 12:22:40 Verify Drives: Validating drives specified for the transfer exist
CLT:04/30/2014 12:22:40 Verify Drives: Completed Successfully
CLT:04/30/2014 12:22:40 Verify Destination: Check if target drive has enough space for the transfer
…
CLT:04/30/2014 12:22:40 Executing Transfer: Begin Content Library Transfer
CLT:04/30/2014 12:22:40 Mark Source: Mark source drive for Do Not Use
CLT:04/30/2014 12:22:40 Dropping No SMS.
CLT:04/30/2014 12:22:40 Successfully created NO_SMS file!
CLT:04/30/2014 12:22:40 Mark Source: Completed
…
CLT:04/30/2014 12:22:40 Copying Folder E:\SCCMContentLib
CLT:04/30/2014 12:22:40 Moving E:\SCCMContentLib to K:\SCCMContentLib
CLT:04/30/2014 12:22:40 Moving E:\SCCMContentLib\FileLib to K:\SCCMContentLib\FileLib
CLT:04/30/2014 12:22:40 Moving E:\SCCMContentLib\FileLib\9CC8 to K:\SCCMContentLib\FileLib\9CC8
CLT:04/30/2014 12:22:40 Creating directory K:\SCCMContentLib\FileLib\9CC8
LT:04/30/2014 12:22:40 Copying file E:\SCCMContentLib\FileLib\9CC8\9CC8085253117D1B938EFB87DB73F175F1B2D657083ADC963904DAD5B8008E1C to K:\SCCMContentLib\FileLib\9CC8\9CC8085253117D1B938EFB87DB73F175F1B2D657083ADC963904DAD5B8008E1C
CLT:04/30/2014 12:22:40 Copying file E:\SCCMContentLib\FileLib\9CC8\9CC8085253117D1B938EFB87DB73F175F1B2D657083ADC963904DAD5B8008E1C.INI to K:\SCCMContentLib\FileLib\9CC8\9CC8085253117D1B938EFB87DB73F175F1B2D657083ADC963904DAD5B8008E1C.INI
CLT:04/30/2014 12:22:40 Copying file E:\SCCMContentLib\FileLib\9CC8\9CC8085253117D1B938EFB87DB73F175F1B2D657083ADC963904DAD5B8008E1C.SIG to K:\SCCMContentLib\FileLib\9CC8\9CC8085253117D1B938EFB87DB73F175F1B2D657083ADC963904DAD5B8008E1C.SIG
CLT:04/30/2014 12:22:40 Copy Content: Completed
CLT:04/30/2014 12:22:40 Stop Services
…
CLT:04/30/2014 12:23:11 Deleting E:\SMSSIG$
CLT:04/30/2014 12:23:11 Deleting E:\SMSPKGE$
CLT:04/30/2014 12:23:11 Deleting E:\SMSPKGSIG
CLT:04/30/2014 12:23:11 Deleting E:\SMSPKG
CLT:04/30/2014 12:23:11 Deleting E:\SCCMContentLib
CLT:04/30/2014 12:23:11 Deleting Old Content Complete
CLT:04/30/2014 12:23:11
CLT:04/30/2014 12:23:11 Updating Virtual Directories
CLT:04/30/2014 12:23:13 Virtual Directories Update Complete
…
CLT:04/30/2014 12:23:13 Content Library Transfer is now complete !!
Now we are able to see 9CC8* on the K: drive:
Also, in E:\SCCMcontentLib it is deleted:
The E: drive is removed from the usable drives list:
To make sure the application is still healthy I distributed and deployed it.
While deploying this application to a machine, we are able to see that the application is installed on the client machine:
Hopefully this will clarify how SCCMContentLib works when using disk space and helps provide a little insight on how you can manage the same.
Bindusar Kushwaha | Support Engineer | Microsoft GBS Management and Security Division
Get the latest System Center news onFacebookandTwitter:
System Center All Up: http://blogs.technet.com/b/systemcenter/
System Center – Configuration Manager Support Team blog: http://blogs.technet.com/configurationmgr/
System Center – Data Protection Manager Team blog: http://blogs.technet.com/dpm/
System Center – Orchestrator Support Team blog: http://blogs.technet.com/b/orchestrator/
System Center – Operations Manager Team blog: http://blogs.technet.com/momteam/
System Center – Service Manager Team blog: http://blogs.technet.com/b/servicemanager
System Center – Virtual Machine Manager Team blog: http://blogs.technet.com/scvmm
Windows Intune: http://blogs.technet.com/b/windowsintune/
WSUS Support Team blog: http://blogs.technet.com/sus/
The AD RMS blog: http://blogs.technet.com/b/rmssupp/
MED-V Team blog: http://blogs.technet.com/medv/
Server App-V Team blog: http://blogs.technet.com/b/serverappv
The Forefront Endpoint Protection blog : http://blogs.technet.com/b/clientsecurity/
The Forefront Identity Manager blog : http://blogs.msdn.com/b/ms-identity-support/
The Forefront TMG blog: http://blogs.technet.com/b/isablog/
The Forefront UAG blog: http://blogs.technet.com/b/edgeaccessblog/