Author Topic: Partitioning eBox for RAID1?  (Read 3881 times)

mlanner

  • Zen Apprentice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Partitioning eBox for RAID1?
« on: May 25, 2008, 02:38:04 am »
Hi,

I'm building an eBox system with RAID1 that will mainly be used a file server. Can anyone suggest a good partitioning scheme for it?

Any suggestions would be greatly appreciated.

Thanks in advance.

jcanfield

  • Zen Monk
  • **
  • Posts: 89
  • Karma: +2/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #1 on: May 25, 2008, 04:18:48 pm »


I'm building an eBox system with RAID1 that will mainly be used a file server. Can anyone suggest a good partitioning scheme for it?


For a file server, you will only need a separate partition for /home. 
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius...and a lot of courage - to move in the opposite direction."  --  Albert Einstein

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: Partitioning eBox for RAID1?
« Reply #2 on: May 25, 2008, 05:28:47 pm »
Take into account logs are stored in /var partition as well. :)
My secret is my silence...

haliparotin

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #3 on: April 19, 2010, 06:04:47 am »
hi! i want to make Ebox and set to PDC whats the proper partition i can make? im use a 120GB?
can you gave by percentage in partitioning.. because if in-case i easy to change the hard disk.. thank you..

alvinquah

  • Zen Warrior
  • ***
  • Posts: 128
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #4 on: April 19, 2010, 08:50:07 am »
well, for a start you can set 200MB for the boot partition. And you can put the rest to /. But if you want to be more specified you can create /home separately for ease of backup.

haliparotin

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #5 on: April 19, 2010, 10:13:15 am »
Thank you for answer to my question...you mean i create a 200MB for /boot and the rest i set to /. how about the /var and /home.. its that ok to set on this two / and /boot? i hope you gave me a exact partitioning.. THANK YOU..

alvinquah

  • Zen Warrior
  • ***
  • Posts: 128
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #6 on: April 19, 2010, 11:34:19 am »
yes, you can just put /boot and /. But it will defeat the purpose of manual partitioning. In case of boot partition corruption, you will be able to save it but when / is corrupted, your /home will be corrupted as well. In other word, try to define a separate partition for /home. Size up what size you will be needed for the files and other stuffs and define /boot. /home and the rest to /


SamK

  • Zen Samurai
  • ****
  • Posts: 283
  • Karma: +3/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #7 on: April 19, 2010, 02:45:02 pm »
Hi haliparotin,

I see alvinquah is giving you some good advice here.

There is no single, universal partitioning model to use.  The number and size of partitions really depends on what you want to achieve, and the amount of your data.

It is perfectly possible to put everything (except swap space) under /.  If you do not intend to go as far as using LVM on RAID arrays, /boot can also be included under /.  As mentioned by alvinquah the main advantage of having multiple partitions is that the data within one may still be accessible in the event of a different one becoming corrupt.  This is why it is widely accepted to be good practice to put /home on its own partition even when this means your system will have only three partitions (/, /home, swap).

Partitioning, however, does not provide protection against the failure of a disk.  In your original post you mention a 120GB disk.  Is this the only disk in your system?  If yes, and the disk itself fails it is quite possible that everything it contains may be lost irrespective of the way in which it is partitioned.
« Last Edit: April 19, 2010, 02:58:51 pm by SamK »

haliparotin

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #8 on: April 20, 2010, 04:05:45 am »
hi! SamK and alvinquah... THANK YOU for give me an idea and help for what Im doing to may Ebox.. yes SamK i have only 120GB harddisk... i think i need extra hardisk for my /home.. Ok i try what you say, i create 3 partition (/ , /boot and /home)... in-case i have some question Im post again here. THANK YOU...

VitRom

  • Zen Apprentice
  • *
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #9 on: April 20, 2010, 09:10:46 am »
Pls note that using non-Ext3 FS for /home will fail. I have a very bad xperience with attempts to use a JFS that's most suitable for a generic fileserver. After eBox (re)makes some internal changes a /home fails to mount on a next reboot -- just because mounttab contain a stupid mountopts like "quota" and similar trash that JFS can't understand %-)

SamK

  • Zen Samurai
  • ****
  • Posts: 283
  • Karma: +3/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #10 on: April 20, 2010, 10:37:07 am »
...i think i need extra hardisk for my /home
This is indeed an improvement on a single disk system.  However, doing this will give you only a single copy of your data:
  • 1 x eBox data (/boot, /) on your first disk
  • 1 x user data (/home) on your second disk
In the event of either disk failing the data it contains may be lost.  The eBox data may be recreated by reinstalling on a new disk.  This cannot be done for your user data; unless you have a backup copy it may be permanently lost.

You might find it helpful to investigate an alternative use for your second disk, as a mirror of your first disk.  This configuration is known as RAID1. The tools to do this (mdadm) are contained in the ebox-installer CD-ROM in the same section used to partition a disk.  With this system you decide which partitions you want to create but would not dedicate your second disk to /home.

The main benefit of this is that your system will dynamically create a copy of all your data:
  • 1 x eBox and user data (/boot, /, /home) on your first disk
  • 1 x eBox and user data (/boot, /, /home) on your second disk
In the event of either disk failing the data it contains may be lost but your system will still function using the mirrored copy.  Replacing the failed disk will then return you to the position of having two full data sets.

Regular backups should still be made as RAID is not a replacement for a backup system - it is protection against hard disk failure.


...i create 3 partition (/ , /boot and /home)...
When installing Linux the conventional practice is to include a partition to be used as swap space in addition to any other partitions you create.  To illustrate this, the majority of Linux installers offer to automatically partition your disk as part of the installation process.  Choosing this option will usually create only two partitions (/, and swap).  A swap partition of 1GB will be suitable in most cases.

haliparotin

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #11 on: April 21, 2010, 04:44:29 am »
hi! VitRom and SamK Big THANK YOU for giving a idea for partitioning. Sir i try your instruction.
1 x eBox data (/boot, /) on your first disk
1 x user data (/home) on your second disk

 In Case my first harddisk is fail how can i repair? if my 2nd disk have a /home? i need to install new harddisk?

i try this to Raid

1 x eBox and user data (/boot, /, /home) on your first disk          (120GB)
1 x eBox and user data (/boot, /, /home) on your second disk     (160GB)

 and how i can setup a Raid in Ebox 1.4? because i try to set onboard RAID and set this to RAID1, then i install ebox 1.4, on installation the other harddisk is still there? they have something wrong to my setup? what i can do?

my harddisk now is 1st 120GB and 2nd 160GB i set this to RAID1, and now im using Ebox 1.4 install (iso). THANK YOU for your helping until now i cannot finish this work :( ...

haliparotin

  • Zen Monk
  • **
  • Posts: 63
  • Karma: +0/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #12 on: April 21, 2010, 04:50:04 am »
by the way on 1 x eBox data (/boot, /) on your first disk how i can partition this? by percent? thank you...

SamK

  • Zen Samurai
  • ****
  • Posts: 283
  • Karma: +3/-0
    • View Profile
Re: Partitioning eBox for RAID1?
« Reply #13 on: April 21, 2010, 11:22:01 am »
1 x eBox data (/boot, /) on your first disk
1 x user data (/home) on your second disk

 In Case my first harddisk is fail how can i repair?
As mentioned previously:
Quote from: SamK
The eBox data may be recreated by reinstalling on a new disk.
You will also need to reconfigure eBox manually.

Alternatively, if you have a backup of the eBox data, this could be restored to the new disk.




if my 2nd disk have a /home? i need to install new harddisk?
I do not fully understand this question.  If one of your disks fail only the failed disk will need replacing.




...i try to set onboard RAID and set this to RAID1, then i install ebox 1.4, on installation the other harddisk is still there? they have something wrong to my setup? what i can do?
While you are experimenting and learning you might find it easier not to use hardware RAID devices built into your motherboard/daughter-board.  eBox uses software named mdadm to create the RAID arrays.  Try connecting each hard disk directly to separate motherboard channels and deactivating on-board RAID.  Each disk should be a master.




i try this to Raid

1 x eBox and user data (/boot, /, /home) on your first disk          (120GB)
1 x eBox and user data (/boot, /, /home) on your second disk     (160GB)

 and how i can setup a Raid in Ebox 1.4? because
As mentioned previously:
Quote from: SamK
The tools to do this (mdadm) are contained in the ebox-installer CD-ROM in the same section used to partition a disk.  With this system you decide which partitions you want to create but would not dedicate your second disk to /home.

When booted from the ebox-installer CD-ROM, this must be conducted manually in the partitioner section.  The basic steps are:
On the first hard disk
  • Create the partitions
  • Mark one as bootable
  • Mark each to use in RAID
On the second hard disk
  • Repeat the steps conducted on the first hard disk, making sure the partition sizes are identical on both disks
Configure the RAID Arrays
  • Specify array type as RAID1
  • Add the components in pairs - one from each disk
Format each array
  • Create your choice of filesytem on each array

To increase your chances of success, and reduce the number of difficulties, you may find it helpfull to research about software RAID, RAID1 arrays, mdadm, and Ubuntu 8.04 Server LTS.  Keep your initial experiments as simple as possible (only / and swap).  Once you understand how things work you can start again from the beginning and build the system you require.

As a starting point this tutorial might be helpful:
http://www.howtoforge.com/how-to-install-ubuntu8.04-with-software-raid1

Good luck.
« Last Edit: April 21, 2010, 12:10:32 pm by SamK »

Sam Graf

  • Guest
Re: Partitioning eBox for RAID1?
« Reply #14 on: April 21, 2010, 01:48:24 pm »
Just to mention it, the eBox documentation also includes a suggested partition scheme.