[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 check

/!\  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". check

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

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

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

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
Got a problem Alexander:
I had to put the script someplace else. So I put it in my private /home/gene/bin as disktest.txt with nano. couldn't find it.
But:
gene@coyote:/mnt/disktest$ sudo /home/gene/bin/disktest.txt
sudo: /home/gene/bin/disktest.txt: command not found
And:
gene@coyote:/mnt/disktest$ ls /home/gene/bin/disktest.txt
/home/gene/bin/disktest.txt
So I think I found the problem with my script, ancient eyeballs can't tell the diff between () and{} so I fixed that but it still won't run or be killed. I don't care how big you've made the t-bird font, by the time you've read 2 more msgs, its back to about 6 point text. Grrrrrrr.

So I fired up a root session of htop, found about 8 copies of dd showing and started killing them but cannot kill the last 2 in the D state.

And cannot find .disktest.txt running in a root htop and the2 copy's of dd can't be killall'd.

     3f2c5fa95492bfaa18f08c801037d80b *./reftestfile

Next?
    $ 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.


--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀

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: