xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-block-rnbd (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/block/rnbd<N>/rnbd/unmap_device
2*4882a593SmuzhiyunDate:		Feb 2020
3*4882a593SmuzhiyunKernelVersion:	5.7
4*4882a593SmuzhiyunContact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
5*4882a593SmuzhiyunDescription:	To unmap a volume, "normal" or "force" has to be written to:
6*4882a593Smuzhiyun		/sys/block/rnbd<N>/rnbd/unmap_device
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun		When "normal" is used, the operation will fail with EBUSY if any process
9*4882a593Smuzhiyun		is using the device.  When "force" is used, the device is also unmapped
10*4882a593Smuzhiyun		when device is in use.  All I/Os that are in progress will fail.
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun		Example::
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun		  # echo "normal" > /sys/block/rnbd0/rnbd/unmap_device
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunWhat:		/sys/block/rnbd<N>/rnbd/state
17*4882a593SmuzhiyunDate:		Feb 2020
18*4882a593SmuzhiyunKernelVersion:	5.7
19*4882a593SmuzhiyunContact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
20*4882a593SmuzhiyunDescription:	The file contains the current state of the block device. The state file
21*4882a593Smuzhiyun		returns "open" when the device is successfully mapped from the server
22*4882a593Smuzhiyun		and accepting I/O requests. When the connection to the server gets
23*4882a593Smuzhiyun		disconnected in case of an error (e.g. link failure), the state file
24*4882a593Smuzhiyun		returns "closed" and all I/O requests submitted to it will fail with -EIO.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunWhat:		/sys/block/rnbd<N>/rnbd/session
27*4882a593SmuzhiyunDate:		Feb 2020
28*4882a593SmuzhiyunKernelVersion:	5.7
29*4882a593SmuzhiyunContact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
30*4882a593SmuzhiyunDescription:	RNBD uses RTRS session to transport the data between client and
31*4882a593Smuzhiyun		server.  The entry "session" contains the name of the session, that
32*4882a593Smuzhiyun		was used to establish the RTRS session.  It's the same name that
33*4882a593Smuzhiyun		was passed as server parameter to the map_device entry.
34*4882a593Smuzhiyun
35*4882a593SmuzhiyunWhat:		/sys/block/rnbd<N>/rnbd/mapping_path
36*4882a593SmuzhiyunDate:		Feb 2020
37*4882a593SmuzhiyunKernelVersion:	5.7
38*4882a593SmuzhiyunContact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
39*4882a593SmuzhiyunDescription:	Contains the path that was passed as "device_path" to the map_device
40*4882a593Smuzhiyun		operation.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunWhat:		/sys/block/rnbd<N>/rnbd/access_mode
43*4882a593SmuzhiyunDate:		Feb 2020
44*4882a593SmuzhiyunKernelVersion:	5.7
45*4882a593SmuzhiyunContact:	Jack Wang <jinpu.wang@cloud.ionos.com> Danil Kipnis <danil.kipnis@cloud.ionos.com>
46*4882a593SmuzhiyunDescription:	Contains the device access mode: ro, rw or migration.
47