Reply
Newbie
Posts: 1
Registered: ‎01-31-2019

missing capacity or wrong displayed size or number of sectors on usb sandisk-ultraFlair-128gb stick


/dev/sdb=usb3_key1__sandisk__ultraFlair__128gb__red_black__sn=4C531001371223110524__mdl=SDCZ73-128G-G46__pn=BP161225515D
/dev/sdc=usb3_key2__sandisk__ultraFlair__128gb__red_black__sn=4C530001280219111063__mdl=SDCZ73-128G-G46__pn=BP180226253J

Disk /dev/sdb: 242614272 sectors, 115.7 GiB
Disk /dev/sdc: 240254976 sectors, 114.6 GiB

242614272 - 240254976 = 2359296 sectors are missing on /dev/sdc
i.e.  1207959552 bytes

running system : scientific-linux SL-7.5 ; 3.10.0-957.5.1.el7.x86_64

problem : two Sandisk 128Gb usb sticks that are supposed to have the same capacity do not have the same capacity

consequence : maintainance of their contents is far more tiring ...

question : do these usb-sticks have really user-available capacities that are different,
           or is the usb-stick that has less capacity damaged ?
           So if this usb-stick is not damaged, what can I do to recover the full capacity?

several actions were tried that all failed to recover the supposed original capacity:

     sgdisk -R, --replicate=second_device_filename
              Replicate  the main device's partition table on the specified second device.  Note that the replicated partition table is an exact copy, including all GUIDs;
              if the device should have its own unique GUIDs, you should use the -G option on the new disk.
     sgdisk -G -R /dev/sdc /dev/sdb

   also

     sgdisk   -l, --load-backup=file
              Load partition data from a backup file. This option is the reverse of the -b option. Note that restoring partition data from anything but the  original  disk
              is  not  recommended.  This option will work even if the disk's original partition table is bad; however, most other options on the same command line will be
              ignored.

     i.e. load partition data from a backup file of /dev/sdb :
     sgdisk -l 20180612-1213__save__gdisk__gpt__partition_table__usb3_key1__sandisk__ultraFlair__128gb__red_black__sn=4C531001371223110524__mdl=SDCZ73-128G-G46__pn=BP161225515D.bin /dev/sdc

   also

       partprobe [-d] [-s] [devices...]
              to update the os with the new device files for these new gps partitions.
              dd won’t do it for you.
     partprobe /dev/sdc

   also

     dd if=/dev/sdb of=/dev/sdc bs=512 count=20

   also

     trying to repartition under running system windows-8.1

   also

     ...

Thank you for your suggestions ...

Here after the data are printed and sequences separators are 1 line of "!"

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
bash-4.2#
bash-4.2# sgdisk -p /dev/sdb
Disk /dev/sdb: 242614272 sectors, 115.7 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 211F25A3-BC37-4EE1-9928-841771C87C3B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 242614238
Partitions will be aligned on 2048-sector boundaries
Total free space is 8158 sectors (4.0 MiB)
Number  Start (sector)    End (sector)  Size       Code  Name
   1            8192          991231   480.0 MiB   8300  Linux filesystem
   2          991232         1499135   248.0 MiB   8300  Linux filesystem
  ...
  14       221847552       222355455   248.0 MiB   8300  Linux filesystem
  15       222355456       242606079   9.7 GiB     8300  Linux filesystem
  16       242606080       242614238   4.0 MiB     8300  Linux filesystem
bash-4.2#


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
bash-4.2#
bash-4.2# sgdisk -p /dev/sdc
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.
Warning! One or more CRCs don't match. You should repair the disk!
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sdc: 240254976 sectors, 114.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): FF0F35A5-A5C3-4DA0-BD39-86DA34090FDF
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 242614238
Partitions will be aligned on 2048-sector boundaries
Total free space is 8158 sectors (4.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            8192          991231   480.0 MiB   8300  Linux filesystem
   2          991232         1499135   248.0 MiB   8300  Linux filesystem
  ...
  14       221847552       222355455   248.0 MiB   8300  Linux filesystem
  15       222355456       242606079   9.7 GiB     8300  Linux filesystem
  16       242606080       242614238   4.0 MiB     8300  Linux filesystem


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
bash-4.2#
bash-4.2# sgdisk -v /dev/sdb

Warning: The 0xEE protective partition in the MBR is marked as active. This is
technically a violation of the GPT specification, and can cause some EFIs to
ignore the disk, but it is required to boot from a GPT disk on some BIOS-based
computers. You can clear this flag by creating a fresh protective MBR using
the 'n' option on the experts' menu.

No problems found. 8158 free sectors (4.0 MiB) available in 1
segments, the largest of which is 8158 (4.0 MiB) in size.
bash-4.2#


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
bash-4.2#
bash-4.2# sgdisk -v /dev/sdc
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Problem: Disk is too small to hold all the data!
(Disk size is 240254976 sectors, needs to be 242614272 sectors.)
The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable
sector is 242614238, but backup header is at
242614271 and disk size is 240254976 sectors.
The 'e' option on the experts' menu will probably fix this problem

Problem: partition 15 is too big for the disk.

Problem: partition 16 is too big for the disk.

Warning: The 0xEE protective partition in the MBR is marked as active. This is
technically a violation of the GPT specification, and can cause some EFIs to
ignore the disk, but it is required to boot from a GPT disk on some BIOS-based
computers. You can clear this flag by creating a fresh protective MBR using
the 'n' option on the experts' menu.

Partition(s) in the protective MBR are too big for the disk! Creating a
fresh protective or hybrid MBR is recommended.

Identified 7 problems!
bash-4.2#


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
hdparm -N /dev/sdb
/dev/sdb:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 max sectors   = 0/1, HPA is enabled


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
hdparm -N /dev/sdc
/dev/sdc:
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 max sectors   = 0/1, HPA is enabled


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sgdisk -E /dev/sdb
bash-4.2# sgdisk -E /dev/sdb
8191


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sgdisk -E /dev/sdc
bash-4.2# sgdisk -E /dev/sdc
Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
8191

SanDisk Guru
Posts: 2,714
Registered: ‎07-23-2010

Re: missing capacity or wrong displayed size or number of sectors on usb sandisk-ultraFlair-128gb st

Flash drives are made with blocks of error recovery sectors so that if a good sector gets damaged for some reason it is flagged and a recovery sector is allocated in it's place.  Does this add overhead, yes, but it beats the other option.

 

Another thing that can change allocated sectors, partitioning.  Type of partition, alignment of the partition.  Same goes for formatting.

 

If you think one drive is damaged, return it for a free replacement.

Ed
Important files = Backed up files
Highlighted
Newbie
Posts: 2
Registered: ‎05-09-2019

Re: missing capacity or wrong displayed size or number of sectors on usb sandisk-ultraFlair-128gb st

What causes the USB Stick Showing Wrong Capacity?

 

Following are some of the situations that can cause the issue USB Flash Stick Showing Wrong Capacity.

  • Malware and Viruses.
  • USB drive not safely ejected.
  • The pen drive in use is corrupted or damaged.
  • USB is partitioned into two or more.
  • Presence of unallocated space.

Solutions to fix the issue USB Flash drive Showing Wrong Capacity:

 

Solution 1: Using Command Prompt: Solution 2: Format using Disk Management:

Solution 3: Recover data from the USB stick

 

Source URL: Fixed: USB Stick Showing Wrong Capacity / Less Space than Actual