17.6.2. 섹터 모드에서 새 NVDIMM 네임스페이스 생성
이 리전에 사용 가능한 공간이 있는 경우 빠른 블록 장치로 사용하기 위해 섹터 모드에서 NVMe(Non-Volatile Dual In-line Memory Modules) 네임스페이스를 생성할 수 있습니다.
사전 요구 사항
-
ndctl유틸리티가 설치되어 있습니다. 자세한 내용은 Installing ndctl 을 참조하십시오. NVDIMM 장치는 라벨을 지원하여 하나의 리전에 여러 네임스페이스를 생성합니다. 다음 명령을 사용하여 확인할 수 있습니다.
# ndctl read-labels nmem0 >/dev/null read 1 nmem이는 하나의 NVDIMM 장치의 라벨을 읽을 수 있음을 나타냅니다. 값이
0인 경우 장치에서 레이블을 지원하지 않음을 나타냅니다.
절차
사용 가능한 공간이 있는 시스템의
pmem리전을 나열합니다. 다음 예제에서는 region1 및 region0 리전에서 공간을 사용할 수 있습니다.# ndctl list --regions [ { "dev":"region1", "size":2156073582592, "align":16777216, "available_size":2117418876928, "max_available_extent":2117418876928, "type":"pmem", "iset_id":-9102197055295954944, "badblock_count":1, "persistence_domain":"memory_controller" }, { "dev":"region0", "size":2156073582592, "align":16777216, "available_size":2143188680704, "max_available_extent":2143188680704, "type":"pmem", "iset_id":736272362787276936, "badblock_count":3, "persistence_domain":"memory_controller" } ]사용 가능한 리전 중 하나에 하나 이상의 네임스페이스를 할당합니다.
# ndctl create-namespace --mode=sector --region=regionN --size=namespace-size예 17.2. region0에 36GiB 섹터 네임스페이스 생성
# ndctl create-namespace --mode=sector --region=region0 --size=36G { "dev":"namespace0.1", "mode":"sector", "size":"35.96 GiB (38.62 GB)", "uuid":"ff5a0a16-3495-4ce8-b86b-f0e3bd9d1817", "sector_size":4096, "blockdev":"pmem0.1s" }새 네임스페이스를
/dev/pmem0.1s로 사용할 수 있습니다.
검증
새 네임스페이스가 섹터 모드에서 생성되었는지 확인합니다.
# ndctl list -RN -n namespace0.1 { "regions":[ { "dev":"region0", "size":2156073582592, "align":16777216, "available_size":2104533975040, "max_available_extent":2104533975040, "type":"pmem", "iset_id":736272362787276936, "badblock_count":3, "persistence_domain":"memory_controller", "namespaces":[ { "dev":"namespace0.1", "mode":"sector", "size":38615912448, "uuid":"ff5a0a16-3495-4ce8-b86b-f0e3bd9d1817", "sector_size":4096, "blockdev":"pmem0.1s" } ] } ] }