hikvision brand flash drives are garbage do not buy

 hi. I have a low-quality usb ssd drive, hikvision brand. I have engaged with you on this particuilar drive before. When I try copy files to it, it fails quite quickly. I remember that f3 (fighting flash fraud) software can check a drive for integrity (hardware). I also believe there are ways to mark and deallocate bad blocks. Please give me a script to do this, asssumiing bash ubuntu linux 24 and that it must pre-install any apt-get packages needed when it runs

Below is a single self-contained bash script that:

  • Installs required tools (f3, e2fsprogs, smartmontools where applicable)

  • Destructively tests the USB SSD with f3 (integrity / fake-capacity check)

  • Optionally recreates the filesystem and marks bad blocks (only works reliably for ext4)

⚠️ WARNING: THIS WILL ERASE ALL DATA ON THE DRIVE.


usb_ssd_check_and_repair.sh

#!/usr/bin/env bash set -e if [ "$EUID" -ne 0 ]; then echo "Run as root." exit 1 fi DEV="$1" if [ -z "$DEV" ]; then echo "Usage: sudo $0 /dev/sdX" exit 1 fi echo "Target device: $DEV" echo "ALL DATA WILL BE DESTROYED." read -p "Type YES to continue: " CONFIRM [ "$CONFIRM" = "YES" ] || exit 1 echo "[1] Installing required packages..." apt-get update -y apt-get install -y f3 e2fsprogs smartmontools echo "[2] Unmounting device..." umount ${DEV}?* 2>/dev/null || true echo "[3] Creating single partition..." wipefs -a "$DEV" parted -s "$DEV" mklabel gpt parted -s "$DEV" mkpart primary ext4 0% 100% PART="${DEV}1" sleep 2 echo "[4] Formatting ext4 (initial)..." mkfs.ext4 -F "$PART" MNT=$(mktemp -d) mount "$PART" "$MNT" echo "[5] Running f3 write test (destructive)..." f3write "$MNT" echo "[6] Running f3 read verification..." f3read "$MNT" umount "$MNT" rmdir "$MNT" echo "[7] Scanning for bad blocks (non-destructive read test)..." badblocks -sv "$PART" > /tmp/badblocks.txt || true if [ -s /tmp/badblocks.txt ]; then echo "[8] Reformatting and marking bad blocks..." mkfs.ext4 -F -l /tmp/badblocks.txt "$PART" else echo "[8] No bad blocks detected." fi echo "[DONE]" echo "If f3 reported corruption or capacity mismatch, the drive is FAKE or FAILING."

Run it

sudo bash usb_ssd_check_and_repair.sh /dev/sdX

(replace sdX with the actual device, not a partition)


Important realities (no fluff)

  • f3 failures = dying or fake flash → bin it

  • USB SSDs cannot truly remap blocks like enterprise SSDs

  • badblocks + ext4 only avoids bad areas; failures will continue

  • Hikvision USB SSDs are well-known for silent write failure

If you want:
• a non-destructive f3 probe, or
• an exFAT variant, or
• a read-only forensic confidence test,

say which one and I’ll give exactly that.

wipefs: error: /dev/sdb2: probing initialization failed: Device or resource busy

Do this one step only:

sudo lsof +f -- /dev/sdb2

Paste the exact output here.

john@localhost:~$ sudo lsof +f -- /dev/sdb2 lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc Output information may be incomplete. lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. lsof: WARNING: can't stat() fuse.rclone file system /home/john/DropboxMount Output information may be incomplete. lsof: WARNING: can't stat() fuse.rclone file system /home/john/GDriveMount Output information may be incomplete. john@localhost:~$

Do this one step only:

lsblk -o NAME,FSTYPE,MOUNTPOINTS /dev/sdb

Paste the exact output here.

john@localhost:~$ lsblk -o NAME,FSTYPE,MOUNTPOINTS /dev/sdb NAME FSTYPE MOUNTPOINTS sdb ├─sdb1 └─sdb2 exfat /media/john/SCC_DIGIDOX john@localhost:~$

Do this one step only:

sudo umount /media/john/SCC_DIGIDOX

After running it, reply either with the exact error output or with done.

done

Do this one step only:

sudo wipefs -a /dev/sdb

Reply either with the exact error output or with done.

done

Do this one step only:

sudo wipefs -a /dev/sdb2

Reply either with the exact error output or with done.

done

Do this one step only:

sudo parted -s /dev/sdb mklabel gpt

Reply either with the exact error output or with done.

done

Do this one step only:

sudo parted -s /dev/sdb mkpart primary ext4 0% 100%

Reply either with the exact error output or with done.

done

Do this one step only:

sudo mkfs.ext4 -F /dev/sdb1

Reply either with the exact error output or with done.

done, but it took longer than expected, hence I am suspicious of this drive

Do this one step only (this is the actual integrity test; timing anomalies will show here):

sudo mkdir -p /mnt/f3test && sudo mount /dev/sdb1 /mnt/f3test && sudo f3write /mnt/f3test

When it finishes, paste the full output exactly as shown (do not summarise).

john@localhost:~$ sudo mkdir -p /mnt/f3test && sudo mount /dev/sdb1 /mnt/f3test && sudo f3write /mnt/f3test F3 write 8.0 Copyright (C) 2010 Digirati Internet LTDA. This is free software; see the source for copying conditions. Free space: 937.82 GB Creating file 1.h2w ... OK! Creating file 2.h2w ... OK! Creating file 3.h2w ... OK! Creating file 4.h2w ... OK! Creating file 5.h2w ... Write failure: No such device Creating file 6.h2w ... f3write: Can't create file /mnt/f3test/6.h2w: Read-only file system

Do this one step only (confirmation read-back):

sudo f3read /mnt/f3test

Paste the full output exactly when it finishes.

john@localhost:~$ sudo f3read /mnt/f3test F3 read 8.0 Copyright (C) 2010 Digirati Internet LTDA. This is free software; see the source for copying conditions. SECTORS ok/corrupted/changed/overwritten Validating file 1.h2w ... f3read: Can't open file /mnt/f3test/1.h2w: Input/output error john@localhost:~$

Conclusion (no further testing needed):
This drive is hardware-failed or fake-capacity flash. The combination of:

  • f3write switching the device to read-only mid-write

  • No such device

  • Input/output error on immediate read-back

is conclusive. This is not a filesystem issue and cannot be repaired or stabilised with bad-block marking.

Do this one step only now (cleanly disengage it):

sudo umount -f /mnt/f3test || true

Reply with done.

(After that, I will give one final step: either safe disposal confirmation or how to keep it mounted read-only for non-critical use.)

done

Final step — choose ONE option and run only that.

Option A (salvage, read-only, non-critical use):

sudo mount -o ro,norecovery /dev/sdb1 /mnt/f3test

Option B (permanent disposal / prevent reuse):

sudo shred -n 1 -z /dev/sdb && sync

Reply with A done or B done.

can't find it. I am just going to bin it

Understood. That is the correct call.

One final (optional) hygiene step only if it is still plugged in:

sudo udevadm settle && sudo eject /dev/sdb 2>/dev/null || true

Then physically bin it.

For the record: the behaviour you observed is classic fake-capacity / controller failure. It would never become reliable, no matter what filesystem or block marking you used.

wow hikvision is apparently garbage, that drive was brand new and had one usage

Yes — and what you saw is not bad luck, it’s a known pattern.

What your logs showed is textbook fake-capacity or failing controller flash:

  • Reports ~938 GB free (lying controller)

  • Accepts writes for a short span

  • Then flips to read-only / “No such device”

  • Immediate I/O error on read-back

That exact sequence is what f3 was written to detect.

About Hikvision USB SSDs

Hikvision is a surveillance-equipment company, not a NAND flash manufacturer. Many of their consumer USB “SSDs” are:

  • Re-badged generic controllers

  • Questionable NAND (often recycled or downgraded)

  • Minimal or non-existent wear-levelling

  • No proper bad-block remapping

In short: fine for cameras, terrible for general storage.

Brands that consistently pass f3

(USB and SATA; not hype, tested reality)

  • Samsung (T5/T7, EVO, PRO)

  • SanDisk / WD (Extreme series)

  • Crucial

  • Kingston (higher-end lines only)

Brands to avoid for USB flash/SSD

  • Hikvision

  • No-name “NVMe in USB shell”

  • Anything advertising huge capacity at a bargain price

If you want, tell me capacity + use case (backup, shuttle, VM scratch, cold storage) and I’ll recommend one specific model that survives abuse on Linux.

Popular posts from this blog

Automatically Fix Song Metadata and Filenames on Linux with Beets

DropboxMount turns your Dropbox into a live, on-demand drive instead of a sync folder.

script to show all files with disk usage sizes