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