hikvision brand flash drives are garbage do not buy
- Get link
- X
- Other Apps
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,smartmontoolswhere 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 + ext4only 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.
Do this one step only:
sudo lsof +f -- /dev/sdb2
Paste the exact output here.
Do this one step only:
lsblk -o NAME,FSTYPE,MOUNTPOINTS /dev/sdb
Paste the exact output here.
Do this one step only:
sudo umount /media/john/SCC_DIGIDOX
After running it, reply either with the exact error output or with done.
Do this one step only:
sudo wipefs -a /dev/sdb
Reply either with the exact error output or with done.
Do this one step only:
sudo wipefs -a /dev/sdb2
Reply either with the exact error output or with done.
Do this one step only:
sudo parted -s /dev/sdb mklabel gpt
Reply either with the exact error output or with 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.
Do this one step only:
sudo mkfs.ext4 -F /dev/sdb1
Reply either with the exact error output or with done.
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).
Do this one step only (confirmation read-back):
sudo f3read /mnt/f3test
Paste the full output exactly when it finishes.
Conclusion (no further testing needed):
This drive is hardware-failed or fake-capacity flash. The combination of:
-
f3writeswitching the device to read-only mid-write -
No such device -
Input/output erroron 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.)
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.
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.
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.
- Get link
- X
- Other Apps