Skip to content

nvm-identify run error #30

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

Open
dengdui-ganan opened this issue Mar 16, 2020 · 7 comments
Open

nvm-identify run error #30

dengdui-ganan opened this issue Mar 16, 2020 · 7 comments
Assignees

Comments

@dengdui-ganan
Copy link

Hi:
I have build libnvm with:
cmake .. -DNVIDIA=/usr/src/nvidia-440.33.01
make identify
then run nvm-identify binary as follows:
1) when unbind device :
echo "0000:19:00.0" > /sys/bus/pci/devices/0000:19:00.0/driver/unbind
then run cmd with: ./bin/nvm-identify --ctrl=/dev/nvme0n1
with error: Failed to open descriptor: No such file or directory
2) when bind device:
run cmd with: ./bin/nvm-identify --ctrl=/dev/nvme0n1
with error: [map_memory] Page mapping kernel request failed: Inappropriate ioctl for device
what need i to do to fix this problem?

@enfiskutensykkel
Copy link
Owner

Hi,

You need to unbind the in-kernel NVMe driver, load the libnvm module and make sure that the device is bound to that.

echo "0000:19:00.0" > /sys/bus/pci/devices/0000:19:00.0/driver/unbind
cd modules
make && make load

Then the device file should show up as /dev/libnvm0.

@dengdui-ganan
Copy link
Author

i think i have bind device to libnvm:
lspci -s 19:00.0 -vv
with line as: Kernel driver in use: libnvm helper
when:
cd modules; make && make load
there exist error:
insmod: ERROR: could not insert module libnvm.ko: File exists
and there has /dev/libnvm0 device:
when run cmd with : ./bin/nvm-identify --ctrl=/dev/libnvm0
also has error: Floating point exception

@enfiskutensykkel
Copy link
Owner

Hi,

there exist error:
insmod: ERROR: could not insert module libnvm.ko: File exists

It appears to already be loaded, it doesn't need to be loaded again.

when run cmd with : ./bin/nvm-identify --ctrl=/dev/libnvm0
also has error: Floating point exception

I'm not sure why this happens, but it could be that it is unable to memory map controller registers. Can you please post the output of dmesg and also the output from cat /proc/cmdline .

@enfiskutensykkel enfiskutensykkel self-assigned this Mar 16, 2020
@dengdui-ganan
Copy link
Author

  • dmesg:
    **[ 2.803912] nvme nvme0: pci function 0000:19:00.0
    [ 2.804341] nvme 0000:1a:00.0: probe delay 4996 ms
    [ 2.912259] nvme nvme0: missing or invalid SUBNQN field.
    [ 2.912652] nvme nvme0: Shutdown timeout set to 8 seconds
    [ 7.900069] nvme nvme1: pci function 0000:1a:00.0
    [ 7.900538] nvme nvme2: pci function 0000:86:00.0
    [ 7.900974] nvme nvme3: pci function 0000:87:00.0
    [ 8.008241] nvme nvme1: missing or invalid SUBNQN field.
    [ 8.008649] nvme nvme2: missing or invalid SUBNQN field.
    [ 8.008650] nvme nvme1: Shutdown timeout set to 8 seconds
    [ 8.008652] nvme nvme3: missing or invalid SUBNQN field.
    [ 8.009038] nvme nvme2: Shutdown timeout set to 8 seconds
    [ 8.009429] nvme nvme3: Shutdown timeout set to 8 seconds
    [ 37.133679] XFS (nvme3n1): Mounting V5 Filesystem
    [ 37.133916] XFS (nvme1n1): Mounting V5 Filesystem
    [ 37.133998] XFS (nvme2n1): Mounting V5 Filesystem
    [ 37.134019] XFS (nvme0n1): Mounting V5 Filesystem
    [ 37.142306] XFS (nvme0n1): Starting recovery (logdev: internal)
    [ 37.142546] XFS (nvme2n1): Starting recovery (logdev: internal)
    [ 37.143469] XFS (nvme1n1): Starting recovery (logdev: internal)
    [ 37.143602] XFS (nvme3n1): Starting recovery (logdev: internal)
    [ 37.145723] XFS (nvme0n1): Ending recovery (logdev: internal)
    [ 37.146255] XFS (nvme2n1): Ending recovery (logdev: internal)
    [ 37.147190] XFS (nvme1n1): Ending recovery (logdev: internal)
    [ 37.147524] XFS (nvme3n1): Ending recovery (logdev: internal)
    [ 8761.908883] XFS (nvme0n1): Unmounting Filesystem
    [ 8761.908921] XFS (nvme0n1): metadata I/O error: block 0x2 ("xfs_buf_iodone_callback_error") error 5 numblks 1
    [ 8761.909025] XFS (nvme0n1): xfs_do_force_shutdown(0x1) called from line 1151 of file /data/rpmbuild/BUILD/kernel-4.14.105/kernel-4.14.105/fs/xfs/xfs_buf_item.c. Return address = 0xffffffffce65b36c
    [ 8761.909027] XFS (nvme0n1): I/O Error Detected. Shutting down filesystem
    [ 8761.909118] XFS (nvme0n1): Please umount the filesystem and rectify the problem(s)
    [11024.646418] XFS (nvme1n1): Unmounting Filesystem
    [11024.646454] XFS (nvme1n1): metadata I/O error: block 0x2 ("xfs_buf_iodone_callback_error") error 5 numblks 1
    [11024.646564] XFS (nvme1n1): xfs_do_force_shutdown(0x1) called from line 1151 of file /data/rpmbuild/BUILD/kernel-4.14.105/kernel-4.14.105/fs/xfs/xfs_buf_item.c. Return address = 0xffffffffce65b36c
    **
    and cat /proc/cmdline:
    BOOT_IMAGE=/boot/vmlinuz-4.14.105-19-0004 root=UUID=2c04c946-7fee-41c2-a99f-f53e2532e4f7 ro numa=off crashkernel=1800M-64G:128M,64G-:256M console=tty0 panic=5 net.ifnames=0 biosdevname=0 intel_idle.max_cstate=1 intel_pstate=disable

@enfiskutensykkel
Copy link
Owner

It appears you have unbinded the drive while it was mounted.

@dengdui-ganan
Copy link
Author

I just run:

  • echo "0000:19:00.0" > /sys/bus/pci/devices/0000:19:00.0/driver/unbind
    what i should to run it normal ?

@dengdui-ganan
Copy link
Author

and when i mount, with exception:
mount: /dev/libnvm0 is not a block device

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants