Skip to content

pmem2_badblock/TEST1 #5606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
osalyk opened this issue Apr 25, 2023 · 1 comment · Fixed by #5611
Closed

pmem2_badblock/TEST1 #5606

osalyk opened this issue Apr 25, 2023 · 1 comment · Fixed by #5611
Labels
Type: Bug A previously unknown bug in PMDK Type: External Bug A bug not in PMDK

Comments

@osalyk
Copy link
Contributor

osalyk commented Apr 25, 2023

pmem2_badblock test1 change permission on device dax
image

@osalyk osalyk added the Type: Bug A previously unknown bug in PMDK label Apr 25, 2023
@grom72
Copy link
Contributor

grom72 commented Apr 25, 2023

The root cause is sudo ndctl clear-errors namespace0.2 that is used in RUNTESTS.py -> badblocks.py
It clears not only bad blocks but also devdax attributes.

[tgromadz@wp162 test]$ ls -la /dev/dax*
crwxrwxrwx 1 root root 252, 11 Apr 21 13:27 /dev/dax0.0
crwxrwxrwx 1 root root 252, 12 Apr 21 13:27 /dev/dax0.1
crwxrwxrwx 1 root root 252, 21 Apr 25 13:17 /dev/dax0.2
crwxrwxrwx 1 root root 252, 14 Apr 21 13:27 /dev/dax0.3
crwxrwxrwx 1 root root 252, 15 Apr 21 13:27 /dev/dax0.4
crwxrwxrwx 1 root root 252, 16 Apr 21 13:28 /dev/dax0.5
crwxrwxrwx 1 root root 252, 17 Apr 21 13:28 /dev/dax0.6
crwxrwxrwx 1 root root 252, 18 Apr 21 13:28 /dev/dax0.7
crwxrwxrwx 1 root root 252, 19 Apr 21 13:28 /dev/dax0.8
[tgromadz@wp162 test]$ sudo ndctl clear-errors namespace0.2
{
  "dev":"namespace0.2",
  "mode":"devdax",
  "map":"dev",
  "size":6339690496,
  "uuid":"a5786daa-5025-4f58-8406-b8c798b5a49e",
  "chardev":"dax0.2",
  "align":2097152
}
cleared 1 namespace
[tgromadz@wp162 test]$ ls -la /dev/dax*
crwxrwxrwx 1 root root 252, 11 Apr 21 13:27 /dev/dax0.0
crwxrwxrwx 1 root root 252, 12 Apr 21 13:27 /dev/dax0.1
crw------- 1 root root 252, 13 Apr 25 13:20 /dev/dax0.2
crwxrwxrwx 1 root root 252, 14 Apr 21 13:27 /dev/dax0.3
crwxrwxrwx 1 root root 252, 15 Apr 21 13:27 /dev/dax0.4
crwxrwxrwx 1 root root 252, 16 Apr 21 13:28 /dev/dax0.5
crwxrwxrwx 1 root root 252, 17 Apr 21 13:28 /dev/dax0.6
crwxrwxrwx 1 root root 252, 18 Apr 21 13:28 /dev/dax0.7
crwxrwxrwx 1 root root 252, 19 Apr 21 13:28 /dev/dax0.8
[tgromadz@wp162 test]$ ls -la /sys/bus/nd/devices/ndbus*/region*/dax*/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.0/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.1/resource
-r-------- 1 root root 4096 Apr 25 13:20 /sys/bus/nd/devices/ndbus0/region0/dax0.2/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.3/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.4/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.5/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.6/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.7/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.8/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region0/dax0.9/resource
-r--r--r-- 1 root root 4096 Apr 21 13:28 /sys/bus/nd/devices/ndbus0/region1/dax1.0/resource

ldorau added a commit to ldorau/pmdk that referenced this issue Apr 27, 2023
The "sudo ndctl clear-errors" command resets permissions
of DAX block device and its resource files,
because it removes the old files and creates new ones
with default permissions, so their permissions have to be updated.

Ref: pmem#5606

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
ldorau added a commit to ldorau/pmdk that referenced this issue Apr 27, 2023
The "sudo ndctl clear-errors" command resets permissions
of DAX block device and its resource files,
because it removes the old files and creates new ones
with default permissions, so their permissions have to be updated.

Ref: pmem#5606

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
ldorau added a commit to ldorau/pmdk that referenced this issue May 5, 2023
The "sudo ndctl clear-errors" command resets permissions
of the DAX block device and its resource files
because it removes the old files and creates new ones
with default permissions which interrupts further test execution.
The following commands set permissions which should allow
further test execution to work around this issue.

Ref: pmem#5606

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
ldorau added a commit to ldorau/pmdk that referenced this issue May 5, 2023
The "sudo ndctl clear-errors" command resets permissions
of the DAX block device and its resource files
because it removes the old files and creates new ones
with default permissions which interrupts further test execution.
The following commands set permissions which should allow
further test execution to work around this issue.

Ref: pmem#5606

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
@grom72 grom72 closed this as completed May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug A previously unknown bug in PMDK Type: External Bug A bug not in PMDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants