K
K
kelevra2014-05-31 12:53:08
FreeBSD
kelevra, 2014-05-31 12:53:08

USB stick mirror on FreeBSD 10

Hello. I'm trying to make a bootable mirror out of two usb sticks. Flash drives are ordinary, 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<NO_6_BYTE>

If you make a scrub pool from one flash drive (without a mirror), then everything 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 when I attach the second flash drive to the mirror, the horror begins:
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 flash drives are fresh from the store. I tested them through dd: one by one about 33 mb / s read and about 25 mb / s write. If using dd to write and / or read them at the same time, then the speed is lower, but still acceptable: about 17-20 mb / s. The operating system is "FreeBSD 10.0-STABLE #0 r266463: Tue May 20 18:24:03 UTC 2014". The adra configuration is quite 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
Hardware - desktop mothers with Intel 82801G (ICH7) USB controller on the first computer and Intel PCH USB 2.0 controller on the second computer. I also tried to insert an additional VIA VT6202 USB 2.0 PCI controller to separate the flash drives into different controllers, but that did not help.
I also tried gmirror on these two sticks. It rebuilds at a high speed like 20-30 mb/s, but when I run restore on the mirror (of course, after the end of the rebuild), the same horror appears in the form of 100-200 kb/s per write.
In general, is it possible to build such a mirror as I want in Fra, or do I want a lot from the usual penny desktop iron? If this is still possible, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kelevra, 2014-07-21
@kelevra

I ask myself, I answer:

  1. Flash drives are very bad.
    [[email protected]/15:13:33]
    raven$ sudo dd if=/dev/zero of=/dev/da7 bs=512
    ^C1248+0 records in
    1247+0 records out
    638464 bytes transferred in 31.285647 secs (20408 bytes/sec)
    [[email protected]/15:14:33]
    raven$ sudo dd if=/dev/zero of=/dev/da7 bs=1024
    ^C1356+0 records in
    1355+0 records out
    1387520 bytes transferred in 31.484652 secs (44070 bytes/sec)
    [[email protected]/15:15:48]
    raven$ sudo dd if=/dev/zero of=/dev/da7 bs=2048
    ^C1256+0 records in
    1255+0 records out
    2570240 bytes transferred in 23.480575 secs (109462 bytes/sec)
    I changed them to sandisk extreme according to the information from the site and everything started up.
  2. there was another problem - freezing when trying to turn off the server. but there was also a solution .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question