How to check for matching USB flash drive sizes?

Status
Not open for further replies.

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
I understand that manufacturers of USB flash drives will sometimes make tiny changes in capacity for a given model during the product lifecycle.

If I want to mirror the USB boot device and have a spare for future use, is there an easy way or a tool to reliably check that the USB flash drives I've got are exact matches, size-wise?

Thanks!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
If you want to be absolutely safe, you can install to all three drives and then remove one and wipe it.
 

dtom10

Explorer
Joined
Oct 16, 2014
Messages
81
It does not matter, a mirror uses the smallest size available. You'll end up with a mirror and some spare Kb/Mb on the larger drive. The FS will have the same size on both drives.

A spare is pointless, just make sure you have the proper config. In case of a failure you install from scratch and restore the matching config. E.G.: install Freenas 9.10 for a 9.10 config or Freenas 11-U2 for a Freenas 11-U2 config.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It does not matter, a mirror uses the smallest size available.
It does matter, because if the designated spare is smaller than the other two, FreeNAS/ZFS will refuse to add it as a mirror. Though I agree that a spare really isn't necessary anyway.
 

xyzzy

Explorer
Joined
Jan 26, 2016
Messages
76
Thanks to everyone for their feedback.

danb35 hit on exactly the problem I wanted to avoid.

While Ericloewe's approach would certainly work, here's another:

1) Zero out the boot sector using a tool like ImageUSB
2) Start Rufus and click on the "Log" button. It will show something like this:
Code:
Found USB 2.0 device 'SanDisk Ultra Fit USB Device' (0781:5583)
NOTE: This device is an USB 3.0 device operating at lower speed...
1 device found
No volume information for drive 0x85
Disk type: Removable, Sector Size: 512 bytes
Cylinders: 3738, TracksPerCylinder: 255, SectorsPerTrack: 63
Partition type: SFD (Super Floppy Disk) or Unpartitioned
Partition 0:
  Type: Small FAT16 (0x00)
  Size: 28.6 GB (30752636928 bytes)
  Start Sector: 0, Boot: No


The byte count in the 2nd to last line appears to be reliable. I just bought 4 SanDisk Ultra Fit drives and they all have this size. I compared it to one I bought 8 months ago, and it has a size of 30752000000 bytes.
 
Last edited by a moderator:
Status
Not open for further replies.
Top