Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

more flexible tracking of namespaces used by PMEM-CSI #475

Open
pohly opened this issue Nov 22, 2019 · 2 comments
Open

more flexible tracking of namespaces used by PMEM-CSI #475

pohly opened this issue Nov 22, 2019 · 2 comments
Labels
future needs to be fixed in some future release

Comments

@pohly
Copy link
Contributor

pohly commented Nov 22, 2019

LVM mode uses "pmem-csi" as name. Direct mode uses some number ("3139354fcdce525afc802bc0d64203a6fa41f9e3"). Example of using first LVM mode on a node, then two volumes with direct mode:

$ _work/pmem-govm/ssh.2 sudo ndctl list -RN 
{
  "regions":[
    {
      "dev":"region0",
      "size":68717379584,
      "available_size":24693964800,
      "max_available_extent":24693964800,
      "type":"pmem",
      "iset_id":10248187106440278,
      "persistence_domain":"unknown",
      "namespaces":[
        {
          "dev":"namespace0.2",
          "mode":"fsdax",
          "map":"dev",
          "size":1073741824,
          "uuid":"371c52c9-0d06-11ea-946f-0242ac110004",
          "sector_size":512,
          "align":1073741824,
          "blockdev":"pmem0.2",
          "name":"3139354fcdce525afc802bc0d64203a6fa41f9e3"
        },
        {
          "dev":"namespace0.4",
          "mode":"fsdax",
          "map":"dev",
          "size":1073741824,
          "uuid":"37123a03-0d06-11ea-946f-0242ac110004",
          "sector_size":512,
          "align":1073741824,
          "blockdev":"pmem0.4",
          "name":"287ff2808e47b7d266f601c129c0640251970262"
        },
        {
          "dev":"namespace0.1",
          "mode":"sector",
          "size":6435082240,
          "uuid":"bf300d93-0d05-11ea-aeb1-0242ac110004",
          "sector_size":4096,
          "blockdev":"pmem0.1s",
          "name":"pmem-csi"
        },
        {
          "dev":"namespace0.0",
          "mode":"fsdax",
          "map":"dev",
          "size":32212254720,
          "uuid":"befdd91f-0d05-11ea-aeb1-0242ac110004",
          "sector_size":512,
          "align":1073741824,
          "blockdev":"pmem0",
          "name":"pmem-csi"
        }
      ]
    }
  ]
}

This can be a bit confusing. In Kubernetes, we have:

$ kubectl get pvc
NAME                STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE
pmem-csi-pvc-ext4   Bound    pvc-9fb9bb27-89c6-4108-bed7-161ed9056822   1Mi        RWO            pmem-csi-sc-ext4   5m48s
pmem-csi-pvc-xfs    Bound    pvc-bee4559b-5b14-4c50-8892-57ce130a31ad   1Mi        RWO            pmem-csi-sc-xfs    5m48s

Some potential ideas for enhancing this:
[] use "pmem-csi-" as prefix in direct mode, more visibly correlate the namespace with some identifier (PV name?) in Kubernetes
[] describe ndctl and LVM output for various scenarios, to assist users with troubleshooting
[] enhance unit tests so that they catch the bug in #420 (comment) and others: set up various scenarios for PMEM usage on a host and check that PMEM-CSI in direct mode handles them correctly
[] also add other scenarios for PMEM-CSI in LVM mode
[] describe and test migration scenarios for going back and forth from LVM mode to direct mode
[] support mixing both modes, potentially even on the same host (?) - might be too complicated

@okartau
Copy link
Contributor

okartau commented Nov 22, 2019

describe and test migration scenarios for going back and forth from LVM mode to direct mode

We have chapter "Notes about switching device mode" in DEVELOPMENT that addresses most typical issues there. It's brief and can be expanded.

@pohly
Copy link
Contributor Author

pohly commented Nov 22, 2019

We have chapter "Notes about switching device mode" in DEVELOPMENT that addresses most typical issues there. It's brief and can be expanded.

Good, so we have something to start with. We just need to move it into a section for admins.

@pohly pohly added the future needs to be fixed in some future release label May 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
future needs to be fixed in some future release
Projects
None yet
Development

No branches or pull requests

2 participants