[LAU] OT: Bash help to check new USB keys.

Kaza Kore dj_kaza at hotmail.com
Thu Jul 9 10:12:50 UTC 2015



> Date: Wed, 8 Jul 2015 14:22:06 -0500
> Subject: Re: [LAU] OT: Bash help to check new USB keys.
> From: czhenry at gmail.com
> To: dj_kaza at hotmail.com
> CC: f.rech at yahoo.fr; linux-audio-user at lists.linuxaudio.org
> 
> On Wed, Jul 8, 2015 at 1:48 PM, Kaza Kore <dj_kaza at hotmail.com> wrote:
> > Date: Wed, 8 Jul 2015 18:37:04 +0000
> > From: f.rech at yahoo.fr
> > To: dj_kaza at hotmail.com
> > Subject: Re: [LAU] OT: Bash help to check new USB keys.
> >
> > It's not a full testing of a flash device I'm worried about, especially as
> > they are new, I just want to know they really are the size they report as
> > being...
> >
> > Dale.
> >
> > Probably GParted will tell you that,
> > HTH,
> > Fred
> >
> > Except the likes of GParted, df, udisks etc are exactly what I don't trust!
> > I have read too many reports of people buying say a 128GB usb drive, copying
> > loads of data onto it and later discovering everything after say 8 or 16GB
> > isn't really there! Somehow they fake the part (ToC? MBR?) which the
> > computer reads the size of the drive from and seems (at least in Doze-land,
> > where most of these reports are from, but then again so is most the computer
> > world) that the system even reports having written the files correctly and
> > they show up in the table of contents and in your file explorer as you would
> > expect. Hence I want to actually write data until the drive is near full and
> > do an md5sum on the files I have written. It's only a single write of the
> > few thousand they should be usable for and I plan to use them predominantly
> > as back-up storage so I don't envisage lots of erase and re-writes over
> > their lifetime. Basic drive integrity isn't a worry. Being sold dodgy, fake
> > components which report the wrong size is.
> >
> > I did wonder if doing something as simple as a full (rather than Quick)
> > format to the likes of ext4 might catch out something like this too...
> >
> > Dale.
> 
> Programmers like to report size in gibi bytes, and manufacturers
> almost always use giga bytes.
> https://en.wikipedia.org/wiki/Gibibyte
> 
> There's about a 7.5% difference between the units.  So, the units can
> make it look like you're losing 8GB off a 128GB disk, or 16GB off a
> 256GB disk.
> 
> I have to explain this to people all the time... no.... the software
> is wrong according to definitions, so you have to add/subtract x% to
> get your command right.
> 
> So, do some math and see if you can explain the discrepancies with units.
> 

I know that! Generally it's the difference between 1000*1000 and 1024*1024 or somewhere nearby. But as I quite clearly stated I'm more on about 128GB USB devices only storing around say 16GB of data which is actually readable but reported back completed writes for the whole 128GB. This is not just a few percent because of the difference in the way of measuring Gigabytes!

Dale.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20150709/c55b3a4b/attachment-0001.html>


More information about the Linux-audio-user mailing list