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

direct mode: volumes not removed completely #472

@pohly

Description

@pohly

When creating and deleting a volume in direct mode, it's namespace remains in "inactive" state. In that state it is found by pmemNdctl.getDevice from pkg/pmem-device-manager/pmd-ndctl.go, which prevents creating another volume with that name.

I'm not sure what to expect here: should the namespace be gone completely? Or should it be ignored and overwritten when the name is used again?

To reproduce:

->

1
[
  {
    "dev":"namespace0.0",
    "mode":"raw",
    "size":0,
    "uuid":"00000000-0000-0000-0000-000000000000",
    "sector_size":512,
    "state":"disabled"
  }
]
2
[
  {
    "dev":"namespace0.1",
    "mode":"raw",
    "size":0,
    "uuid":"00000000-0000-0000-0000-000000000000",
    "sector_size":512,
    "state":"disabled"
  },
  {
    "dev":"namespace0.0",
    "mode":"raw",
    "size":0,
    "uuid":"00000000-0000-0000-0000-000000000000",
    "sector_size":512,
    "state":"disabled",
    "name":"test-dev"
  }
]
3
[
  {
    "dev":"namespace0.2",
    "mode":"raw",
    "size":0,
    "uuid":"00000000-0000-0000-0000-000000000000",
    "sector_size":512,
    "state":"disabled"
  },
  {
    "dev":"namespace0.0",
    "mode":"raw",
    "size":0,
    "uuid":"00000000-0000-0000-0000-000000000000",
    "sector_size":512,
    "state":"disabled",
    "name":"88e0e66821229cbc2079a486ac77cf0e33a2f655"
  }
]

While the two example volumes were active, they were listed as:

3
[
  {
    "dev":"namespace0.2",
    "mode":"raw",
    "size":0,
    "uuid":"00000000-0000-0000-0000-000000000000",
    "sector_size":512,
    "state":"disabled"
  },
  {
    "dev":"namespace0.1",
    "mode":"fsdax",
    "map":"dev",
    "size":4294967296,
    "uuid":"c05515e8-0ba3-11ea-b052-0242ac110005",
    "sector_size":512,
    "align":1073741824,
    "blockdev":"pmem0.1",
    "name":"83704ecc919dfe1f22f8600440f79b5bfdfa2a19"
  },
  {
    "dev":"namespace0.0",
    "mode":"fsdax",
    "map":"dev",
    "size":4294967296,
    "uuid":"c043a939-0ba3-11ea-b052-0242ac110005",
    "sector_size":512,
    "align":1073741824,
    "blockdev":"pmem0",
    "name":"88e0e66821229cbc2079a486ac77cf0e33a2f655"
  }
]

Note that only one remains behind as inactive.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions