From owner-freebsd-usb@FreeBSD.ORG Sat May 31 15:17:17 2014 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B90A6B7D for ; Sat, 31 May 2014 15:17:17 +0000 (UTC) Received: from mail-yk0-x230.google.com (mail-yk0-x230.google.com [IPv6:2607:f8b0:4002:c07::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A76C213D for ; Sat, 31 May 2014 15:17:17 +0000 (UTC) Received: by mail-yk0-f176.google.com with SMTP id q9so2458492ykb.7 for ; Sat, 31 May 2014 08:17:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=PQ7VYIaSkmm10lN47bHvqVfWUhy2LO9mdXZjElDhO6E=; b=oZzfggA30WC8YhWXKU3Cw58ObFQ0AhyaHPzyg6n6EJDv65f+Gtx/xD+5zrwHjehsS/ aIvBYktESPf/+N7W8Ry7jCHeuOZ/pul4wq+dczagMol2lzma2rbZomTAkrl9lny/YZRC VwELQq4vc6T/fdlFO0c0uhisHEzC1CFFJ80z7elF4dQJ3y+6XBOKNSuR8uauK7zQzmZM XXlqSSqs9jbfTtVgtwwlnR+WJWC+8C5OUrxGo7N68oA5YvMRcnZfo95EYw91E9Ro4ZpA aKkZmursnVWkCs77sc6cFvi6kw1nNZ57UXc/avjVgSA2JrzNcUdK76RDl3E5Sm5r+plu 2Yww== MIME-Version: 1.0 X-Received: by 10.236.228.40 with SMTP id e38mr33203381yhq.76.1401549436442; Sat, 31 May 2014 08:17:16 -0700 (PDT) Received: by 10.170.206.130 with HTTP; Sat, 31 May 2014 08:17:16 -0700 (PDT) Date: Sat, 31 May 2014 21:17:16 +0600 Message-ID: Subject: mirror (ZFS, gmirror) on USB sticks From: Dmitry Sukhodoyev To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 May 2014 15:17:17 -0000 Hello. wblock@ has suggest ask here ( https://forums.freebsd.org/viewtopic.php?f=48&t=46673&p=260858#p260870) . I am trying to build a bootable ZFS mirror on two USB-sticks. The sticks are nothing special: May 31 07:47:28 vmstor kernel: da0 at umass-sim0 bus 0 scbus3 target 0 lun 0 May 31 07:47:28 vmstor kernel: da0: < UFD 3.0 Silicon-Power16G PMAP> Removable Direct Access SCSI-6 device May 31 07:47:28 vmstor kernel: da0: Serial Number P1312160070B3C53D05D7171 May 31 07:47:28 vmstor kernel: da0: 40.000MB/s transfers May 31 07:47:28 vmstor kernel: da0: 15120MB (30965760 512 byte sectors: 255H 63S/T 1927C) May 31 07:47:28 vmstor kernel: da0: quirks=0x2 Scrub single stick is fine: scan: scrub in progress since Sat May 31 08:36:45 2014 461M scanned out of 2,87G at 25,6M/s, 0h1m to go 0 repaired, 15,71% done But I got the drama, when I attach second stick: scan: resilver in progress since Sat May 31 07:49:55 2014 242M scanned out of 2,87G at 122K/s, 6h17m to go 242M resilvered, 8,25% done Both sticks are new. I tested it both with dd: single speed is about 33 Mbytes/s read and 25 Mbytes/s write. Simultaneously to both sticks read/write, read/read, write/write by dd is lower, but still acceptable: about 17-20 Mbytes/s. My system is FreeBSD 10.0-STABLE #0 r266463: Tue May 20 18:24:03 UTC 2014. Kernel configuration is pretty simple: include GENERIC ident vmstor nooptions INET6 nooptions AHC_REG_PRETTY_PRINT nooptions AHD_REG_PRETTY_PRINT options CONSPEED=19200 options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=512 options IPFIREWALL_DEFAULT_TO_ACCEPT options IPDIVERT options DUMMYNET options SHMMAXPGS=65536 options SEMMNI=128 options SEMMNS=32000 options SEMUME=40 options SEMMNU=120 options SEMOPM=250 options SEMMSL=250 options SHMMNI=4096 options SHMSEG=4096 options MAXDSIZ="(1024*1027*1024)" options MAXSSIZ="(1024*1024*1024)" options DFLDSIZ="(1024*1024*1024)" options SHMMAX=2147483647 options SHMALL=2097152 Physcal hardware is desktop mainboards with Intel 82801G (ICH7) USB controller on first, and Intel PCH USB 2.0 controller on second computer. Also I bought VIA VT6202 USB 2.0 PCI controller to split sticks to different controllers on mainboard, but results are the same. I also tried gmirror with these sticks. It's rebuilding with high speed like 20-30 Mbytes/s, but dump/restore speed of my root filesystem to mirror of sticks (sure, after rebuild is finished) is same 100-200 KBytes per second. Is task to mirror data on USB sticks with FreeBSD possible? What did I do wrong?