Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Dec 2019 08:28:01 +0100
From:      Gary Jennejohn <gljennjohn@gmail.com>
To:        Tomasz CEDRO <tomek@cedro.info>
Cc:        Anatoly <anatoly@kazanfieldhockey.ru>, Polytropon <freebsd@edvax.de>, "freebsd-usb@FreeBSD.org" <freebsd-usb@freebsd.org>
Subject:   Re: pendrive clone impossible ?
Message-ID:  <20191201082801.6a8c7639@ernst.home>
In-Reply-To: <CAFYkXj=OdpDf7hzCrYzmFMqRObdzqj=KkY863UG3nhWbnnRtKA@mail.gmail.com>
References:  <CAFYkXjkHobPfNwCL3ssL98TgUjE=jvojXACH%2BiR0EV-tzK-pxA@mail.gmail.com> <20191130223322.1028feab.freebsd@edvax.de> <CAFYkXjk3HOmfXkd=L2CYpbV9=YmzP_dP1RxS37D817iW_Bqftg@mail.gmail.com> <20191130234900.81464b43.freebsd@edvax.de> <CAFYkXj=8md=Lv-N9CLLZ=kU%2BaEE8VZGVu=3kQTWnvqbGi6tmQA@mail.gmail.com> <20191201050341.4a02879a@asd2> <CAFYkXj=OdpDf7hzCrYzmFMqRObdzqj=KkY863UG3nhWbnnRtKA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 1 Dec 2019 03:52:50 +0100
Tomasz CEDRO <tomek@cedro.info> wrote:

> On Sun, Dec 1, 2019 at 3:03 AM Anatoly  wrote:
> > I've had a problem in the past with one of the first 32GB pendrives.
> > Not quite similar problem, but may it be buggy RAM cache
> > implementation too? What if:
> > - Write sector(s)
> > - usbconfig -d <your_bus>.<your_dev> power_off
> > - usbconfig -d <your_bus>.<your_dev> power_on
> > - Read and compare.
> >
> > As you saying some writes was succeful, some not. May it
> > depend not on source of that bytes or their content, but on time passed
> > between write and read?
> >
> > It turns out that Transcend pendrive I've got in 2010 had RAM cache
> > (didn't remember exact cache size I measured out, as I remember
> > something around 128K-512K), and all writes was cached. This amazingly
> > speeds up random R/W fs operations in comparation with similar
> > pendrives of those years, but I constantly losing the data and getting
> > fs corrupted when used it with OSes that do not "power_off" or
> > "suspend" that drive before I pull of it out of the socket.  
> 
> The first pendrive is physically smaller Kingston slower and more
> expensive. The second Kingston (the one with write problems) is
> physically bigger 30% cheaper and a bit faster (50% read, 10% write,
> but not as advertised 2x read, 4x write). If its cheaper and faster
> then Kingston is bullshitting their clients. Also one of their workers
> admitted that they have various vendors of flash controllers and
> different firmware among them. so their products looks more like a
> lottery. Not cool.
> 
> Thank you Anatoly! It looks then like a pendrive faulty tricky design
> to fool users with exaggerated read/w/rite speeds.
> 

The geom code protects certain parts of the data area on the
drive, in particular GPT/MBR areas, unless ``sysctl
kern.geom.debugflags=16'' is run beforehand.  One can see this in
many places in the geom code.

I always set this sysctl when I know I'm going to overwrite the
first sectors of a drive.

-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191201082801.6a8c7639>