Dunno, my Gentoo is doing fine. The vast majority of compilation happens in RAM anyway, and hitting swap once in a while is not a big deal.But - I recall that I also formed an opinion (some years ago) that SSD drives would not work well with a Gentoo system configured like mine, on account of the SSD drives having a very limited lifespan if written to regularly.
It should give you faster reads, but write performance will be limited by hdd.As an off the wall follow up question - what would people think of a SSD-Mechanical pairing in a RAID-0 mirror? Stupid idea, or some merit for faster read times?
Sound promising. Do you use the SSD's in a RAID?szatox wrote:Dunno, my Gentoo is doing fine. The vast majority of compilation happens in RAM anyway, and hitting swap once in a while is not a big deal.But - I recall that I also formed an opinion (some years ago) that SSD drives would not work well with a Gentoo system configured like mine, on account of the SSD drives having a very limited lifespan if written to regularly.
My main reason for thinking of this stupid setup is the way I replace drives in the RAID-0. Process is:szatox wrote:It should give you faster reads, but write performance will be limited by hdd.As an off the wall follow up question - what would people think of a SSD-Mechanical pairing in a RAID-0 mirror? Stupid idea, or some merit for faster read times?
Depending on the internal optimizations, I can imagine this setup failing slow HDD out of the raid set during a big write (or at any time really), so you'd have to really really stress test it.
Bcache and similar probably won't survive the backing device failing, even if cache is big enough to keep all data forever.
Maybe you could abuse DRBD in some creative way to flag HDD as write-mostly, if you're -brave-enough- totally insane. I mean, this idea definitely sucks, but I am now curious if it's possible![]()
One thing that did actually work well when mixing HDD and SSD was LVM snapshots. Full snapshots on a single HDD degrade performance like 10 times. LVM allows you to specify physical volume where a logical volume should be created. Having both, HDD and SSD in one group allows you to put an LV on HDD and then snapshot is to SSD, which avoids write amplification penalty.
Code: Select all
sgdisk /dev/sdX -R /dev/sdY
sgdisk -G /dev/sdY
My understanding is that writes are less a problem these days, with wear levelling and so-forth. Seagate claims a total write life of 1200 terrabytes for their 'Barracuda' SSD range. I don't if that's been independently verified but, even if it's a hundred times smaller in practice, it's still long enough for my purposes. Even if it's only 12 Tb, that's still 6Gb per day, every day, for five years.ipic wrote: How do people view this these days? Have the manufacturers mitigated the problem with high write rates to SSD drives?
Oh, before we continue... You meant RAID1, didn't you?I have four 2TB mechanical hard drives configured into two RAID-0 mirrors
I used to have a bunch of Debian servers with SSDs in RAID1 in my care, including a pretty big and damn busy integration database. It worked.Sound promising. Do you use the SSD's in a RAID?
I don't know how it's going to behave.Your comment about the HDD being dropped because of slow writes *looks* like it will be OK in this, one, specific, scenario - but I guess it could fail immediately afterwards, before I have a chance to reverse the process?
Thanks for the feedback, it's very useful. Good to know your RAID's work with SSD's.szatox wrote:I don't know how it's going to behave.Your comment about the HDD being dropped because of slow writes *looks* like it will be OK in this, one, specific, scenario - but I guess it could fail immediately afterwards, before I have a chance to reverse the process?
Depends on how defensively it's coded, you may be fine, or adding the new, fast device might kick out the device with data on it from raid, leaving you in an unusable state.
Honestly I'd rather take that machine down and copy data manually with dd instead. 2 TB is not _that_ much, standard 7200RPM disks should let you image copy them within 2-3 hours.
Thanks for the feedback, appreciated.lars_the_bear wrote:My understanding is that writes are less a problem these days, with wear levelling and so-forth. Seagate claims a total write life of 1200 terrabytes for their 'Barracuda' SSD range. I don't if that's been independently verified but, even if it's a hundred times smaller in practice, it's still long enough for my purposes. Even if it's only 12 Tb, that's still 6Gb per day, every day, for five years.ipic wrote: How do people view this these days? Have the manufacturers mitigated the problem with high write rates to SSD drives?
These days, I think I would be quite happy to use decent-quality SSDs in RAID, in the same circumstances where I would use them singly. But the sizes I want are still not really affordable in SSD.
BR, Lars.

Seagate claims MTBF of 1.8 million hours, which is about 200 years. So, again, even if you're at the worst end of the practical range, the lifetime is still likely to be tens of years.ipic wrote: I'll assume that the mean time to failure for other reasons (manufacturing process error etc) would be as good as or probably better than mechanical - since assembling very small moving parts carries its own risks.
I think you're overcomplicating things.So, a plan is:
- Boot with rescue image
- DD a HDD to one of the SDDs
- make new mirror with other SDD
- shutdown
- remove HDDs and replace with SDDs (to use original drive designations)
- reboot with SDD's now as original mirror
- pray, then test
Yes.Another thought - would using different drive manufacturers for the two mirror SDDs be a way to spread risk a bit?
Code: Select all
#!/bin/sh
DEVICE[0]="/dev/sda"
START[0]="2019-08-10"
TBW[0]="600"
DEVICE[1]="/dev/sdb"
START[1]="2023-09-02"
TBW[1]="600"
human_size()
{
local INPUT=$1
local SUFFIX="B"
local FACTOR="1000"
local LIMIT=$(($FACTOR*20))
if [ "$INPUT" -gt "$LIMIT" ]
then
INPUT=$((INPUT/$FACTOR))
SUFFIX="KB"
fi
if [ "$INPUT" -gt "$LIMIT" ]
then
INPUT=$((INPUT/$FACTOR))
SUFFIX="MB"
fi
if [ "$INPUT" -gt "$LIMIT" ]
then
INPUT=$((INPUT/$FACTOR))
SUFFIX="GB"
fi
if [ "$INPUT" -gt "$LIMIT" ]
then
INPUT=$((INPUT/$FACTOR))
SUFFIX="TB"
fi
echo "$INPUT $SUFFIX"
}
for COUNT in ${!DEVICE[@]}
do
# Get sectors written from device
SECTORS=`smartctl -A ${DEVICE[$COUNT]} | grep "^241 " | awk '{ print $NF }'`
if [ -z "$SECTORS" ]
then
echo "${DEVICE[$COUNT]}: No write statistics available"
continue
fi
# Writes are reported by sectors, multiply by 512
BW=$((SECTORS*512))
# Guaranteerd value is TBW so multiply by 1 TB
ESTBW=$((${TBW[$COUNT]}*1000000000000))
# Calculate the days the device has been in use
STARTUNIX=`date +'%s' -d "${START[$COUNT]}"`
NOWUNIX=`date +'%s'`
DAYS=$((($NOWUNIX-$STARTUNIX)/86400))
if [ "$DAYS" -lt "1" ]
then
DAYS=1
fi
# Calculate the daily write-rate
DAYRATE=$(($BW/$DAYS))
# Calculate the number of days left given the current rate
ESTDAYS=$((($ESTBW/$DAYRATE)-$DAYS))
ESTDATE=`date +"%d-%m-%Y" -d "$ESTDAYS days"`
# Report
echo "${DEVICE[$COUNT]}: Written `human_size $BW` in $DAYS days, `human_size $DAYRATE`/day, $ESTDAYS days left: $ESTDATE"
done
Code: Select all
/dev/sda: Written 6324 GB in 1826 days, 3463 MB/day, 171406 days left: 24-11-2493
/dev/sdb: Written 1400 GB in 342 days, 4096 MB/day, 146134 days left: 15-09-2424
Code: Select all
#!/bin/sh
# Set SCT Error Recovery Control to 7 seconds
smartctl -l scterc,70,70 /dev/sda
smartctl -l scterc,70,70 /dev/sdb
Many thanks for the super useful post. I have now pulled the trigger and have started ordering hardware.pa4wdh wrote:I have a very similar setup to yours in my server. It used to be 2 mechanical drives, but i've replaced them with SSD's by replacing them one at a time and let RAID to it's magic.
For about a week i've been running with 1 HDD and 1 SSD. The difference in speed was huge (1TB 2.5" 5400rpm disk vs. EVO 860), but that didn't affect the array, just don't expect a performance increase during that time.Was there a time when you were using a RAID array with a HDD and a SDD active at the same time?
Or was that just for the time while you converted the drives from HDD to SDD?

Code: Select all
# smartctl -x /dev/sdk
.....
Device Statistics (GP Log 0x04)
...
0x01 0x010 4 28202 --- Power-on Hours
0x01 0x018 6 71355063635 --- Logical Sectors Written
...Code: Select all
Power on for: 3.2 years
/dev/sdk: WDC WD20EZBX-00AYRA0 Written: 36.53 TB
This is interesting. It seems Samsung reviews go either 'its the greatest' or 'it failed'. Hard to form a view, but your experience makes me leery of themNeddySeagoon wrote: ....
Stay away from Samsung, SSDs. Their warranty process is horrible and I had both halves of a mirror. fail with bad blocks just a few hours apart.
....

The problem, I guess, is that no amount of anecdotal reports will settle this. They've been OK for me, but I've heard horror stories. I don't think anybody except a drive manufacturer can do the kind of large-scale testing that would be needed, to establish a reliable MTBF.ipic wrote: This is interesting. It seems Samsung reviews go either 'its the greatest' or 'it failed'. Hard to form a view, but your experience makes me leery of them


It's the Samsung Pro series, not the EVO, that's historically had the best reputation for longevity. Sadly, that report has become rather dated (it's from 2015). It would really be interesting to see it repeated with more modern hardware.ipic wrote:I decided to try a Samsung 870 EVO 2TB in one set of my RAID-1 arrays.
Revised to be fair to the Samsung.ipic wrote:I decided to try a Samsung 870 EVO 2TB in one set of my RAID-1 arrays.
Disappointingly, after one month, it started showing signs of failure, chief of which was that the BIOS refused to boot off it. Additionally, occasional drops to 1.5 G/sec SATA speed reported. Several smartctl stats relating to errors were well into the 100's.
I was lucky enough to get a replacement and change it out before it totally failed. Chalk one more data point to the "avoid Samsung" I guess.
Code: Select all
/dev/sda: FIKWOT FS810 4TB Written: 10.27T Power on for: 6.74 months
/dev/sdb: CT4000MX500SSD1 Written: 10.78TB Percentage of TBW: 1.0783% Power on for: 6.83 months
/dev/sdc: CT2000MX500SSD1 Written: 2.41TB Percentage of TBW: 0.3442% Power on for: 1.68 months
/dev/sdd: CT2000MX500SSD1 Written: 2.57TB Percentage of TBW: 0.3676% Power on for: 2.81 months
/dev/sde: Samsung SSD 870 EVO 2TB Written: 4.23TB Percentage of TBW: 0.3523% Power on for: 1.23 months
Code: Select all
/dev/nvme0n1: WD_BLACK SN850X 4000GB Written: 2.89 TB Percentage of TBW: 0.1204% Power on for: 1.20 weeks