Configuration Manager 中的内容库The content library in Configuration Manager

适用范围:Configuration Manager (Current Branch)Applies to: Configuration Manager (current branch)

内容库是 Configuration Manager 中内容的单实例存储。The content library is a single-instance store of content in Configuration Manager. 站点用它减少分发内容组合正文的总体大小。The site uses it to reduce the overall size of the combined body of content that you distribute. 内容库存储软件部署的所有内容文件,例如:软件更新、应用程序和操作系统部署。The content library stores all content files for software deployments, for example: software updates, applications, and OS deployments.

  • 站点在每个站点服务器和每个分发点上自动创建并维护内容库的副本。The site automatically creates and maintains a copy of the content library on each site server and each distribution point.

  • 在 Configuration Manager 将内容文件添加到站点服务器或将文件复制到分发点之前,它会验证每个内容文件是否已在内容库中。Before Configuration Manager adds content files to the site server or copies the files to distribution points, it verifies whether each content file is already in the content library.

  • 如果内容文件可用,则 Configuration Manager 不会复制该文件。If the content file is available, Configuration Manager doesn't copy the file. 而是将现有内容文件与应用程序或包相关联。It instead associates the existing content file with the application or package.

在分发点服务器上配置以下选项:On distribution point servers, configure the following options:

  • 希望在其上创建内容库的一个或多个磁盘驱动器。One or more disk drives on which you want to create the content library.

  • 使用的每个驱动器的优先级。A priority for each drive that you use.

Configuration Manager 将内容文件复制到优先级最高的驱动器中,直到该驱动器的可用空间小于所指定的最小可用空间。Configuration Manager copies content files to the drive with the highest priority until that drive contains less than a minimum amount of free space that you specify.

  • 在分发点安装过程中,你可以配置驱动器设置。You configure the drive settings during the distribution point installation.

  • 安装完成后,无法在分发点属性中配置驱动器设置。You can't configure the drive settings in the distribution point properties after the installation has finished.

有关如何为分发点配置驱动器设置的详细信息,请参阅管理内容和内容基础结构For more information about how to configure the drive settings for the distribution point, see Manage content and content infrastructure.

重要

若要在安装后将内容库移到分发点上的另一位置,请使用 Configuration Manager 工具中的内容库传输工具。To move the content library to a different location on a distribution point after the installation, use the Content Library Transfer tool in the Configuration Manager tools. 有关详细信息,请参阅内容库传输工具For more information, see the Content Library Transfer tool.

关于管理中心站点上的内容库About the content library on the central administration site

默认情况下,安装站点时,Configuration Manager 会在管理中心站点上创建内容库。By default, Configuration Manager creates a content library on the central administration site when the site is installed. 该内容库放置在具有最多可用磁盘空间的站点服务器驱动器上。The content library is placed on the drive of the site server that has the most free disk space. 因为无法在管理中心站点上安装分发点,所以无法设置内容库要使用的驱动器的优先级。Because you can't install a distribution point on the central administration site, you can't prioritize the drives for use by the content library. 类似于其他站点服务器和分发点上的内容库,当包含内容库的驱动器可用磁盘空间不足时,内容库会自动跨越到下一个可用的驱动器。Similar to the content library on other site servers and on distribution points, when the drive that contains the content library runs out of available disk space, the content library automatically spans to the next available drive.

Configuration Manager 会在以下情况下使用管理中心站点上的内容库:Configuration Manager uses the content library on the central administration site in the following scenarios:

  • 在管理中心站点上创建内容You create content on the central administration site

  • 迁移另一个 Configuration Manager 站点中的内容,并将管理中心站点指定为管理该内容的站点You migrate content from another Configuration Manager site, and assign the central administration site as the site that manages that content

备注

在主站点创建内容,然后将其分发给其他主站点或其他主站点下面的辅助站点,管理中心站点将该内容临时存储在管理中心站点上的计划员收件箱中,但未将该内容添加到其内容库中。When you create content at a primary site and then distribute it to a different primary site or a secondary site below a different primary site, the central administration site temporarily stores that content in the scheduler inbox on the central administration site but doesn't add that content to its content library.

使用以下选项管理位于管理中心站点上的内容库:Use the following options to manage the content library on the central administration site:

  • 若要防止在特定驱动器上安装内容库,请创建名为 no_sms_on_drive.sms 的空文件。To prevent the content library from being installed on a specific drive, create an empty file named no_sms_on_drive.sms. 在创建内容库之前将其复制到驱动器的根目录下。Copy it to the root of the drive before the content library is created.

  • 创建内容库之后,请使用 Configuration Manager 工具中的内容库传输工具来管理内容库的位置。After the content library has been created, use the Content Library Transfer tool from the Configuration Manager tools to manage the location of the content library. 有关详细信息,请参阅内容库传输工具For more information, see the Content Library Transfer tool.

备注

云分发点不使用单实例存储。Cloud distribution points don't use single-instance storage. 该站点在将包发送到 Azure 之前对其进行加密,每个包都有一个唯一的加密密钥。The site encrypts packages before sending to Azure, and each package has a unique encrypted key. 即使两个文件完全相同,加密版本也不一样。Even if two files were identical, the encrypted versions wouldn't be the same.

配置用于站点服务器的远程内容库Configure a remote content library for the site server

从 1806 版开始,若要配置站点服务器高可用性或释放管理中心或主站点服务器上的硬盘空间,请将内容库重定位到另一个存储位置。Starting in version 1806, to configure site server high availability or to free up hard drive space on your central administration or primary site servers, relocate the content library to another storage location. 将内容库移至站点服务器上的另一个驱动器、单独服务器或者存储区域网络 (SAN) 中的容错磁盘。Move the content library to another drive on the site server, a separate server, or fault-tolerant disks in a storage area network (SAN). 建议移至 SAN,因为它具有高可用性,并提供弹性存储,即存储可随时间推移而增长或收缩,以满足不断变化的内容需求。A SAN is recommended, because it's highly available, and provides elastic storage that grows or shrinks over time to meet your changing content requirements. 有关详细信息,请参阅高可用性选项For more information, see High availability options.

远程内容库是站点服务器高可用性的先决条件。A remote content library is a prerequisite for site server high availability.

备注

此操作仅在站点服务器上移动内容库。This action only moves the content library on the site server. 它不会影响分发点上的内容库的位置。It doesn't impact the location of the content library on distribution points.

提示

此外还需计划管理内容库外部的包源内容。Also plan for managing package source content, which is external to the content library. Configuration Manager 中的每个软件对象都在网络共享上具有包源。Every software object in Configuration Manager has a package source on a network share. 请考虑将所有源集中到单个共享,但请确保此位置冗余且高度可用。Consider centralizing all sources to a single share, but make sure this location is redundant and highly available.

如果将内容库移动到与包源相同的存储卷,则无法标记此卷用于重复数据删除。If you move the content library to the same storage volume as your package sources, you can't mark this volume for data deduplication. 虽然内容库支持重复数据删除,但包源卷不支持。While the content library supports data deduplication, the package sources volume doesn't support it. 有关详细信息,请参阅重复数据删除For more information, see Data deduplication.

必备条件Prerequisites

  • 站点服务器计算机帐户需要将内容库移至其中的网络路径的“完全控制”权限。The site server computer account needs Full control permissions to the network path to which you're moving the content library. 此权限适用于共享和文件系统。This permission applies to both the share and the file system. 远程系统上不安装任何组件。No components are installed on the remote system.

  • 站点服务器无法获得分发点角色。The site server can't have the distribution point role. 分发点也使用内容库,并且此角色不支持远程内容库。The distribution point also uses the content library, and this role doesn't support a remote content library. 移动内容库后,无法将分发点角色添加到站点服务器。After moving the content library, you can't add the distribution point role to the site server.

  • 内容库的远程系统需要位于受信任的域中。The remote system for the content library needs to be in a trusted domain.

重要

不要在多个站点之间重复使用共享网络位置。Don't reuse a shared network location between multiple sites. 例如,不要对管理中心站点和子主站点使用相同的路径。For example, don't use the same path for both a central administration site and a child primary site. 此配置可能导致内容库损坏并需要重新生成。This configuration has the potential to corrupt the content library, and require you to rebuild it.

管理内容库的过程Process to manage the content library

  1. 在网络共享中创建一个文件夹作为内容库的目标。Create a folder in a network share as the target for the content library. 例如,\\server\share\folderFor example, \\server\share\folder.

    警告

    请勿重复使用包含内容的现有文件夹。Don't reuse an existing folder with content. 例如,不要使用与包源相同的文件夹。For example, don't use the same folder as your package sources. 在复制内容库之前,Configuration Manager 会从指定的位置删除任何现有内容。Before copying the content library, Configuration Manager removes any existing content from the location you specify.

  2. 在 Configuration Manager 控制台中,切换到“管理”工作区。In the Configuration Manager console, switch to the Administration workspace. 展开“站点配置”,选择“站点”节点,然后选择站点 。Expand Site Configuration, select the Sites node, and select the site. 在详细信息窗格底部的“摘要”选项卡上,注意“内容库”的新列。On the Summary tab at the bottom of the details pane, notice a new column for the Content Library.

  3. 选择功能区上的“管理内容库”。Select Manage Content Library on the ribbon.

  4. 在“管理内容库”窗口中,“当前位置”字段将显示本地驱动器和路径。In the Manage Content Library window, the Current Location field shows the local drive and path. 在“新位置”中输入有效网络路径。Enter a valid network path for the New Location. 此路径是站点将内容库移至其中的位置。This path is the location to which the site moves the content library. 它必须包含已存在于共享上的文件夹名称,例如,\\server\share\folderIt must include a folder name that already exists on the share, for example, \\server\share\folder. 选择“确定”。Select OK.

  5. 请注意细节窗格“摘要”选项卡上“内容库”列中的“状态”值。Note the Status value in the Content Library column on the Summary tab of the details pane. 它会更新以显示站点在移动内容库方面的进度。It updates to show the site's progress in moving the content library.

    • 处于“正在进行”状态时,“移动进度(%)”值将显示完成百分比 。While In progress, the Move Progress (%) value displays the percentage complete.

      备注

      如果有大型内容库,可能会在一段时间内看到控制台中的进度为 0%If you have a large content library, you may see 0% progress in the console for a while. 例如,使用 1 TB 库时,在显示 1% 之前,它必须复制 10 GB 的数据。For example, with a 1 TB library, it has to copy 10 GB before it shows 1%. 查看 distmgr.log,它显示了复制的文件数和字节数。Review distmgr.log, which shows the number of files and bytes copied. 从 1810 版开始,日志文件还会显示估计的剩余时间。Starting in version 1810, the log file also shows an estimated time remaining.

    • 如果存在错误状态,状态将显示错误。If there's an error state, the status displays the error. 常见错误包括“访问被拒绝”或“磁盘已满” 。Common errors include access denied or disk full.

    • 完成时,显示“完成”。When complete it displays Complete.

      有关详细信息,请参阅 distmgr.logSee the distmgr.log for details. 有关详细信息,请参阅站点服务器和站点系统服务器日志For more information, see Site server and site system server logs.

有关此过程的详细信息,请参阅流程图 - 管理内容库For more information on this process, see Flowchart - Manage content library.

实际上,站点将内容库文件复制到远程位置。The site actually copies the content library files to the remote location. 此过程不会删除站点服务器上原始位置的内容库文件。This process doesn't delete the content library files at the original location on the site server. 若要释放空间,管理员必须手动删除这些原始文件。To free up space, an administrator must manually delete these original files.

如果原始内容库跨两个驱动器,该库将在新目标中合并为单个文件夹。If the original content library spans two drives, it's merged into a single folder at the new destination.

从版本 1810 开始,在复制过程中,Despooler 和分发管理器组件不会处理新包。Starting in version 1810, during the copy process, the Despooler and Distribution manager components don't process new packages. 此操作可确保该内容在移动时不会添加到库中。This action makes sure that content isn't added to the library while it's moving. 无论如何,在系统维护期间安排此更改。Regardless, schedule this change during a system maintenance.

如果需要将内容库移回站点服务器,请重复此过程,但在“新位置”中输入本地驱动器和路径。If you need to move the content library back to the site server, repeat this process, but enter a local drive and path for the New Location. 它必须包含已存在于驱动器上的文件夹名称,例如,D:\SCCMContentLibIt must include a folder name that already exists on the drive, for example, D:\SCCMContentLib. 如果原始内容仍存在,该过程会快速将配置移动到站点服务器的本地位置。When the original content still exists, the process quickly moves the configuration to the location local to the site server.

提示

若要将内容移动到站点服务器上的另一个驱动器,请使用“内容库传输”工具。To move the content to another drive on the site server, use the Content Library Transfer tool. 有关详细信息,请参阅内容库传输工具For more information, see the Content Library Transfer tool.

在内容库内Inside the content library

警告

以下部分仅供参考。The following section is provided for informational purposes only. 请勿更改、添加或删除内容库中的任何文件或文件夹。Don't alter, add, or remove any files or folders in the content library. 执行此操作可能会损坏包、内容或整个内容库。Doing so could corrupt packages, contents, or the content library as a whole. 如果怀疑存在任何缺失、损坏或无效数据,请使用 Configuration Manager 控制台中的验证功能来检测此类问题。If you suspect any missing, corrupt, or otherwise invalid data, use the validation feature in the Configuration Manager console to detect such issues. 然后重新分发受影响的内容,从而解决问题。Then redistribute the affected content to correct the issues.

默认情况下,内容库存储在驱动器根目录上名为 SCCMContentLib 的文件夹中。By default, the content library is stored on the root of a drive in a folder called SCCMContentLib. 默认情况下,此文件夹共享为 SCCMContentLib$。This folder is shared by default as SCCMContentLib$. 文件夹和共享具有受限权限,以防止意外损坏。The folder and share have restricted permissions to prevent accidental damage. 应从 Configuration Manager 控制台进行所有更改。All changes should be made from the Configuration Manager console. 此文件夹中具有以下对象:Within this folder are the following objects:

  • 包库(PkgLib 文件夹):有关分发点上存在哪些包的信息。The package library (PkgLib folder): Information about what packages are present on the distribution point.

  • 数据库(DataLib 文件夹):有关包的原始结构的信息。The data library (DataLib folder): Information about the original structure of the packages.

  • 文件库(FileLib 文件夹):包中的原始文件。The file library (FileLib folder): The original files in the package. 通常情况下,此文件夹占用大部分存储。This folder is typically what uses the bulk of the storage.

Configuration Manager 内容库关系图概述

提示

使用 Configuration Manager 工具中的“内容库资源管理器”工具浏览内容库的内容。Use the Content Library Explorer tool from the Configuration Manager tools to browse the contents of the content library. 此工具不能用于修改内容。You can't use this tool to modify the contents. 借助它,用户可了解现有内容,并能进行验证和重新分发。It provides insight into what's present, as well as allowing validation and redistribution. 有关详细信息,请参阅内容库资源管理器For more information, see the Content Library Explorer.

包库Package library

包库文件夹 PkgLib 中针对分发到分发点的每个包具有一个文件。The package library folder, PkgLib, includes one file for each package distributed to the distribution point. 文件名称是包 ID,例如,ABC00001.INIThe file name is the package ID, for example, ABC00001.INI. 此文件的 [Packages] 部分为内容 ID 列表,这些 ID 由部分包内容及版本等其他信息组成。In this file under the [Packages] section is a list of content IDs that are part of the package, as well as other information such as the version. 例如,ABC00001 是版本 1 的旧版包 。For example, ABC00001 is a legacy package at version 1. 其在此文件中的内容 ID 是 ABC00001.1The content ID in this file is ABC00001.1.

数据库Data library

数据库文件夹 DataLib 针对每个包中的每项内容具有一个文件和一个文件夹。The data library folder, DataLib, includes one file and one folder for each of the contents in each package. 例如,此文件和文件夹分别名为 ABC00001.1.INIABC00001.1For example, this file and folder are named ABC00001.1.INI and ABC00001.1, respectively. 该文件包含用于验证的信息。The file includes information for validation. 该文件夹从原始包重新创建文件夹结构。The folder recreates the folder structure from the original package.

数据库中的文件将被具有包中原始文件名称的 INI 文件替换。The files in the data library are replaced by INI files with the name of the original file in the package. 例如,MyFile.exe.INIFor example, MyFile.exe.INI. 这些文件包含有关原始文件的信息,例如大小、修改时间和哈希。These files include information about the original file, such as the size, time modified, and the hash. 使用哈希的前四个字符在文件库找到原始文件。Use the first four characters of the hash to locate the original file in the file library. 例如,MyFile.exe.INI 中的哈希为 DEF98765,前四个字符为 DEF9 。For example, the hash in MyFile.exe.INI is DEF98765, and the first four characters are DEF9.

文件库File library

如果内容库跨多个驱动器,则包文件可能位于其中任一驱动器上的文件库文件夹 FileLib 中。If the content library spans across multiple drives, the package files could be in the file library folder, FileLib, on any of these drives.

使用在数据库中找到的哈希的前四个字符查找特定文件。Locate a specific file using the first four characters from the hash found in the data library. 文件库文件夹内有多个文件夹,每个文件夹都有一个四个字符的名称。Inside the file library folder are many folders, each with a four-character name. 查找与哈希中前四个字符匹配的文件夹。Find the folder that matches the first four characters from the hash. 找到此文件夹后,可发现其中包含一组或多组三个文件。Once you find this folder, it includes one or more sets of three files. 这些文件共享相同的名称,但其中一个具有扩展名 INI,一个具有扩展名 SIG,另一个没有文件扩展名。These files share the same name, but one has the extension INI, one has the extension SIG, and one has no file extension. 原始文件是没有扩展名的文件,其名称与数据库中的哈希一致。The original file is the one with no extension whose name is equal to the hash from the data library.

例如,文件夹 DEF9 包括 DEF98765.INIDEF98765.SIGDEF98765For example, folder DEF9 includes DEF98765.INI, DEF98765.SIG, and DEF98765. DEF98765 是原始 MyFile.exeDEF98765 is the original MyFile.exe. INI 文件包括共享相同文件的“用户”或内容 ID 列表。The INI file includes a list of "users" or content IDs that share the same file. 除非删除了所有这些内容,否则该站点不会删除文件。The site doesn't remove a file unless all of these contents are also removed.

跨驱动器Drive spanning

内容库可跨多个驱动器。The content library can be spanned across multiple drives. 在创建分发点时选择这些驱动器。You choose these drives when creating the distribution point. 默认情况下,Configuration Manager 会在跨越内容库时自动选择驱动器。By default, Configuration Manager automatically chooses the drives when spanning the content library.

选择驱动器时,需选择主驱动器和辅助驱动器。When you choose the drives, select a primary and secondary drive. 站点将所有元数据存储在主驱动器上。The site stores all metadata on the primary drive. 只将文件库跨越到辅助驱动器。It only spans the file library across to the secondary drive. 辅助驱动器的文件夹共享名称包括驱动器号。The folder's share name for secondary drives includes the drive letter. 例如,如果 D: 和 E: 是内容库的辅助驱动器,则共享名为 SCCMContentLibD$ 和 SCCMContentLibE$ 。For example, if D: and E: are secondary drives for the content library, the share names are SCCMContentLibD$ and SCCMContentLibE$.

如果选择“自动”选项,Configuration Manager 将选择具有最多可用空间的驱动器作为其主驱动器。If you chose the Automatic option, Configuration Manager selects the drive with the most available free space as its primary drive. 它在此驱动器上存储所有元数据。It stores all of the metadata on this drive. 该站点只将文件库跨越到辅助驱动器。The site only spans the file library across to secondary drives.

在配置期间指定保留空间量。You specify a reserve space amount during configuration. 最佳可用磁盘仅剩余此保留空间量后,Configuration Manager 将尝试使用辅助磁盘。Configuration Manager attempts to use a secondary disk once the best available disk has only this reserve space amount left free. 每次选择使用新驱动器时,都会选择具有最多可用空间的驱动器。Each time a new drive is selected for use, the drive with the most available free space is selected.

无法指定分发点使用除特定一组驱动器之外的所有驱动器。You can't specify that a distribution point should use all drives except for a specific set. 在驱动器的根目录上创建一个名为 NO_SMS_ON_DRIVE.SMS 的空文件可防止此行为。Prevent this behavior by creating an empty file on the root of the drive, called NO_SMS_ON_DRIVE.SMS. 在 Configuration Manager 选择要使用的驱动器之前创建此文件。Place this file before Configuration Manager selects the drive for use. 如果 Configuration Manager 在驱动器的根目录上检测到此文件,那么它不会将该驱动器用于内容库。If Configuration Manager detects this file on the root of the drive, it doesn't use the drive for the content library.

疑难解答Troubleshooting

以下提示可帮助解决内容库问题:The following tips may help you troubleshoot issues with the content library:

  • 查看站点服务器上的日志(distmgr.log 和 PkgXferMgr.log)和分发点上的日志 (smsdpprov.log),获取指向故障的任何指示 。Review the logs on the site server (distmgr.log and PkgXferMgr.log) and the distribution point (smsdpprov.log) for any pointers to the failures.

  • 使用内容库资源管理器工具。Use the Content Library Explorer tool.

  • 检查其他进程(如防病毒软件)锁定的文件。Check for file locks by other processes, such as antivirus software. 所有驱动器上的内容库均不执行自动防病毒扫描,也不包含在每个驱动器上的临时分段目录 SMS_DP$ 中。Exclude the content library on all drives from automatic antivirus scans, as well as the temporary staging directory, SMS_DP$, on each drive.

  • 若要查看是否存在任何哈希不匹配的情况,请从 Configuration Manager 控制台进行包验证。To see if there are any hash mismatches, validate the package from the Configuration Manager console.

  • 最后,也可选择重新分发内容。As a last option, redistribute the content. 此操作应能解决大多数问题。This action should resolve most issues.

有关详细信息,请参阅了解和排查 Configuration Manager 中的内容分发问题For more in-depth information, see Understanding and troubleshooting content distribution in Configuration Manager.