<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Repository storage paths > 原文:[https://docs.gitlab.com/ee/administration/repository_storage_paths.html](https://docs.gitlab.com/ee/administration/repository_storage_paths.html) * [Configure GitLab](#configure-gitlab) * [Choose where new repositories will be stored](#choose-where-new-repositories-will-be-stored) # Repository storage paths[](#repository-storage-paths "Permalink") 在 GitLab 8.10 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4578) . GitLab 允許您定義多個存儲庫存儲路徑(有時稱為存儲碎片),以在多個安裝點之間分配存儲負載. > **Notes:** > > * 您必須至少有一個名為`default`存儲路徑. > * 路徑在鍵值對中定義. 密鑰是一個任意名稱,您可以選擇該名稱來命名文件路徑. > * 目標目錄及其任何子路徑不得為符號鏈接. > * 目標目錄不能是另一個目錄的子目錄. 沒有嵌套. 示例:這可以: ``` default: path: /mnt/git-storage-1 storage2: path: /mnt/git-storage-2 ``` 這不行,因為它嵌套了存儲路徑: ``` default: path: /mnt/git-storage-1 storage2: path: /mnt/git-storage-1/git-storage-2 # <- NOT OK because of nesting ``` ## Configure GitLab[](#configure-gitlab "Permalink") > **警告:**為了使[備份](../raketasks/backup_restore.html)正常工作,存儲路徑**不得**為掛載點,并且 GitLab 用戶應對該路徑的父目錄具有正確的權限. 在 Omnibus GitLab 中,這是自動處理的,但是對于源代碼安裝,您應該格外小心. > > 事實是,出于兼容性原因, `gitlab.yml`與 Omnibus 具有不同的結構. 在`gitlab.yml`您指示存儲庫的路徑,例如`/home/git/repositories` ,而在 Omnibus 中,您指示`git_data_dirs` ,對于上面的示例,它是`/home/git` . 然后,Omnibus 將在該路徑下創建一個`repositories`目錄,以與`gitlab.yml`一起使用. > > 這個小細節很重要,因為在還原備份時, `/home/git/repositories`的當前內容[已移至](https://gitlab.com/gitlab-org/gitlab/blob/033e5423a2594e08a7ebcd2379bd2331f4c39032/lib/backup/repository.rb#L54-56) `/home/git/repositories.old` ,因此,如果`/home/git/repositories`是安裝點,則`mv`會移動掛載點之間發生故障,并且可能發生不良情況. 理想情況下, `/home/git`是掛載點,因此事情將在同一掛載點內移動. Omnibus 安裝可以保證這一點(因為它們沒有指定完整的存儲庫路徑,而是指定父路徑),但對于源安裝則沒有保證. 現在,您已經閱讀了上面的警告提示,讓我們編輯配置文件并添加備用存儲庫存儲路徑的完整路徑. 在下面的示例中,我們添加了另外兩個掛載點,分別稱為`nfs_1`和`nfs_2` . **Note:** This example uses NFS. We do not recommend using EFS for storage as it may impact GitLab’s performance. See the [relevant documentation](high_availability/nfs.html#avoid-using-awss-elastic-file-system-efs) for more details. **對于源安裝** 1. 編輯`gitlab.yml`并添加存儲路徑: ``` repositories: # Paths where repositories can be stored. Give the canonicalized absolute pathname. # NOTE: REPOS PATHS MUST NOT CONTAIN ANY SYMLINK!!! storages: # You must have at least a 'default' storage path. default: path: /home/git/repositories nfs_1: path: /mnt/nfs1/repositories nfs_2: path: /mnt/nfs2/repositories ``` 2. [重新啟動 GitLab,](restart_gitlab.html#installations-from-source)以使更改生效. > **注:** [`gitlab_shell: repos_path`條目](https://gitlab.com/gitlab-org/gitlab-foss/-/blob/8-9-stable/config/gitlab.yml.example#L457)中`gitlab.yml`將被棄用,取而代之的是`repositories: storages`在未來,所以如果你是從之前的版本升級 8.10,確保如在上述步驟中所描述的添加配置. 進行更改并確認它們可以使用之后,可以刪除`repos_path`行. **對于所有安裝** 1. 通過將其余路徑附加到默認路徑中來編輯`/etc/gitlab/gitlab.rb` : ``` git_data_dirs({ "default" => { "path" => "/var/opt/gitlab/git-data" }, "nfs_1" => { "path" => "/mnt/nfs1/git-data" }, "nfs_2" => { "path" => "/mnt/nfs2/git-data" } }) ``` 請注意,Omnibus 將存儲庫存儲在`git-data`目錄的`repositories`子目錄中. ## Choose where new repositories will be stored[](#choose-where-new-repositories-will-be-stored "Permalink") 設置了多個存儲路徑后,您可以在**管理區域>設置>存儲庫>存儲庫存儲>新存儲庫的存儲節點下選擇新存儲庫的存儲位置** . 可以為每個存儲分配 0 到 100 的權重. 創建新項目時,將使用這些權重來確定將在其上創建存儲庫的存儲位置. [![Choose repository storage path in Admin Area](https://img.kancloud.cn/47/b9/47b9642eb4bf96d6194cb609a70bc302_1058x869.png)](img/repository_storages_admin_ui_v13_1.png) 從 GitLab 8.13.4 開始,可以選擇多個路徑. 新存儲庫將隨機放置在所選路徑之一上.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看