Hardware RAID or Software RAID? and TRIM with SSD's in softraidRAID1 and pfsense
I have a current system using a Suupermicro a1sam-2550f and an Intel enterprise SSD, with TRIM enabled. I see that during installation after 2.2 I have the option of doing softraid if pfsense detects two drives. Is this a good option or is it really worth trying to get a controller card working etc? Also, am I going to have any issues using TRIM on a softraid system with BSD like this. AFAIK, TRIM still needs manually enabled via the CLI and isn't an option during installation, and I know that some say not using TRIM on modern SSD's is OK. I'd rather go the safe route and use TRIM, and was just wondering the viability of using it on 2 SSD's. Also, is there the option to do softraid with more than 2 drives?
Thanks for any replies in advance.
RAID is for uptime. So if this PFSense box is critical, i.e you loose money if it goes down, or you have some important services behind it that should always be available then having raid is a good idea.
If not, i don't think it would be worth the trouble.
I can't answer the question about trim withou knowing the make and model of your SSD.
TRIM only marks the wiped data on the blocks to be ready to overwrite, if not after a longer time period
the SSD would be slowing down more and more because for the controller chip on the SSD it would be
even more and more difficult to find free blocks where the data should be written on, and then often
the SSD is able to creep down or is still dying. And only to prevent the SSD or mSATA from this
behavior you should enable TRIM for a better and longer live time of your SSD, not more but also
In normal if a RAID level was built, the SSD/HDDs are getting the commands from the controller
and often this is a hardware based PCIe card. They also support TRIM, but only for non RAID or
for the single or JBOD mode and not for any RAID level. If this is a software RAID you will be able
to use, things could be changing and you will be able to activate TRIM support, but TRIM together
with a RAID level would be better to answer from the pfSense developers.
At the moment I am using a single intel enterprise SSD. I wasn't thinking I would be able to add it to another array, so more than likely I would just be purchasing two new SSD's for this process. I wouldn't use a controller card if there is a built in available softraid that pfsense configures during an install when it detects two drives. This is now in fact the case correct? It offers to do softraid mirror is there are two matching drives detected? The question I guess is: once I am using pfsense's softraid, am I really going to have THAT much shorter lifespan on them if they don't have TRIM enabled? Or ideally, is it possible to setup to SSD's with pfesense's softraid, and have them both utilize TRIM, on any two matching SSD's? I would think that would be a great option for redundancy for a lot of people using pf and building routers like this. I imagine it could also be configured for email messages in case of a drive (or pending) failure as well? I wonder if there has been any thought given to a hotspare or a warmspare as well. Any help is greatly appreciated. Thanks again!
Bump. I still haven't been able to get an answer on this. Does anyone know if it is in fact possible to run SSD's in a softraid (GEOM setup during install) mirror and enable trim?
There's a GMIRROR RAID option in https://store.pfsense.org/XG-1540/ so it should be possible, I think.
personally this seems like a waste of time & money.
pfSense (generally ) doesn't store data, so basically theres not data to protect. The config is stored in a single xml file file.
my take on it:
Have a spare drive nearby with a pfSense already installed on it. When a disk fails, replace it with the offline spare, reboot, import recent config.
this takes less then 5 minutes.
If you want redundancy, don't waste it on raid … go all the way & setup CARP
After install and config is done, it can be used the DiskDump command to clone such a drive
so it will really take only 5 minutes, by installing both and boot from drive one and if this will
be failing, only one reboot from drive two is needed then!
I marked this thread for assistance from the development team to give an right answer to this question.
The original question is more of a question for a FreeBSD forum than here.
- The MIRROR geom(4) class now supports BIO_DELETE. This means TRIM command will be issued on supported devices when deleting data.[r238500]
So if you're on pfSense 2.2 or later (which use FreeBSD 10.x, which is after 9.1) then it should be OK to combine TRIM with gmirror.
Whether it's worth it or not is up to you. It does not need an extra controller, it's entirely software RAID. Plug in another drive of identical size and reinstall using the gmirror option to make the mirror.
Whether or not it's better or faster than simply reinstalling to a new disk is up to you and your hardware. Where possible I like to err on the side of caution, but if you're really cautious you'd have an HA pair so RAID would not be so useful since if a disk died you can just power off the box and work on the failed unit without actual downtime.
If you don't have an HA pair, RAID can save you some time where you can be up and schedule a disk replacement rather than having to reinstall on the spot with some downtime.
I tried what jimp suggest on my pfsense 2.2.6 and creating was mirror was very easy like He said from install menu just select 2 disk for geom mirror and then proceed with quick install. Then replacing failed drive could be done from GUI without the need of CLI.
My question is after the mirror was made during the install and pfsense is up and running, is it the the same way to enable trim like it was on single ssd drive ?
Meaning reboot in single use mode and do: /sbin/tunefs -t enable /
or is done different way on geom mirrored drives ?