Koozali.org: home of the SME Server

observations, thoughts on disk topology and ssd usage

Offline sages

  • *
  • 182
  • +0/-0
    • http://www.sages.com.au
observations, thoughts on disk topology and ssd usage
« on: May 06, 2023, 04:13:19 AM »
Just some rambling thoughts, observations and niggling concerns regarding my current sme disk topology/setup.

I did an upgrade from sme 9.2 to sme 10 (yes, awhile ago now) from a 2 hdd raid1 setup to a 3 drive ssd main drive and hdd raid1 for /home/e-smith/files. The driving factor for the change in topology was the restore time for data in /home/e-smith/files on a 2 drive system. In my case it was taking the best per of a day. Granted it has only happened every few years but it was also an excuse to change things and have a play.
All good after the event.
Move forward a few years.
I was having a look at some smartdrive stats and noted that my primary ssd was down to 5% life time remaining. It doesn't have any reported failures or bad blocks/sectors and given that it is a 240gb drive with only about 13gb used on it I don't feel it is about to fail in the short term. Granted one of the points of making the change was to allow a quick and simple replacement of the operating system drive without the delay of the data restore. Also smallish ssd's are getting stupid cheap ~au$30/250gb drives.
Thoughts turned to what was the cause of the low life remaining on the ssd.
First obvious issue was I'd left some swap on it and even with 8gb ram it was utilising swap with a lot of free ram, so as a short term tweak I changed the swappiness of the kernel. I then had a look at the logging as another source of heavy writes with the thought of moving them to perhaps a ram disk aka folder2ram as used in openmediavault (debian based) but didn't find an equivalent for centos. I also looked at the size of /var/log and on my system it is ~4gb with journal of ~3.9gb which would need a lot of ram! I thought of just making a new partition on the raid1 hdd and mounting a volume there for /var/log and/or reducing the size of the journal. I researched reducing the size of a xfs formatted drive (I used xfs for the raid1 hdd partition) not looking good apart from a backup, repartition and restore to make the change.
So, after the long story.
I'm in no immediate rush and just pondering this. I have a suspicion that a few others on here have a similar layout so they might also have the same potential issue and/or a work around or some thoughts to add.
Simplest solution is to buy another small ssd, copy the existing ssd and swap them.
Change the size of the journal and work out how to use a ram drive for logging (with copies to/from disk on a reduced schedule to drop the number of writes down)
Rebuild the raid1 array to have partitions for /var/log and maybe swap as well as data.
Write about it on here and have a few beers (I don't like wine so that's out) and ponder.
Option 4 is winning and I can see option 1 being a required 2nd option if I spend to long on option 4.
...

Offline sages

  • *
  • 182
  • +0/-0
    • http://www.sages.com.au
Re: observations, thoughts on disk topology and ssd usage
« Reply #1 on: May 08, 2023, 03:44:46 AM »
Well, turns out option 4 was the best bet. Without mentioning any names, someone managed to confuse a raw value with the actual value.  :oops:
So, whilst it has been an interesting thought process it would appear that the actual remaining life of the ssd is reported as 95% and, for anyone interested, on a crucial mx500 240gb ssd the raw value associated with that is 5.
I'll return to my pondering.  :-)
...

Offline ReetP

  • *
  • 3,731
  • +5/-0
Re: observations, thoughts on disk topology and ssd usage
« Reply #2 on: May 08, 2023, 04:20:30 PM »
:lol:

I haven't got round to replacing spinning rust in my servers yet - a job for another year.

Others may have some more advice on this.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Sparkey

  • *
  • 24
  • +0/-0
Re: observations, thoughts on disk topology and ssd usage
« Reply #3 on: February 19, 2024, 04:11:21 PM »
I have been running 10.1 on two Kingston SEDC500M/960G Enterprise Drive SSD's for about a year now in software raid1.  After making a copy of my original drivedb.h and then updating that file with the most current one on github's smartmontools page, the smart tools gives me the correct info/status on my drives.

I run "fstrim -av" via a crontab entry every monday morning at 00:45 to clear unused blocks

I'd use the fstrim timer except it resets to off after a system software update and I'm too lazy to look into creating a service that would turn that timer on autmatically at boot.....

6,977 hours (290 days) and smart shows 99% life left on both drives.





Offline Jean-Philippe Pialasse

  • *
  • 2,761
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: observations, thoughts on disk topology and ssd usage
« Reply #4 on: February 19, 2024, 07:35:55 PM »
i moved to ssd for system and raid 1 with two spinning rust for files. 
i am in the process of migrating to ssd without raid for files too.  relying on daily backups in case of issues with disks. This is for personal use. your mileage may vary depending on how down time is acceptable.