이 페이지에서는 Google Distributed Cloud 클러스터의 로컬 볼륨을 구성하는 방법을 보여줍니다.
Google Distributed Cloud 클러스터는 클러스터에서 로컬 PV를 구성하는 두 가지 옵션(LVP 공유 및 LVP 노드 마운트)을 제공합니다. LVP 공유는 공유 파일 시스템의 디렉터리를 사용하지만 LVP 노드 마운트는 전용 디스크를 사용합니다.
LVP 공유
이 스토리지 클래스는 클러스터의 모든 노드에서 로컬 공유 파일 시스템의 하위 디렉터리에 의해 지원되는 로컬 PV를 만듭니다. 이러한 하위 디렉터리는 클러스터 생성 중에 자동으로 생성됩니다. 이 스토리지 클래스를 사용하는 워크로드는 PV가 동일한 공유 파일 시스템에서 지원되기 때문에 용량과 IOPS를 공유합니다. 더 나은 격리를 위해 LVP 노드 마운트를 통해 디스크를 구성하는 것이 좋습니다.
LVP 공유 구성
선택사항: 클러스터를 생성하기 전에 구성된 경로를 마운트 지점으로 사용해 디스크를 마운트하여 생성된 PV가 새 디스크 용량을 공유하고 부팅 디스크에서 격리되도록 합니다.
클러스터 CR의 lvpShare에 다음을 지정합니다.
path: 하위 디렉터리가 생성되는 각 호스트의 호스트 머신 경로입니다. 각 하위 디렉터리에 대해 로컬 PV가 생성됩니다. 기본 경로는 /mnt/localpv-share입니다.
storageClassName: 클러스터 생성 중에 PV가 만든 스토리지 클래스입니다. 기본값은 local-shared입니다.
numPVUnderSharedPath: path 아래에 만들 하위 디렉터리 수입니다.
기본값은 5입니다.
PV는 storageClassName에 지정된 스토리지 클래스로 생성됩니다. 클러스터에 생성된 총 로컬 PV 수는 numPVUnderSharedPath에 노드 수를 곱한 값입니다.
LVP 노드 마운트
이 스토리지 클래스는 구성된 디렉터리에서 마운트된 각 디스크에 대해 로컬 PV를 만듭니다. 각 PV는 기본 디스크 용량과 동일한 용량의 디스크에 매핑됩니다. 클러스터에 생성된 총 로컬 PV 수는 모든 노드의 경로 아래에 마운트된 디스크 수입니다. 클러스터를 만든 후에 마운트를 더 추가할 수 있습니다.
LVP 노드 마운트 구성
PV용 추가 디스크가 있는 노드에서 경로 아래에 각 디스크를 포맷하고 마운트합니다. 이 작업은 클러스터 생성 전이나 후에 수행할 수도 있습니다. 권장사항을 참조하세요.
인스턴스가 다시 시작될 때 기기가 자동으로 다시 마운트되도록 /etc/fstab 파일에 디스크를 추가합니다.
# Backup of your current /etc/fstab file
sudo cp /etc/fstab /etc/fstab.backup
# Use the blkid command to find the UUID for the zonal persistent disk
sudo blkid /dev/DEVICE_ID
# Edit /etc/fstab file: create an entry that includes the UUID
UUID=UUID_VALUE /mnt/localpv-disk/MNT_DIR ext4 discard,defaults,NOFAIL_OPTION 0 2
클러스터 CR의 lvpNodeMounts에 다음을 지정합니다.
path: 마운트된 디스크가 검색되고 로컬 PV가 생성되는 각 마운트의 호스트 머신 경로입니다. 기본 경로는 /mnt/localpv-disk입니다.
storageClassName: 클러스터 생성 중에 PV가 만든 스토리지 클래스입니다. 기본값은 local-disks입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-01(UTC)"],[],[],null,["This page shows you how to configure local volumes for Google Distributed Cloud\nclusters.\n\nGoogle Distributed Cloud clusters provide two options for configuring\n[local PVs](https://kubernetes.io/docs/concepts/storage/volumes/#local))\nin the cluster: LVP share and LVP node mounts. LVP share uses directories in a\nshared file system, while LVP node mounts uses dedicated disks.\n| **Caution:** Using a local PV binds the Pod to a specific disk and node. If that disk or node becomes unavailable, then the Pod also becomes unavailable. Workloads using local PVs need to be resilient to this kind of failure, and may require additional orchestration to release the Pod's PVCs and find a new, empty disk on another node.\n\nLVP share\n\nThis storage class creates a local PV backed by subdirectories in a local,\nshared file system on every node in the cluster. These subdirectories are\nautomatically created during cluster creation. Workloads using this storage\nclass will share capacity and IOPS because the PVs are backed by the same shared\nfile system. For better isolation, we recommend configuring disks through LVP\nnode mounts instead.\n\nConfigure an LVP share\n\n1. **Optional**: Before cluster creation, mount a disk using the configured path\n as a mount point so that the created PVs will share the new disk capacity and\n be isolated from the boot disk.\n\n2. Specify the following under `lvpShare` in the cluster CR:\n\n - `path`: The host machine path on each host where subdirectories are created. A local PV is created for each subdirectory. The default path is `/mnt/localpv-share`.\n - `storageClassName`: The storage class that PVs are created with during cluster creation. The default value is `local-shared`.\n - `numPVUnderSharedPath`: Number of subdirectories to create under `path`. The default value is `5`.\n\n The configuration looks similar to the following: \n\n apiVersion: baremetal.cluster.gke.io/v1\n kind: Cluster\n metadata:\n name: cluster1\n namespace: cluster-cluster1\n spec:\n storage:\n lvpShare:\n path: /mnt/localpv-share\n storageClassName: local-shared\n numPVUnderSharedPath: 5\n\nPVs are created with the storage class specified in `storageClassName`. The\ntotal number of local PVs created in the cluster is `numPVUnderSharedPath`\nmultiplied by the number of nodes.\n\nLVP node mounts\n\nThis storage class creates a local PV for each mounted disk in the configured\ndirectory. Each PV maps to a disk with capacity equal to the underlying disk\ncapacity. The total number of local PVs created in the cluster is the number of\ndisks mounted under the path across all nodes. Additional mounts can be added\nafter cluster creation.\n\nConfigure LVP node mounts\n\n1. On nodes that have extra disks for PVs, format and mount each disk under\n path. This can also be done before or after cluster creation. See\n [best practices](https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/blob/master/docs/best-practices.md).\n\n 1. List disks and find the one you want to mount:\n\n sudo lsblk\n\n 2. Format the disk, for example with single ext4 file system:\n\n sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/DEVICE_ID\n\n 3. Under the configured path, create a directory as the mount point for the\n new disk:\n\n sudo mkdir -p /mnt/localpv-disk/MNT_DIR\n\n 4. Mount the disk:\n\n sudo mount -o discard,defaults /dev/DEVICE_ID /mnt/localpv-disk/MNT_DIR &&\n sudo chmod a+w /mnt/localpv-disk/MNT_DIR\n\n 5. Add the disk to the `/etc/fstab` file, so that the device automatically\n mounts again when the instance restarts:\n\n # Backup of your current /etc/fstab file\n sudo cp /etc/fstab /etc/fstab.backup\n\n # Use the blkid command to find the UUID for the zonal persistent disk\n sudo blkid /dev/DEVICE_ID\n\n # Edit /etc/fstab file: create an entry that includes the UUID\n UUID=UUID_VALUE /mnt/localpv-disk/MNT_DIR ext4 discard,defaults,NOFAIL_OPTION 0 2\n\n2. Specify the following under `lvpNodeMounts` in cluster CR:\n\n - `path`: The host machine path for each mount where mounted disks are discovered and a local PV is created. The default path is `/mnt/localpv-disk`.\n - `storageClassName`: The storage class that PVs are created with during cluster creation. The default value is `local-disks`.\n\n The configuration looks something similar to the following: \n\n apiVersion: baremetal.cluster.gke.io/v1\n kind: Cluster\n metadata:\n name: cluster1\n namespace: cluster-cluster1\n spec:\n storage:\n lvpNodeMounts:\n path: /mnt/localpv-disk\n storageClassName: local-disks\n\n PVs are created with the storage class specified in `storageClassName`. The\n total number of PVs created is the number of disks mounted under `path`\n across all nodes.\n\nWhat's next\n\n- Learn how to [configure the default storage class](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/default-storage-class)."]]