diff options
author | djbw <dokuwiki@localhost> | 2018-10-16 18:42:45 +0000 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2024-09-26 14:36:54 -0400 |
commit | a2bc0428d886554a0965885571e45863674e38b2 (patch) | |
tree | 42eeec98ffe4da5a27642ccd567b2e94e10303a3 | |
parent | c2ebe142801dbe8564eed4fd76c9d99ac38a316d (diff) | |
download | nvdimm-a2bc0428d886554a0965885571e45863674e38b2.tar.gz |
start:
-rw-r--r-- | source/start.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/start.txt b/source/start.txt index 2401eaf..c512a27 100644 --- a/source/start.txt +++ b/source/start.txt @@ -337,6 +337,30 @@ The command above works around this by first converting the multiple namespace o We then structure the rest of the ''jq'' command to operate on normal objects, and it works whether we have one namespace or many. +==== Persistent Naming ==== +---- +The device names chosen by the kernel are subject to creation order and discovery order. Environments can not rely the kernel name being consistent from one boot to the next. For the most part they do not change if the configuration stays static, but if a permanent name is needed use /dev/disk/by-id. Recent versions of udev deploy the following udev rule in 60-persistent-storage.rules: +<code> +# PMEM devices +KERNEL=="pmem*", ENV{DEVTYPE}=="disk", ATTRS{uuid}=="?*", SYMLINK+="disk/by-id/pmem-$attr{uuid}" +</code> + +This rule yields symlinks like the following to be created for namespaces defined by labels: + +<code> +ls -l /dev/disk/by-id/* + lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-206dcdfe-69b7-4e86-a01b-f540621ce62e -> ../../pmem1.2 + lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-73840bf1-4e74-4ba4-a9c8-8248934c07c8 -> ../../pmem1.1 + lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-8137bdfd-3c4d-4b26-b326-21da3d4cd4e5 -> ../../pmem1.4 + lrwxrwxrwx 1 root root 13 Jul 9 15:24 pmem-f43d1b6e-3300-46cb-8afc-06d66a7c16f6 -> ../../pmem1.3 +</code> + +The persistent name for a pmem namespace is then listed in /etc/fstab like so: +<code> +/dev/pmem-206dcdfe-69b7-4e86-a01b-f540621ce62e /mnt/pmem xfs defaults,dax 1 2 +</code> + + ==== Partitions ==== ---- You can divide raw, sector, and fsdax devices (/dev/pmemN and /dev/pmemNs) into partitions. |