summaryrefslogtreecommitdiffstats
path: root/doc/rbd/nvmeof-initiator-linux.rst
blob: 4889e4132c1e8830e14fca6872b829cf7e90c5f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
==============================
 NVMe/TCP Initiator for Linux
==============================

Prerequisites
=============

- Kernel 5.0 or later
- RHEL 9.2 or later
- Ubuntu 24.04 or later
- SLES 15 SP3 or later

Installation
============

1. Install the nvme-cli:

   .. prompt:: bash #
   
      yum install nvme-cli

2. Load the NVMe-oF module:

   .. prompt:: bash # 
   
      modprobe nvme-fabrics

3. Verify the NVMe/TCP target is reachable:

   .. prompt::  bash #
   
      nvme discover -t tcp -a GATEWAY_IP -s 4420

4. Connect to the NVMe/TCP target:

   .. prompt:: bash #
   
      nvme connect -t tcp -a GATEWAY_IP -n SUBSYSTEM_NQN

Next steps
==========

Verify that the initiator is set up correctly:

1. List the NVMe block devices:

   .. prompt:: bash #
   
      nvme list

2. Create a filesystem on the desired device:

   .. prompt:: bash #
   
      mkfs.ext4 NVME_NODE_PATH

3. Mount the filesystem:

   .. prompt:: bash #
   
      mkdir /mnt/nvmeof

   .. prompt:: bash #
   
      mount NVME_NODE_PATH /mnt/nvmeof

4. List the NVME-oF files:

   .. prompt:: bash #
   
      ls /mnt/nvmeof

5. Create a text file in the ``/mnt/nvmeof`` directory:

   .. prompt:: bash #
   
      echo "Hello NVME-oF" > /mnt/nvmeof/hello.text

6. Verify that the file can be accessed:

   .. prompt:: bash #
   
      cat /mnt/nvmeof/hello.text