128616d01SMatthew Dillon.\" Copyright (c) 2012-2021 The DragonFly Project. All rights reserved. 228616d01SMatthew Dillon.\" 328616d01SMatthew Dillon.\" This code is derived from software contributed to The DragonFly Project 428616d01SMatthew Dillon.\" by Matthew Dillon <dillon@backplane.com> 528616d01SMatthew Dillon.\" 628616d01SMatthew Dillon.\" Redistribution and use in source and binary forms, with or without 728616d01SMatthew Dillon.\" modification, are permitted provided that the following conditions 828616d01SMatthew Dillon.\" are met: 928616d01SMatthew Dillon.\" 1028616d01SMatthew Dillon.\" 1. Redistributions of source code must retain the above copyright 1128616d01SMatthew Dillon.\" notice, this list of conditions and the following disclaimer. 1228616d01SMatthew Dillon.\" 2. Redistributions in binary form must reproduce the above copyright 1328616d01SMatthew Dillon.\" notice, this list of conditions and the following disclaimer in 1428616d01SMatthew Dillon.\" the documentation and/or other materials provided with the 1528616d01SMatthew Dillon.\" distribution. 1628616d01SMatthew Dillon.\" 3. Neither the name of The DragonFly Project nor the names of its 1728616d01SMatthew Dillon.\" contributors may be used to endorse or promote products derived 1828616d01SMatthew Dillon.\" from this software without specific, prior written permission. 1928616d01SMatthew Dillon.\" 2028616d01SMatthew Dillon.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2128616d01SMatthew Dillon.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2228616d01SMatthew Dillon.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 2328616d01SMatthew Dillon.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 2428616d01SMatthew Dillon.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 2528616d01SMatthew Dillon.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 2628616d01SMatthew Dillon.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 2728616d01SMatthew Dillon.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 2828616d01SMatthew Dillon.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2928616d01SMatthew Dillon.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 3028616d01SMatthew Dillon.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3128616d01SMatthew Dillon.\" SUCH DAMAGE. 3228616d01SMatthew Dillon.\" 3328616d01SMatthew Dillon.Dd October 30, 2021 3428616d01SMatthew Dillon.Dt XDISK 4 3528616d01SMatthew Dillon.Os 3628616d01SMatthew Dillon.Sh NAME 3728616d01SMatthew Dillon.Nm xdisk 3828616d01SMatthew Dillon.Nd Remote disk block device dmsg service 3928616d01SMatthew Dillon.Sh SYNOPSIS 4028616d01SMatthew DillonTo compile this driver into the kernel, 4128616d01SMatthew Dillonplace the following line in your 4228616d01SMatthew Dillonkernel configuration file: 4328616d01SMatthew Dillon.Bd -ragged -offset indent 4428616d01SMatthew Dillon.Cd "device xdisk" 4528616d01SMatthew Dillon.Ed 4628616d01SMatthew Dillon.Pp 4728616d01SMatthew DillonAlternatively, to load the driver as a 4828616d01SMatthew Dillonmodule at boot time, place the following line in 4928616d01SMatthew Dillon.Xr loader.conf 5 : 5028616d01SMatthew Dillon.Bd -literal -offset indent 5128616d01SMatthew Dillonxdisk_load="YES" 5228616d01SMatthew Dillon.Ed 5328616d01SMatthew Dillon.Pp 5428616d01SMatthew DillonNote that 5528616d01SMatthew Dillon.Dx 5628616d01SMatthew Dillondoes not compile this driver into the kernel by default. 5728616d01SMatthew Dillon.Pp 5828616d01SMatthew DillonSince the userland hammer2 service daemon must be running, you cannot use 5928616d01SMatthew Dillonxdisk block devices as boot devices. 6028616d01SMatthew Dillon.Sh DESCRIPTION 6128616d01SMatthew DillonThe 6228616d01SMatthew Dillon.Nm 6328616d01SMatthew Dillondriver exports local block devices and imports remote block devices. 6428616d01SMatthew DillonThe devices show up under 6528616d01SMatthew Dillon.Pa /dev/xa* , 6628616d01SMatthew Dillon.Pa /dev/serno , 6728616d01SMatthew Dillon.Pa /dev/by-label , 6828616d01SMatthew Dillonand 6928616d01SMatthew Dillon.Pa /dev/*-by-uuid . 7028616d01SMatthew DillonIt is recommended that all drive references go via 7128616d01SMatthew Dillon.Pa /dev/serno , 7228616d01SMatthew Dillon.Pa /dev/by-label , 7328616d01SMatthew Dillonor 7428616d01SMatthew Dillon.Pa /dev/*-by-uuid . 7528616d01SMatthew DillonThe 7628616d01SMatthew Dillon.Pa /dev/xa* 7728616d01SMatthew Dillonpaths can change at a whim depending on the order of operations. 7828616d01SMatthew Dillon.Pp 7928616d01SMatthew DillonIf a device goes away or the connection is lost, the device entry 8028616d01SMatthew Dillonremains until the ref-count drops to 0. 8128616d01SMatthew DillonAny active I/O will hard-block. 8228616d01SMatthew DillonResumption of the connection resumes operations where they left off. 8328616d01SMatthew DillonNo I/O requests are lost. 8428616d01SMatthew DillonThe driver is robust across reconnection, crashes, and reboots, but 8528616d01SMatthew Dillonpossibly not across power failures if the target drive loses buffered 8628616d01SMatthew Dillonwrite data for completed I/Os. 8728616d01SMatthew Dillon.Pp 8828616d01SMatthew DillonOver a 1Gbe network, synchronous D1 latency still allows for around 89*538f7f56SSascha Wildner30-40 MBytes/sec. 90*538f7f56SSascha WildnerFilesystem mounts can usually max-out the line rate 9128616d01SMatthew Dillon(in excess of 100 MBytes/sec) due to filesystem read-ahead and write 9228616d01SMatthew Dillonbuffering. 9328616d01SMatthew Dillon.Pp 9428616d01SMatthew DillonThe 9528616d01SMatthew Dillon.Xr hammer2 8 9628616d01SMatthew Dillonservice daemon is used as an intermediary and must be running on all 9728616d01SMatthew Dillonmachines in question. 9828616d01SMatthew Dillon.Sh SEE ALSO 9928616d01SMatthew Dillon.Xr ahci 4 , 100*538f7f56SSascha Wildner.Xr nvme 4 , 101*538f7f56SSascha Wildner.Xr hammer2 8 10228616d01SMatthew Dillon.Sh HISTORY 10328616d01SMatthew DillonThe 10428616d01SMatthew Dillon.Nm 10528616d01SMatthew Dillondriver has been in the source tree a while 10628616d01SMatthew Dillonbut is now automatically built and part of base as of 10728616d01SMatthew Dillon.Dx 6.1 . 10828616d01SMatthew Dillon.Sh AUTHORS 10928616d01SMatthew Dillon.An -nosplit 11028616d01SMatthew DillonThe 11128616d01SMatthew Dillon.Nm 11228616d01SMatthew Dillondriver was written by 11328616d01SMatthew Dillon.An Matthew Dillon Aq Mt dillon@backplane.com 114