TOPIC: SOLID-STATE DRIVE
When a hard drive is unrecognised by the Linux hddtemp command
15th August 2021One should not do a new PC build in the middle of a heatwave if you do not want to be concerned about how fast fans are spinning and how hot things are getting. Yet, that is what I did last month after delaying the act for numerous months.
My efforts mean that I have a system built around an AMD Ryzen 9 5950X CPU and a Gigabyte X570 Aorus Pro with 64 GB of memory, and things are settling down after the initial upheaval. That also meant some adjustments to the CPU fan profile in the BIOS for quieter running while the use of Be Quiet! Dark Rock 4 cooler also helps, as does a Be Quiet! Silent Wings 3 case fan. All are components from trusted brands, though I wonder how much abuse they got during their installation and subsequent running in.
Fan noise is a non-quantitative indicator of heat levels as much as touch, so more quantitative means are in order. Aside from using a thermocouple device, there are in-built sensors too. My using Linux Mint means that I have the sensors command from the lm-sensors
package for checking on CPU and other temperatures, though hddtemp
is what you need for checking on the same for hard drives. The latter can be used as follows:
sudo hddtemp /dev/sda /dev/sdb
This has to happen using administrator access and a list of drives needs to be provided because it cannot find them by itself. In my case, I have no mechanical hard drives installed in non-NAS systems and I even got to replace a 6 TB Western Digital Green disk with an 8 TB SSD, but I got the following when I tried checking on things with hddtemp
:
WARNING: Drive /dev/sda doesn't seem to have a temperature sensor.
WARNING: This doesn't mean it hasn't got one.
WARNING: If you are sure it has one, please contact me (hddtemp@guzu.net).
WARNING: See --help, --debug and --drivebase options.
/dev/sda: Samsung SSD 870 QVO 8TB: no sensor
The cause of the message for me was that there is no entry for Samsung SSD 870 QVO 8TB in /etc/hddtemp.db so that needed to be added there. Before that could be rectified, I had to get some additional information using smartmontools
and these had to be installed using the following command:
sudo apt-get install smartmontools
What I had to do was check the drive's SMART data output for extra information, and that was achieved using the following command:
sudo smartctl /dev/sda -a | grep -i Temp
What this does is to look for the temperature information from smartctl
output using the grep
command, with output from the first being passed to the second through a pipe. This yielded the following:
190 Airflow_Temperature_Cel 0x0032 072 050 000 Old_age Always - 28
The first number in the above (190) is the thermal sensor's attribute identifier, and that was needed in what got added to /etc/hddtemp.db
. The following command added the necessary data to the aforementioned file:
echo \"Samsung SSD 870 QVO 8TB\" 190 C \"Samsung SSD 870 QVO 8TB\" | sudo tee -a /etc/hddtemp.db
Here, the output of the echo command was passed to the tee command for adding to the end of the file. In the echo
command output, the first part is the name of the drive, the second is the heat sensor identifier, the third is the temperature scale (C for Celsius or F for Fahrenheit) and the last part is the label (it can be anything that you like, but I kept it the same as the name). On re-running the hddtemp
command, I got output like the following, so all was as I needed it to be.
/dev/sda: Samsung SSD 870 QVO 8TB: 28°C
Since then, temperatures may have cooled and the weather become more like what we usually get, yet I am still keeping an eye on things, especially when the system is put under load using Perl, R, Python or SAS. There may be further modifications such as changing the case or even adding water cooling, not least to have a cooler power supply unit, but nothing is being rushed as I monitor things to my satisfaction.
Wiping of hard drives with Linux
2nd December 2013More than a decade of computer upgrades can leave obsolete kit in your hands, while legislation on electronic waste disposal might leave you wondering how to get rid of it. Thankfully, I discovered that my local council refuse site, only a few miles away, accepts such items for recycling. It saw me several times last summer disposing of obsolete and non-working gadgets that had stayed with me too long. Some were as bulky as computer monitors and printers, while others were relatively small.
Disposing of non-working, obsolete equipment is an easy choice, but it's harder when a device still works and might be useful. Computer motherboards still include PS/2, floppy and IDE ports, making decisions trickier. My Gigabyte Z87-HD3 mainboard has one PS/2 port (compared to two on older boards), limited IDE sockets and surprisingly, a floppy drive socket, unexpected for anyone who considers these technologies outdated. PC technology isn't abandoning backwards compatibility yet, as this mainboard supports an Intel Core i5-4670K CPU and 24 GB of RAM.
Despite the IDE port, I wasn't tempted to use my leftover 10 GB and 20 GB hard drives that I've had for over a decade. Ten years ago, that capacity would have been respectable if not for our growing need for data storage due to photography, video and music. Beyond size limitations, these drives' speed can't compare with today's standards, which became obvious when I replaced a similarly aged Samsung 160 HD with a Samsung SSD.
This line of thought led me to recycle the drives, so I considered wiping them. Linux offers a good tool for this: the dd
command. It can overwrite disk data to make information virtually irretrievable. Linux also has several dummy devices that supply junk data for overwriting. These work like /dev/null
, which suppresses command output. The first is /dev/zero
, which supplies octal zeros, which I used. For those wanting more randomness in overwriting, there's also /dev/random and /dev/urandom
.
To overwrite data on a disk with zeroes while having feedback on progress, the following command achieves the required result:
sudo dd if=/dev/zero | pv | sudo dd of=/dev/sdd bs=16M
The operation needs root privileges. The if
parameter of dd
specifies the input data, which is sent to pv
that displays a progress bar not provided by dd
alone. The output then goes to another dd
command with the target disk specified by the of
parameter. The bs
parameter in the second dd
command sets the block size for writing. Note that pv
isn't installed by default. On Debian, Ubuntu or Linux Mint systems, install it with this command:
sudo apt-get install pv
The pv
sandwich is also invaluable when using dd
to copy partitions between different physical or virtual disks. Without it, you might wonder what's happening during silent operations, which is particularly concerning when retrying failed operations that take a long time to complete.
Pondering storage options
1st June 2011The combination of curiosity and a little spare time had me browsing online computing technology stores recently. A spot of CD and DVD burning brought on by a flurry of Linux distribution testing reminded me of the possibility. Because I have built up a sizeable library of digital photos, ensuring that I have backups of them is something that needs doing. While a 2 GB Samsung external hard drive is brought to life every now and again for that purpose, the prospect of using Blu-ray discs has appealed to me. After all, capacities of 25 GB for single-layer discs and 50 GB for dual-layer ones sound not inappropriate for my purposes. However, they aren't a cheap option at the time of writing, with each disc costing in the region of £3-4 at one place where I was looking. The cost of BD writers themselves seems not to be so bad though, with a few in the £60-100 bracket; any lower than this and you could end up with a combo drive that reads Blu-ray discs and writes to DVD's and CD's, so a modicum of concentration is needed. As attractive as the idea might be, the cost of BD media means that I'll wait a little while before deciding to take the plunge. The price premium at the moment is a reminder of the way that things used to be when CD and DVD writers first came on the market. It is very telling when discs come packaged in jewel cases, something that you won't see too often with CD's or DVD's.
Another piece of storage excitement that hasn't escaped me is the advent of SSD hard drives. With no moving parts like in conventional hard drives, they bring a speed boost. Concerns about their lifetimes and the numbers of read/write events per drive would stall me when it comes to storing personal data on them but using them for the likes of operating system files sounds attractive, especially with my partiality to Linux perhaps not hammering drives so much. As with any new technology, there is a price premium, even though a drive big enough for hosting an operating system can be acquired for less than £100. As with many of my hardware purchase brainwaves, there's no rush, but this is an option that I'll keep at the back of my mind.
Another appealing notion is the idea of getting a NAS so that files can be shared between a few computers. While I have seen prices starting at just above £70 for single disk enclosures, these generally are a more expensive option than external drives, and that's before you consider the cost of any hard drives. Nevertheless, the advantages of a unit containing more than a single hard drive while operating as a print server for any compatible printer, too. When you get to 4 or 5 hard drive trays, then the cost has mounted, but that could be when they pay their way too. What reminded me of these was a bookazine on home networking that I recently found at a branch of WHSmith's and their attractions are subject to the networking side of things being made to work without a drama. Once that's out of the way, then their usefulness really does appeal.
Mulling over all these brainwaves is one thing, but it doesn't mean that the purse strings will become too loose in this age of economic constraint. In fact, pondering them may serve to staunch any impulse purchases. Sometimes, a spot of virtual shopping serves to control things rather than losing the run of oneself.