Friday, 22 August 2014

SCCM 2012 Content Library

SCCM Content Library:-

Content Library is a new storage format introduced in System  ConfigMgr 2012 for the content storage. 
By default in SCCM 2012 the contents (source files for Software Updates, Applications, packages) are stored in the distribution points using this new concept. Back in SCCM 2007 in fact since SMS 2.0 the legacy method was used.  The contents were stored in the package ID folder under the SMSPKG shared directory. This has been replaced by the SCCMContentLib folder.  The content Library is also called as single-Instance store, only one instance of each file, regardless of the number package references.

In  ConfigMgr 2007, If a particular file is a part of multiple packages or Package versions , then the copy of the same file is stored in all the reference packages. This will cause disk space issues.
By using Single instance store in SCCM 2012, every file will be stored only once, that means single instance/copy of each file.
Whenever we distribute  a package to a DP. The hash value of each source file will be calculated and if it is already present in the DP. It will just add a reference of the new package. We will see this in detail.


SCCMContentLib consists of three sub folders:-
PkgLib, DataLib and FileLib


PackageLibrary(PkgLib) :- 
Here we will find a 1KB PackageID.INI file for each and every package present in the DP.  This INI file will have the version of the package distributed to the DP

For example, if the package ID is SAP0008, then the INI file name would be SAP0008.INI

DataLibrary(DataLib):- 
As the name suggests  this folder contains the Metadata about each and every package present in the DP.  We can see a PackageID.Version.INI File and a PackageID.Version Folder for every package

  1. PackageID.Version.INI file - This file contains the information such as the hash value of the whole package which is used for validation
  2. PackageID.Version Folder - This folder contains the exact package structure without any real files. For each file in the original package you will see a .INI file which has the information and Pointer to the original file.  If we open the INI file we can see a hash value of the original file. Note down the first four digit of the hash value and you can locate the original file using it in the FileLib folder



File Library(FileLib):- The actual files are present in the FileLib folder. We can locate the files using the hash value which we 








Here is an example of the single instance storage.
Let us consider a package "Test Package 1" which has the following source files.


 


 
Note that the package ID is SAP0009.








SMSPKGSIG folder contains the snapshot of the package. You can notice that  the size of each file is 1KB
These files have the signature information.





Now let's focus on the content Library folder. As discussed the content library has three sub folders :- PkgLib, DataLib and FileLib

PkgLib has  the  INI files  (PackageID.INI) of 1Kb for each  package present in the DP.  In this example, the INI file name is SAP0009.INI





If we open the SAP0009.INI file present in the PkgLib folder we could see the following information such as Package ID and Package version.





Data Lib.

Now let's move to the Data Lib.
Data Lib has two entries for the each package SAP0009.1.  One is a folder and other one is an INI file

First one is an INI file (PackageID.Version.INI) which has the hash value for the whole package. This hash value is used for validation. 

See below the contents on the SAP00009.INI file





Second one is a folder(PackageID.version) which has the exact package structure without the real files.  We can see each source file in the package 

Is represented by an INI file of size 1KB.





The INI file has the following information as shown below.
  • Last Modified
  • Hash Value
  • Size
  • Attributes

Now the actual file can be located using this Hash value in the FileLib folder.





FileLib

FileLib stores the actual files using their hash values.






Let's browse to the folder '64EC'  and take a look at the real files.





If you open the INI file present in the hash folder. We can see the packages  which are linked to this particular file.  In this example File1.txt is a part of SAP00009.1





  


If this file is present in any other packages, then we can see those package IDs also in this INI file.  So this INI file will tell us the packages which have this same source file (in our example , the source file is file1.txt).
Here the actual file is stored only once( "Single Instance Storage"). If any other package has the same source file, it will not be stored again instead it will add a reference to
this hash value. INI file.




 This is all about the content Library in SCCM 2012



By default the source files are stored in the content library. We can also enable the legacy storage method using the below option in the package properties. 
This option can be used for the scenarios  like "installing the package from the network"



Thanks for reading! Happy learning!!!