Re: a new install - - - putting the system on raid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 24/06/2022 à 01:44, Wol a écrit :
On 23/06/2022 23:27, Pascal Hambourg wrote:

Firstly, the system shouldn't be swapping. MOST systems, under MOST workloads, don't need swap.

Conversely, some systems, under some workloads, do need swap. And when they do, swap needs to be as reliable as any other storage space.

And if your system is one of the ?majority? that shouldn't swap, the cost/benefit analysis is COMPLETELY different for swap than for main storage. So don't treat them the same.

If your system should not swap, then why use any swap at all ?

And secondly, the *system* should not be using swap. User space, yes. So a bunch of running stuff might crash. But the system should stay up.

Firstly, the *system* is not only the kernel. Many user space processes are part of the *system*. Secondly, you were the one who wrote:

"/tmp - is usually tmpfs nowadays, if you need disk backing, just make sure you've got a big-enough swap (tmpfs defaults to half ram, make it bigger and let it swap)."

And? /tmp is *explicitly* not to be trusted in the event of problems. If you lose a disk and it takes /tmp out, sorry.

Source ?

If the tmp-cleaner decides to do a random "rm /tmp/*" at an inconvenient moment, well, if the system can't handle it then whoever set the system up (or wrote the program) was incompetent.

Cleaning /tmp is not the same as loosing access to it. Opened files are still accessible.

Raid is meant to protect your data. The benefit for raiding your swap is much less, and *should* be negligible.

No, this is what backup is meant to. RAID does not protect your data against accidental or malicious deletion or corruption. RAID is meant to provide availabity. The benefit of having everything including swap on RAID is that the system as a whole will continue to operate normally when a drive fails.

And how does backup protect your data when the system crashes? You know, all that web-shop data that is fresh and new and arrived after the most recent backup 5mins ago?

Use RAID, so that the system does not crash when a drive fails.

(Oh, and I didn't tell o1bigtenor NOT to raid his swap. I asked him WHY he would want to. Maybe he has good reason. But I know him of old, and have good reason to suspect he's going OTT.)

I think you do not need a good reason to have swap on RAID when all the rest is on RAID. It is the other way around : you need a good reason not to have swap on RAID.

I run xosview. Even with gentoo, and a massive tmpfs, swap in-use sits at 0B practically ALL the time. Why would I want to protect it?

Because you may not want anything to crash when a drive fails while the swap is used. If you don't care, well, don't protect the swap.



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux