3

I have a dedicated box whose specs are:

CPU: 4-core Xeon 3450 *1 (HT enabled)
RAM: 8GB DDR3
HDD: 15k SAS 147G *2 (currently in RAID 1)

The current OS is Windows Server 2003. I am running a web server (with a couple of websites), a mail server, a svn server (based on apache), and quite a few game servers on it. I'm now planning to switch the OS to ubuntu server and break the RAID to double the storage space. What partition scheme do you recommend to make the most out of the dual HDD setup?

Jermin Hu
  • 43
  • 1
  • 4
  • 1
    With that many services you plan for the new server (mail, svn, web, game) i wouldn't break the RAID. Use RAID1 again! If space is not enough, buy bigger HDD's or more HDD's (if your RAID controller can handle more than 2 HDD's) – frupfrup Dec 11 '14 at 15:17

2 Answers2

5

I recently wrote a long answer on why you'd want partitions in the first place here.

In short:

  • use LVM and not native partitions.
  • two LVM partitions (one for swap and the second with a root file system containing everything) is not necessarily bad.
  • more partitions can be beneficial, but if you do, start with minimally sized ones and leave space unassigned so you can allocate more to the right partition(s)

LVM allows you to grow partitions and their file-systems and if you buy additional disks in the future you can you can add that capacity to an existing LVM volume group, allow you to grow partitions online, without moving data.

Sacrificing redundancy for capacity may bite you in the ass.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • But I heard that when using 2 HDDs with LVM, I will lose all the data if one of them is broken. – Jermin Hu Dec 11 '14 at 15:58
  • Not if they're RAID mirrored, no. – MadHatter Dec 11 '14 at 16:00
  • Hence the strong recommendations from Hyppy and frupfrup not to break the raid mirror and if/when you add additional disks use the raid controller to provide redancy. – HBruijn Dec 11 '14 at 16:02
  • My knowledge regarding linux is very limited. Could you please briefly explain the differences between LVM mirror and RAID 0? – Jermin Hu Dec 11 '14 at 16:10
  • You don't use LVM for mirroring, use the raid controller for that. When you add new drives you get a second raid1 volume and use LVM to combine them, because the alternative is to use the RAID controller to go to another raid level, which means backing up and restoring your data. – HBruijn Dec 11 '14 at 16:21
  • So what I need to do is keep the current RAID, nstall ubuntu server and then prepare LVM? – Jermin Hu Dec 11 '14 at 16:26
4

First off, I recommend not breaking the RAID. The performance and reliability gains of RAID-1 over 2 independent disks are worth it.

If you're not particularly well-versed in Linux, the default partition scheme that Ubuntu suggests is generally fine. If you have other needs, then here's a good starting point. Adjust as necessary, for example if you have a specific application that will take up 40GB in /opt.

/ - 50GB - ext4 file system
SWAP - 16GB - swap file system
/var - 10GB - ext4 file system
/home - remaining space - ext4 file system
Hyppy
  • 15,458
  • 1
  • 37
  • 59
  • Thanks for you reply. But is there really a performance gain for RAID 1 than non-RAID? The RAID controller of my box is internal SAS 6/iR. It seems that it can't read from both drives simultaneously. So where does the gain come from? – Jermin Hu Dec 11 '14 at 15:30
  • 3
    @JerminHu: This is not about the performance gain, but about resilience to failure. With two disks in independent mode your server is down (or at least has serious issues) if a disk breaks. With a RAID1, you can replace the disk while the server continues to work. – Sven Dec 11 '14 at 15:32
  • 2
    Agreed, it's really about resiliency. That said, I sincerely doubt that SAS6/iR can't handle simultaneous reads across RAID members. – Hyppy Dec 11 '14 at 15:34
  • With this scheme, is it that all the server applications will be installed (e.g. apache, mysql, svn and game servers in /home? Shouldn't web pages be located in var/www? It seems to me that the size of /var is bit small. – Jermin Hu Dec 11 '14 at 15:40
  • The Apache installation itself is just a binary and a handful of configuration files, which will be in `/bin` and `/etc`. If you need more space in `/var` because your website or MySQL database is going to have a large amount of data (>1 GiB?) then by all means, increase `/var`. The reason to have `/var` separate is that you don't want a runaway logfile to bring your entire system to its knees. – Hyppy Dec 11 '14 at 15:42
  • The size of all the game server files is about 50 GB. So they will be placed in /home? I'm currently running out of HDD space. But I can't afford to buy another drive at the moment. I initially set up a RAID 1 when I bought this box because I had a terrible experience with Seagate SATA2 drives. I broke 2 RAID 0 setups due to their poor reliability. But I thought non-RAID SAS will be much more reliable than SATA2 RAID 0, isn't it? – Jermin Hu Dec 11 '14 at 15:56
  • The game server files can be placed wherever you'd like. Put them in `/home`, `/var`, `/mylittlepony/`, wherever. Sit down and plan out where your space should be allocated. As far as the cost goes: we generally handle production server environments here, and production quality work often requires production quality investments. If you want to split the RAID up into independent disks, then by all means have a blast. You asked for a recommendation from professional sysadmins, though. – Hyppy Dec 11 '14 at 16:01
  • OK. I'll keep the RAID 1. – Jermin Hu Dec 11 '14 at 16:16