Semi-OT?
I just got a new SanDisk 8GB flash drive, and, as usual, it came with the U3 software (for Windoze) on a "CD" partition and considerably less than 8GB on the disk partition. I put it into my WinXP portable and told U3 to delete itself, but I still can't get at the old U3 part of the drive. I've tried WinXP's format command, disk management and CentOS's fdisk, and nothing will give me more than 7,872,512 bytes per cylinder, times 1019 cylinders yields 8,022,089,728 bytes. Is that right, or should there be more? fdisk also reports that the drive has 8029 "MB", or 8029470208 bytes, which is 7,380,480 bytes difference (until it gets allocated into the 8,022,089,728 bytes of the partition) - I'm thinking this is a standard formatting loss.
My 4GB flash drive has 4,096,189,440 bytes on it, and twice that would be 8,192,378,880, which is a difference of 170,289,152 bytes, or about 162+MB. The former "CD" partition (which is invisible, so far) only had 8,645,202 bytes used on it, which leaves a huge amount of room to spare of inaccessible empty space.
What am I missing? Or is that just the way it is? (The package only says "Some capacity is not available for data storage." That doesn't really tell me enough.)
Thanks.
mhr
On Sat, Jun 13, 2009 at 11:29 PM, MHRmhullrich@gmail.com wrote:
Semi-OT?
I just got a new SanDisk 8GB flash drive, and, as usual, it came with the U3 software (for Windoze) on a "CD" partition and considerably less than 8GB on the disk partition. I put it into my WinXP portable and told U3 to delete itself, but I still can't get at the old U3 part of the drive. I've tried WinXP's format command, disk management and CentOS's fdisk, and nothing will give me more than 7,872,512 bytes per cylinder, times 1019 cylinders yields 8,022,089,728 bytes. Is that right, or should there be more? fdisk also reports that the drive has 8029 "MB", or 8029470208 bytes, which is 7,380,480 bytes difference (until it gets allocated into the 8,022,089,728 bytes of the partition) - I'm thinking this is a standard formatting loss.
My 4GB flash drive has 4,096,189,440 bytes on it, and twice that would be 8,192,378,880, which is a difference of 170,289,152 bytes, or about 162+MB. The former "CD" partition (which is invisible, so far) only had 8,645,202 bytes used on it, which leaves a huge amount of room to spare of inaccessible empty space.
What am I missing? Or is that just the way it is? (The package only says "Some capacity is not available for data storage." That doesn't really tell me enough.)
By comparison, I also have a Kingston 8GB flash drive, with the U3 partition removed, and it shows 7916608 1k blocks (in df), whereas the 8GB Sandisk only shows 7818752 (so far).
Relevance uncertain....
mhr
It's been a long time since i went back to the basic theory. The simple truth is that the operating system has a way of reserving some blocks on the storage media and besides the manufacturers use a multiple of 1000 as opposed to 1024.
On 6/14/09, MHR mhullrich@gmail.com wrote:
On Sat, Jun 13, 2009 at 11:29 PM, MHRmhullrich@gmail.com wrote:
Semi-OT?
I just got a new SanDisk 8GB flash drive, and, as usual, it came with the U3 software (for Windoze) on a "CD" partition and considerably less than 8GB on the disk partition. I put it into my WinXP portable and told U3 to delete itself, but I still can't get at the old U3 part of the drive. I've tried WinXP's format command, disk management and CentOS's fdisk, and nothing will give me more than 7,872,512 bytes per cylinder, times 1019 cylinders yields 8,022,089,728 bytes. Is that right, or should there be more? fdisk also reports that the drive has 8029 "MB", or 8029470208 bytes, which is 7,380,480 bytes difference (until it gets allocated into the 8,022,089,728 bytes of the partition) - I'm thinking this is a standard formatting loss.
My 4GB flash drive has 4,096,189,440 bytes on it, and twice that would be 8,192,378,880, which is a difference of 170,289,152 bytes, or about 162+MB. The former "CD" partition (which is invisible, so far) only had 8,645,202 bytes used on it, which leaves a huge amount of room to spare of inaccessible empty space.
What am I missing? Or is that just the way it is? (The package only says "Some capacity is not available for data storage." That doesn't really tell me enough.)
By comparison, I also have a Kingston 8GB flash drive, with the U3 partition removed, and it shows 7916608 1k blocks (in df), whereas the 8GB Sandisk only shows 7818752 (so far).
Relevance uncertain....
mhr _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
MHR wrote:
Semi-OT?
I just got a new SanDisk 8GB flash drive, and, as usual, it came with the U3 software (for Windoze) on a "CD" partition and considerably less than 8GB on the disk partition. I put it into my WinXP portable and told U3 to delete itself, but I still can't get at the old U3 part of the drive. I've tried WinXP's format command, disk management and CentOS's fdisk, and nothing will give me more than 7,872,512 bytes per cylinder, times 1019 cylinders yields 8,022,089,728 bytes. Is that right, or should there be more? fdisk also reports that the drive has 8029 "MB", or 8029470208 bytes, which is 7,380,480 bytes difference (until it gets allocated into the 8,022,089,728 bytes of the partition) - I'm thinking this is a standard formatting loss.
If you go into fdisk's "expert" mode and set the geometry to 31 heads, 31 sectors/track, 16319 cylinders you can utilize the full 8029470208 bytes.
On Sun, Jun 14, 2009 at 8:25 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
If you go into fdisk's "expert" mode and set the geometry to 31 heads, 31 sectors/track, 16319 cylinders you can utilize the full 8029470208 bytes.
I was able to do that.
Then I went back and looked at my Kingston - it has 5 "heads," 32 s/t and 99212 "cylinders."
Now the question becomes, if I try that on the Sandisk, will it trash the drive altogether, or would I still be able to use it, or would that fail because there really isn't that much space on the "drive?"
Yeah, I know, greedy me, I want squeeze every byte of storage out of the thing, but why not?
Thanks.
mhr
PS: I'm also sending a query to Sandisk about this - I'll report if they tell me anything useful.
MHR wrote:
On Sun, Jun 14, 2009 at 8:25 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
If you go into fdisk's "expert" mode and set the geometry to 31 heads, 31 sectors/track, 16319 cylinders you can utilize the full 8029470208 bytes.
I was able to do that.
Then I went back and looked at my Kingston - it has 5 "heads," 32 s/t and 99212 "cylinders."
Now the question becomes, if I try that on the Sandisk, will it trash the drive altogether, or would I still be able to use it, or would that fail because there really isn't that much space on the "drive?"
The first thing I do with every USB flash drive I buy is figure out a geometry that uses all of the sectors reported by fdisk (I have a shell script that does that in a pretty much brute force way.) and then repartition and re-format the drive using that geometry. I've never experienced any problem with that.
Robert Nichols wrote:
MHR wrote:
On Sun, Jun 14, 2009 at 8:25 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
If you go into fdisk's "expert" mode and set the geometry to 31 heads, 31 sectors/track, 16319 cylinders you can utilize the full 8029470208 bytes.
I was able to do that.
Then I went back and looked at my Kingston - it has 5 "heads," 32 s/t and 99212 "cylinders."
Now the question becomes, if I try that on the Sandisk, will it trash the drive altogether, or would I still be able to use it, or would that fail because there really isn't that much space on the "drive?"
The first thing I do with every USB flash drive I buy is figure out a geometry that uses all of the sectors reported by fdisk (I have a shell script that does that in a pretty much brute force way.) and then repartition and re-format the drive using that geometry. I've never experienced any problem with that.
Re-reading your message, I think I misunderstood your question. No, you won't be able to access more sectors than the total capacity reported by fdisk. You won't trash the device, but making and using the filesystem will result in errors from attempts to access beyond the end of the device.
Robert Nichols wrote:
MHR wrote:
On Sun, Jun 14, 2009 at 8:25 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
If you go into fdisk's "expert" mode and set the geometry to 31 heads, 31 sectors/track, 16319 cylinders you can utilize the full 8029470208 bytes.
I was able to do that.
Then I went back and looked at my Kingston - it has 5 "heads," 32 s/t and 99212 "cylinders."
Now the question becomes, if I try that on the Sandisk, will it trash the drive altogether, or would I still be able to use it, or would that fail because there really isn't that much space on the "drive?"
The first thing I do with every USB flash drive I buy is figure out a geometry that uses all of the sectors reported by fdisk (I have a shell script that does that in a pretty much brute force way.) and then repartition and re-format the drive using that geometry. I've never experienced any problem with that.
That's interesting. Would you consider sharing your script?
Robert wrote:
Robert Nichols wrote:
The first thing I do with every USB flash drive I buy is figure out a geometry that uses all of the sectors reported by fdisk (I have a shell script that does that in a pretty much brute force way.) and then repartition and re-format the drive using that geometry. I've never experienced any problem with that.
That's interesting. Would you consider sharing your script?
Sure. I'll try it as a small attachment here. It that doesn't work, and I suspect it won't, I'll have to find some spot where I can upload it. I don't have anything like that set up just now.
On Mon, Jun 15, 2009 at 8:14 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
Sure. I'll try it as a small attachment here. It that doesn't work, and I suspect it won't, I'll have to find some spot where I can upload it. I don't have anything like that set up just now.
Got it - thanks.
One thing I noticed when I formatted the drive with the 31/31/99212 format was that it was REALLY REALLY SLOW!
I don't really know enough about the driver for USB flash drives, but I would bet it has something to do with the high cylinder count, and I noticed the Sandisk's format, though short by 77+MB seems to be optimized for real disk drive timings - maximum sectors per track, maximum heads per cylinder, minimum cylinders. In a real disk drive, this is wise because the inter-cylinder seek time is the longest (switching sectors is usually trivial, and switching heads is not much more).
If that's true, the the "most" optimum format for this drive would be 124/31/24803. Of course, that "loses" 124 sectors for the MBR, but that a whale of a lot less than 77MB.
I could be totally wrong about this - haven't tested it yet.
One last question, which I believe I did ask originally but didn't see any answer - anyone know why the Kingston is larger than the Sandisk (probably just designed that way - bravo, Kingston!)?
Thanks to all!
mhr
MHR wrote:
On Mon, Jun 15, 2009 at 8:14 AM, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
Sure. I'll try it as a small attachment here. It that doesn't work, and I suspect it won't, I'll have to find some spot where I can upload it. I don't have anything like that set up just now.
Got it - thanks.
One thing I noticed when I formatted the drive with the 31/31/99212 format was that it was REALLY REALLY SLOW!
I don't really know enough about the driver for USB flash drives, but I would bet it has something to do with the high cylinder count, and I noticed the Sandisk's format, though short by 77+MB seems to be optimized for real disk drive timings - maximum sectors per track, maximum heads per cylinder, minimum cylinders. In a real disk drive, this is wise because the inter-cylinder seek time is the longest (switching sectors is usually trivial, and switching heads is not much more).
If that's true, the the "most" optimum format for this drive would be 124/31/24803. Of course, that "loses" 124 sectors for the MBR, but that a whale of a lot less than 77MB.
I could be totally wrong about this - haven't tested it yet.
One last question, which I believe I did ask originally but didn't see any answer - anyone know why the Kingston is larger than the Sandisk (probably just designed that way - bravo, Kingston!)?
Heck, I've seen slightly different sizes among samples of the same model of the same brand purchased at the same time.
It really surprises me that CHS geometry changes would have any effect on the speed of the devices. All accesses are being done with LBA. Nothing is using CHS addressing, which wouldn't be able to go beyond cylinder 1023.
Robert Nichols wrote:
Robert wrote:
Robert Nichols wrote:
The first thing I do with every USB flash drive I buy is figure out a geometry that uses all of the sectors reported by fdisk (I have a shell script that does that in a pretty much brute force way.) and then repartition and re-format the drive using that geometry. I've never experienced any problem with that.
That's interesting. Would you consider sharing your script?
Sure. I'll try it as a small attachment here. It that doesn't work, and I suspect it won't, I'll have to find some spot where I can upload it. I don't have anything like that set up just now.
I'll try it later but I can see none of the usual damage (truncated and/or wrapped lines or dropped spl chars). Thanks!
<snip>
Robert wrote:
Robert Nichols wrote:
Robert wrote:
Robert Nichols wrote:
The first thing I do with every USB flash drive I buy is figure out a geometry that uses all of the sectors reported by fdisk (I have a shell script that does that in a pretty much brute force way.) and then repartition and re-format the drive using that geometry. I've never experienced any problem with that.
That's interesting. Would you consider sharing your script?
Sure. I'll try it as a small attachment here. It that doesn't work, and I suspect it won't, I'll have to find some spot where I can upload it. I don't have anything like that set up just now.
I'll try it later but I can see none of the usual damage (truncated and/or wrapped lines or dropped spl chars). Thanks!
It's OK. When I save the received attachment and diff it against the original, it's an exact match -- not even any whitespace changes.
From: MHR mhullrich@gmail.com
I just got a new SanDisk 8GB flash drive, and, as usual, it came with the U3 software (for Windoze) on a "CD" partition and considerably less than 8GB on the disk partition. I put it into my WinXP portable and told U3 to delete itself, but I still can't get at the old U3 part of the drive. I've tried WinXP's format command, disk management and CentOS's fdisk, and nothing will give me more than 7,872,512 bytes per cylinder, times 1019 cylinders yields 8,022,089,728 bytes. Is that right, or should there be more? fdisk also reports that the drive has 8029 "MB", or 8029470208 bytes, which is 7,380,480 bytes difference (until it gets allocated into the 8,022,089,728 bytes of the partition) - I'm thinking this is a standard formatting loss.
Maybe there is some reserved "good sectors" space in order to handle (take the place of) bad sectors? I don't really know how bad-sectors handling works...
JD