On 2021/05/16 18:57, -pj wrote:
I was recently informed that using dd (dubbed - data-destroyer) can seriously shorten a SSD devices lifespan.
dd is not a data-destroyer. It is a very useful tool in many circumstances. Of course many tools can be mis-used. Maybe sudo find / -type f -delete or a dos/win fav: format C: Not sure what happens with sudo cat /dev/zero >/dev/rootfs It is handy to have the rootfs so readily identified...*cough*
1. What is the most effective non destructive way to erase or prepare a SSD drive for an openSUSE (LEAP or TDE) installation?
---- Just put it in your drive and create a new partition table. No unnecessary writes.
I am wondering now about USB flash drive devices.
2. Does the use of "dd" on USB flash drives kill the limited lives on these devices in a similar manner also?
---- ???!!... Depends on what you do with "dd". Why would you need or want to use 'dd' unless you want to transfer a disk image. Usually you want to xfer files so 'dd' wouldn't even come into the picture.
3. Does the use of "dd" on a mechanical drive have less of a negative lifespan effect than that of it's effects on SSD or USB devices?
--- Um...less of a negative effect? Well, since magnetic media isn't known to be very degraded by multiple r/w ops, it would probably generate less wear. But if you use 'dd' to copy a boot-disk-img which you want to use on a flash-drive, 'dd' could be less harmful, than formatting the flash drive, then copying all the files from some mounted source to the target media. Just don't do unnecessary R/W's on media not designed for it (maybe some flash drives). FWIW, I would tell you I've not had any flash drives/ssd's fail, but to do so might invite unnecessary risk due to some carelessness -- like removing the wrong data disk from a RAID5. I don't know where you got the idea that 'dd' was more dangerous than other i/o, but if you are using to zero out or write other test patterns then you are doing unnecessary I/O -- and that's not the fault of 'dd'. FWIW, dd with the right parameters will give you the fastest r/w speeds. I often use it to test my network R/W speeds with CIFS/SMB... I do frequent i/o speed testing reading + writing on Win from/to two files in my linux home directory. Writing to the devices avoids any physical disk-speed interactions so I just get the protocol transport speed. It varies alot based on how the ethernet connection is tuned. Ishtar:law> /bin/ls -lgG ~/{null,zero} crwxrwxrwx 1 1, 3 Dec 24 2018 /home/law/null crwxrwxrwx 1 1, 5 Jun 15 2015 /home/law/zero which is drive 'H:' on my Win machine: /h> /bin/ls -lgG /h/{null,zero} -rwxrwxrwx 1 0 Dec 24 2018 /h/null -rwxrwxrwx 1 0 Jun 15 2015 /h/zero /h> bin/iotest Using bs=16.0M, count=64, iosize=1.0G R:1073741824 bytes (1.0GB) copied, 2.27302 s, 451MB/s W:1073741824 bytes (1.0GB) copied, 3.02209 s, 339MB/s