0

I have a new server with 2x3TB HDD, I want to setup software raid 1; When I use host's automatic install it makes my largest partition 2TB and the other 1TB a separate partition (not nice). So I am trying to create the partitions myself and I never done it before, not for Plesk. I was wondering if these two setups look OK.

The first one is made by a Youtube tutorial while trying to guide by this Plesk recommendation.

On the second setup I tried to add the swap space as a separate raid ("md"?) device because that is how I see it on some other Plesk servers that I have with smaller (2TB) HDD.

Does this look OK, is the second one safe to use?

enter image description here enter image description here

adrianTNT
  • 1,077
  • 6
  • 22
  • 43
  • 1
    Please don't ruin a perfectly good server by installing Plesk. – EEAA May 19 '15 at 03:45
  • I used Plesk for the last 9 years and I find it kind of stable. And the license I get is 2 Eur/mo where cPanel was around 20-30Eur/mo. – adrianTNT May 19 '15 at 10:49
  • Well you should know this: don't expect to get any help here with your server if you install either Plesk or cPanel. They both do horrible things with your server, making them completely un-maintainable by any reasonable methods. You'll have to stick with Plesk-specific support. But I should ask: why do you think you need a control panel at all? It is very much worth committing to learn proper CLI-based systems administration. – EEAA May 19 '15 at 13:08
  • I depends on your needs. On one server I have around 30 sites to maintain, check traffic, sort by monthly traffic, add databases, users, synchronize hosting quota and performance limitations with a click, etc, that is best done by a control panel like Plesk. On another server I built a domain parking service, there I would not have Plesk because my scripts would handle hosts and DNS entries. – adrianTNT May 20 '15 at 23:03

1 Answers1

1

Both approaches are OK. What you want is for your swap to be continuous and not fragmented, and both approaches will ensure that.

LVM can cause fragmented volumes, if you extend/shrink them often, but since swap is defined at creation time, it should stay pretty much continuous.

With second approach, you have a downside of not being able to easily extend swap. Ofcourse you can always add another swap volume, which will be similar to extension of the existing one in LVM regarding fragmentation (but you'll have to separate volumes, instead of one that consists of two parts).

So, both approaches are fine. I would choose the first one, because messing up with partitions post-install is much harder and often requires downtime/reboot while LVM is flexible and enables you to do online manipulations of volumes.

But then again - you don't want your machine to start swapping in first place. Swap is like a last line of defence for memory exhaustion. Try to tune your machine to avoid relaying on swap memory.

Jakov Sosic
  • 5,267
  • 4
  • 24
  • 35
  • The server has 16GB of ram, I think is too much for my needs, so I think the swap will not need re-size in future. – adrianTNT May 18 '15 at 17:52
  • Jakov, one more question ... should I install the botloader under /dev/sda (default) or should I set it to /dev/md1 ? That youtube video says if left to default, then it will not boot when one HDD fails. – adrianTNT May 18 '15 at 18:07
  • I would install it on md1 (/boot mountpoint). Just remember to set those partitions as active. – Jakov Sosic May 18 '15 at 18:41
  • After install it didn't boot, how/where was I supposed to set them as "active" ? because I think this is the problem – adrianTNT May 18 '15 at 23:56