You are not logged in.

#1 2016-11-24 22:31:10

kadza
Member
From: Serbia
Registered: 2016-11-11
Posts: 6

RAID0 Problems

Hi everyone,

I'm fairly new to arch so that is why i am posting here.

I have installed arch multiple times both on ssd and hd's but now i have come across machine that has 2 HDD (identical), and i want to run them in RAID0 my question is how do i format the partitions correctly since nothing on the wiki says how to partition the drives to get them ready for RAID setup.

I usually partition my non raid hdd like this.

1. boot (EF00 for UEFI) 1GB
2 swap(8200)
3. root(8300) 20GB
4. home(8302) ~

What would be the optimal thing to do when partitioning for RAID setup do i get 1GB boot on both HDD or 0.5GB distributed across those two. I would be super grateful if somebody is to help me our or at least point me out to good read so i can handle this.

Offline

#2 2016-11-25 04:13:26

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: RAID0 Problems

The wiki covers setting up RAID, including partitioning the drives: https://wiki.archlinux.org/index.php/RA … he_Devices

There is also an article covering installation on RAID: https://wiki.archlinux.org/index.php/So … ID_and_LVM

I would strongly caution you against using RAID0 though. The zero stands for how much data will remain if a drive fails, and with 2 drives you are twice as likely to experience a failure as you are with a single drive.

Offline

#3 2016-11-25 13:22:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: RAID0 Problems

Splitting each logical partition across physical hardware just for the sake of splitting it across hardware is a horrible idea.  You'd get the worst of both worlds (or really the worst of many worlds) for no benefit at all.

And having logical partitions on one drive or the other presents a new option.  One drive can house boot root and swap, and the other can have your home partition.  If this layout seems reasonable, you can (and should) do this without RAID0.  So you can have this layout without RAID, or you can have this layout with RAID0 which adds complexity, adds another point of failure, likely makes recovery more challening all in exchange for absolutely no benefit.

The only benefit might be allowing the home partition to use all of one drive and part of the other.  But this most definitely does not require RAID0.  LVM alone could do this.  Or if you ask me, just having an additional partition would be even better, e.g. /boot, /, swap, and ~/media (or something similar) on drive one and the rest of /home on the other.  The media partition can be mounted under your users home directory giving you more than the one full drive space under your home.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2016-11-25 15:34:10

kadza
Member
From: Serbia
Registered: 2016-11-11
Posts: 6

Re: RAID0 Problems

fukawi2 wrote:

The wiki covers setting up RAID, including partitioning the drives: https://wiki.archlinux.org/index.php/RA … he_Devices

There is also an article covering installation on RAID: https://wiki.archlinux.org/index.php/So … ID_and_LVM

I would strongly caution you against using RAID0 though. The zero stands for how much data will remain if a drive fails, and with 2 drives you are twice as likely to experience a failure as you are with a single drive.

I have been reading the wiki for quite some time trying to figure it all out but thanks for LVM link.

And i think you guys misunderstood me i need no data redundancy whatsoever i only need best r/w speed that i can get since i store all my critical data on cloud, i may consider RAID0+1 for some redundancy but right now my main focus is understanding how to correctly partition disks.

Offline

#5 2016-11-25 15:57:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: RAID0 Problems

If you don't need redundancy, why are you trying to set up a RAID? (R = Redundant).

I'm pretty sure I understood your desires well, I'm just baffled about why you think RAID would be a good way to acheive your goals.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2016-11-25 16:15:33

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: RAID0 Problems

My recommendation would be a small partition for /boot (AFAIK only RAID1 is bootable, so 100MB or so) and a partition taking up the rest of the disk for the RAID0. Then use LVM to divy up the RAID0.

That's more or less how my work machine is setup, though I stick with RAID1 for both:

md10 : active raid1 sda1[0] sdb1[1]
      102336 blocks super 1.0 [2/2] [UU]
      
md11 : active raid1 sda2[0] sdb2[1]
      838729728 blocks super 1.2 [2/2] [UU]
      bitmap: 1/7 pages [4KB], 65536KB chunk
NAME                   TYPE  FSTYPE            LABEL               MOUNTPOINT
sda                    disk                                        
├─sda1                 part  linux_raid_member caddywhompus:boot                           100M
│  └─md10              raid1 ext4              boot                /boot                   100M
└─sda2                 part  linux_raid_member caddywhompus:system                         800G
   └─md11              raid1 LVM2_member                                                 799.9G
     ├─raid1-root      lvm   ext4              root                /                        10G
     ├─raid1-data      lvm   ext4              data                /mnt/data               500G
     ├─raid1-pkg       lvm   ext4              pkg                 /var/cache/pacman/pkg     5G
     ├─raid1-var       lvm   ext4              var                 /var                      2G
     ├─raid1-libvirt_1 lvm   xfs               libvirt_1           /mnt/libvirt/1          250G
     └─raid1-home      lvm   ext4              home                /home                   2.9G

(sdb looks exactly the same of course)

Last edited by alphaniner (2016-11-25 16:22:09)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#7 2016-11-27 21:29:26

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: RAID0 Problems

kadza wrote:

... i need no data redundancy whatsoever i only need best r/w speed

Fair enough -- it would be remiss of us not to warn you of the risk though before we knew this. If you're aware of the risks and make an educated decision then well and good smile

The short answer to your original question, assuming you are going to use the whole disk is to create a single partition that fills the disk and set it's partition type to 'FD'. You can use the whole disk directly (eg, /dev/sda) but creating the partition and setting the partition type is good administrative practice to help identify the contents of the disk (for humans and the machine).

If it's R/W speed you need (you haven't specified if it's raw throughput or IOPS) perhaps an SSD would help, depending on the amount of storage you need.

Offline

Board footer

Powered by FluxBB