Troubleshooting
The ndctl
utility is designed to be user friendly and informative. This section describes some of the common messages seen when using ndctl
.
"DAX unsupported by block device. Turning off DAX."
Issue:
During system boot or mounting of an EXT4 or XFS filesystem, the following message may be seen in dmesg:
The filesystem should still mount, but it will not have the 'dax' (Direct Access) flag set as shown by the mount command:
Solution:
Check the namespace mode using ndctl list -Nu
. In the following example the mode is 'raw':
From the ndctl-create-namespace
man page, 'raw' mode does not support DAX (Direct Access).
The namespace needs to be changed to either 'fsdax' or 'devdax' using the following:
WARNING: Changing the namespace mode will destroy any existing data. Backup all data before changing the mode.
The filesystem needs to be re-created, mounted with the 'dax' option, then any data restored:
"nmem0 is active, skipping..."
Issue:
When disabling an NVDIMM (nmem) device, a notice is displayed indicating it is active, eg:
Cause:
The message indicates there's at least one active/enabled Region and/or Namespace using the NVDIMM.
Solution:
All active/enabled Regions and Namespaces must be destroyed an/or disabled prior to disabling the dimm.
1) List the current configuration:
2) Verify no fsdax or devdax namespaces are mounted or in-use by running applications.
3) Destroy or disable the namespace(s).
4) Disable the regions used by the NVDIMM (nmem) that needs to be disabled.
5) Disable the NVDIMM (nmem).
"ndctl: error while loading shared libraries: libjson-c.so.2: cannot open shared object file: No such file or directory"
Issue:
Executing the ndctl
utility, with or without commands or options, yields the following missing library error:
Cause:
The issue could be caused by one of the following issues:
The json-c package is not installed
A version mis-match between the
json-c
andndctl
. More recent versions of json-c deliverlibjson-c.so.4
rather thanlibjson-c.so.2
.The json-c library is installed in a non-default location and the LD_LIBRARY_PATH environment variable needs to be updated.
Verify which libraries are missing from ndctl
using the ldd
utility and identifying libraries that are 'not found':
Solution:
Verify that the json-c package is installed. For example, on Fedora use dnf info --installed json-c
. If it is installed, information about the package will be displayed, eg:
If the package is not installed, a message similar to the following will be returned:
To install the json-c package if it is missing, use
To query the json-c package to identify the library version use the following:
Verify the LD_LIBRARY_PATH includes the location of libjson-c.so.*. Note: /usr/lib
and /usr/lib64
are automatically included.
If the package and LD_LIBRARY_PATH are correct, the version of ndctl will need to be updated. Using ndctl --version
won't work and will simply return "ndctl: error while loading shared libraries: libjson-c.so.2: cannot open shared object file: No such file or directory".
If the ndctl
utility was installed using the ndctl package from the operating system's repository, update the package to the latest version. On Fedora:
If the latest version within the package repository is old with no new versions available, download, compile, and install from source code. Detailed instructions can be found in the Installing NDCTL chapter.
If the ndctl
utility was previously compiled and installed using source code, download the latest version from the ndctl GitHub repository, compile, and install. Detailed instructions can be found in the Installing NDCTL chapter.
Error: namespace0.0 is active, specify --force for re-configuration
Issue:
Destroying a namespace mode may fail with the following error:
Changing a namespace mode may fail with the following error:
Cause:
The error indicates the namespace is currently active and potentially mounted (FSDAX) or in use, so the operation is not permitted.
Solution:
1) Verify the current namespace mode using ndctl list -N
to show all namespaces or filter the result by specifying namespace name using ndctl list -N namespace{X.Y}
, eg:
If the namespace mode is 'fsdax', verify any associated filesystems are unmounted.
If the namespace mode is 'devdax', verify any application using the device is stopped.
The 'fuser' command on Linux can be used to identify any running processes with the /dev/dax* or /dev/pmem* devices open.
2) Either disable the namespace prior to deleting it or changing the mode or use the -f
, --force
options to override the active status checks.
To change the mode of an active namespace without disabling it first, use the -f
, --force
option:
To delete a namespace without disabling it first, use the -f
, --force
option:
Alternatively, disable the namespace then perform the destroy/mode change operation. Note: Changing a namespace mode automatically activates it.
To change the namespace mode from 'raw' to 'fsdax':
To destroy a namespace:
"failed to create namespace: Resource temporarily unavailable"
Issue:
Creating a new namespace using 'ndctl create-namespace', may return the following error:
Cause:
There are many potential causes including:
There's no available capacity within the region because one or more namespaces exist and have consumed all the space.
The region is disabled.
There's an issue with the labels for the NVDIMMs belonging to the region.
Solution:
Use the -v
option to print more information to help identify the cause. A debug version of ndctl
may be required to get useful information. See Installing NDCTL for instructions to build ndctl
with debug options from source code.
For a scenario where there's no space left within the region, a message similar to the following will be shown:
When a region is disabled, the following will be shown:
Identifying label issues requires more investigation. Start with Validating Labels.
The Resource temporarily unavailable
message improvements is being handled by https://github.com/pmem/ndctl/issues/67
"man -k ndctl" returns "ndctl: nothing appropriate."
Issue:
When searching the short descriptions and manual page for a keyword, the man utility may return an empty set, for example:
Cause:
If you built ndctl from source, the man page indexes may not have been automatically generated for you. Additionally, if you installed ndctl to a non-default location, your $MANPATH shell environment variable may not been updated to point to to the new man page locations.
Solution:
1) Verify the current system global search paths for manual pages
2) Identify if these paths are overridden by a local MANPATH setting, for example the following shows no additional search paths
3) If the install location of ndctl is not included in the above output, add the path to your MANPATH shell environment, otherwise skip this step:
4) Manually scan and build the man page indexes
This command may take a few minutes depending on the number of search paths and man pages it has to index. The output is verbose as it scans and indexes. Once complete, it will provide a summary:
5) If the ndctl man pages were scanned and indexed, man -k ndctl
will now work as expected, eg:
Last updated