[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: testing new sdm drive



On 2/8/24 07:22, Alexander V. Makartsev wrote:
On 08.02.2024 12:14, gene heskett wrote:
gene@coyote:/etc$ sudo smartctl --all -dscsi /dev/sdm
smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.1.0-17-rt-amd64] (local build) Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:
Product:              SSD 3.0
Revision:             2.00
Compliance:           SPC-2
User Capacity:        2,097,152,000,000 bytes [2.09 TB]
Logical block size:   512 bytes
scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0 scsiModePageOffset: response length too short, resp_len=4 offset=4 bd_len=0
>> Terminate command early due to bad response to IEC mode page
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
gene@coyote:/etc$

And then again, it worked, sorta

Cheers, Gene Heskett, CET.

Looks like a scam. Probably a reprogrammed controller to falsely report 2TB of space to the system.

This is how I would test it.
First create a new GPT partition table and a new 2TB partition:
     $ sudo gdisk /dev/sdX

/!\  Make double sure you've selected the right device by using "lsblk" and "blkid" utilities.  /!\ /!\                            It could change from 'sdm' to another name after reboot.                              /!\

At gdisk prompt press "o" to create a new GPT table, next press "n" to create a new partition, accept default values by pressing "enter". To verify setup press "p", to accept configuration and write it to device press "w".

Next format partition to ext4 filesystem:
     $ sudo mkfs.ext4 -m 0 -e remount-ro /dev/sdX1

Next mount the filesystem:
     $ sudo mkdir /mnt/disktest
     $ sudo mount /dev/sdX1 /mnt/disktest

Next create reference 1GB file filled with dummy data:
     $ cd /mnt/disktest
     $ sudo fallocate -l 1G ./reftestfile
     $ sudo badblocks -w -s -t random ./reftestfile

Now we can use script to create 1830 1GB files and check their checksum:
    $ for i in $(seq 1830); do sudo dd if="./reftestfile" of="./testfile${i}" status=none; md5sum -b "./testfile${i}" ;done

This procedure will take a very long time to complete. "md5sum" will output the checksum for each file and they should be equal to checksum of "reftestfile":
     $ md5sum -b ./reftestfile
     3f2c5fa95492bfaa18f08c801037d80b *./reftestfile

    $ for i in $(seq 1830); do sudo dd if="./reftestfile" of="./testfile${i}" status=none; md5sum -b "./testfile${i}" ;done
     3f2c5fa95492bfaa18f08c801037d80b *./testfile1
     3f2c5fa95492bfaa18f08c801037d80b *./testfile2
     ...
     3f2c5fa95492bfaa18f08c801037d80b *./testfile1830

Obviously, checksum for your "reftestfile" will be different from mine.
If 'for' loop fails at some point, you can count testfiles to see how many of them were actually written to disk.

Looks neat. Any chance this will crash my machine? I have other design work going on, and I'd hate to have to start from scratch.

--
With kindest regards, Alexander.
Thank you Alexander.

Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis


Reply to: