RAID Question

RAID Question

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

RAID Question

Post by Prominence »

Can one partition of RAID 0 be striped across two different RAID controllers under one chipset?

I think the answer is probably yes, but just want to make sure.
Last edited by Prominence on 29 Apr 2012, 14:53, edited 1 time in total.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: RAID Question

Post by SwiftSpear »

I've never heard of it being done. I'm not an expert on the topic though. Why would you span a RAID across multiple controllers?
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

not sure I understood your question: what is "one partition of RAID 0"?
In case you meant "can a raid 0 be spanned": hw raid: no, sw raid: yes

But it sounds insanely dangerous to me - can you describe what you want to archive?
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

If you really want to get technical about usage of word spanning, then I made a mistake. What I meant was striped the hard drives across two different raid controller.

If you answered yes, I want to hear some of reliable options.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

No offense intended - I just wanted to be sure, I understood you correctly.

With normal raid controllers it is not possible to create a stripe across multiple controllers. The controllers would need to work together for that - maybe there are controllers that support that... never heard of it though...

IMO your best chance is to use controllers with the most connectors possible, and to then create the stripe with the OS. Modern CPUs are good enough for that.

If you buy a complete rack full of HDDs, afaik it is done with multiple controllers switched with FC.
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

Ok, now we have established that this setup is possible, I want to step up the question and ask situation where two partitions loaded with different operating system under one RAID 0 striped across two different controller. Let say I have four SSDs to raid, with Intel chipset that have two 6Gb/s ports from the chipset and two more 6Gb/s from another raid controller. Now, operating system RAID most likely won't be recognized by other OS given that the one is not derived from the other OS. Since, Intel chipset have onboard firmware RAID, and it is supported under multiple OS, would that do the trick?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: RAID Question

Post by SpliFF »

I believe you need to be on the same controller to do "fakeraid" and that may rule out making the array bootable. However you do have the option with linux and win7 of making small non-raid boot partitions that bootstrap into a "software" RAID that can span controllers. They don't even have to be RAID controllers.

To summarise the primary difference between "fakeraid" and "software raid" is the ability to boot DIRECTLY off the array. The reason for this is that under fakeraid the controller has just enough smarts to tell the bootloader how to use it without requiring drivers and a raid software stack. Once the linux or NT kernel and modules are loaded the situation changes and software raid can finish the boot process (especially with the help of a ramdisk for early userspace module loading).

With regards to the OS seeing each other it's a one-way thing. That is, linux can read and write Winblows "Dynamic Disks" and NTFS formats but Winblows can't (or more precisely won't) do the same. If you make your Winblows RAID bigger you can use it for shared data.

So yes, you can do exactly what you asked provided you reserve some space for non-raid boot partitions to bring up your arrays. The linux one can be as small as 5 MB but the windows one might actually have to hold signicant parts of the WINDOWS folder. I'm a little uncertain on just how much of Windows is required to boot. Win7 comes with a 100Mb "System Reserved" partition but I can't find any information on wether that's capable of bootstrapping to software raid.

One tip I came across recently is that windows supports something called an "NTFS Junction". It's basically a more limited form of a linux "mount" that will allow you to pretend certain folders are on C: but actually store the files on another drive (or in this case your raid). What I'm getting at here is that you may be able to move things like Program Files and Users directories across to your software RAID without causing windows to spaz out.

You will also find there's no real performance loss from spanning controllers and possibly even a perfomance gain since it helps prevent the controller itself from being a bottleneck. Forget what you've heard about software RAID being slow; a RAID 0 or 1 will eat less than 1% of a single core on a modern PC even under load.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: RAID Question

Post by SwiftSpear »

So as I understand it, you're trying to make more than 1 logical partition on a set of linked raid 0 drives? I don't think that should be done via multiple raid controllers, if it's possible.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: RAID Question

Post by SpliFF »

@SwiftSpear: The way I read it he has 2 controllers with 2 ports each and 4 physical drives so it would appear spanning controllers is the only option he has that would give him simultaneous read/write on all 4 drives given the hardware he has already.

His only other option would be 2 arrays using 2 drives per array but that would mean only 2 drives active at once and he'd have less flexibility on the array sizes (each could be no more than 50% of the total space). The benefit would be that in this configuration the arrays are bootable via fakeraid and half as likely to have failure (more drives means more risk in RAID 0).

Spanning controllers does not increase risk or affect speed. fakeraid and software raid both use the CPU almost exclusively. Only true hardware raid offers any performance benefit (at a high cost though). In software RAID the OS couldn't give a rats arse where the invidual drives are or even their type or size. As long as the drive can be mounted and is writable then it is a valid software raid target. If you want to mix IDE and SATA drives in an array the OS won't care. The drives can even be different sizes but in that event you are limited by the size of the smallest drive.

To be clear about it, software raid is applied to partitions. It doesn't know or care what hardware those partitions are on. It's even perfectly legal to make an array from partitions on the same disk (but that would be silly).
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

I support all that SpliFF said.

I would recommend to use Windows partitions (dynamic or not) under Linux only if performance doesn't matter. Speed is low and it uses a lot of your CPU time - it is very stable though.
Another approach could be to use an ext3 driver for Windows (http://sourceforge.net/projects/ext2fsd/). They have much better performance, but stability seems to vary for some people. If you go that way make a lot of testing before you put sensible data there...

If you will (imo should) use software raid instead of fake raid, the best option imo is to make separate raid sets for Windows and Linux. You can use partitions of the same size on each disk. Then make a FAT32 or NTFS partition on a non-raid partition to share data.
I don't know your exact use case, but if it is an option to go this way, it'll be hassle free, stable and perform well (as each OS can use its preferred mechanism). In the long term stability and ease of use will be a win against your loss of some shared disk space and speed. .... oops... that wasn't your question... sorry I dropped my opinion :)
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

Just to be clear, I want to stripe across not span across.

I am just going to virtualize the Windows on linux so that I can have access to 2 OS at same time instead of writing to separate partition.

What are some feature rich virtualization software?

Would ext4 or NTFS be better for 4 SSDs in RAID 0?

Should I disable journaling?

What's more reliable option? Is it Intel's fakeraid or Linux OS raid and explain why.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

Prominence wrote:I am just going to virtualize the Windows on linux so that I can have access to 2 OS at same time instead of writing to separate partition.
[..]
Would ext4 or NTFS be better for 4 SSDs in RAID 0?
If you run Windows in a VM on a Linux host, then your choice of file system depends on the virtualization software.
Prominence wrote:What are some feature rich virtualization software?
Generally:
For servers: Xen, VMWare and KVM (in that order),
for desktops: VirtualBox, VMWare and KVM (in that order).
Why different? -> Management tools, drivers and power management.

Things to consider:
* if you want to run a Windows VM on a Linux server, then Windows will have the best performance inside a VirtualBox VM, while all other OS run faster on Xen and VMWare hosts.
* a Linux VM has the highest CPU performance on a KVM host. But KVM lacks proper management features.
* Disk-I/O with Xen is considerably better when using partitions instead of images. That is not true for KVM, VBox and VMWare.
* Disk-I/O is heavily influenced by the choice of I/O-schedulers. Those again differ with the virtualization software... For example with Xen and a Linux-VM with XFS it is good to use no (noop) I/O-scheduler in the VM, and use the host-scheduler only.... these kind of things can be found for each solution with the help of almighty google.
BTW: For SSDs+Linux (without virtualization) it is atm recommended to use EXT4 or XFS and the deadline scheduler.
* Reserve the first core/cpu exclusively for the host. A lot of systems (hardware and software) send interrupts to the host. If the host cannot react quickly, because all cores/cpus are in use, then all VMs suffer (esp. I/O).
* Use LVM. It costs almost nothing and life is so much better.
* VMWare and VBox have paravirtualized 2D & 3D drivers that take advantage of your hosts hardware acceleration.... results may vary with gfx adapter -> very nice for desktops
* Xen shuts down all power management of the host. -> do not use on notebooks

Regarding NTFS: you must use that file system for/inside the Windows VM. The question is only where you put it (in an image or on a partition). The files you want to access from inside the VM as well as from outside/another VM should be stored on a Samba share in the host/other VM. That solution has good performance and flexibility.
Prominence wrote:Should I disable journaling?
RAID0 on 4 disks is already suicidal, without a journal it is just a quicker suicide.
If you're totally crazy about speed you can put the journal on a extra disk (which needs only some KB of size). If your SSDs max out the controllers throughput, than the journal-disk should be put on a extra channel/controller.
Prominence wrote:What's more reliable option? Is it Intel's fakeraid or Linux OS raid and explain why.
Linux RAID is well maintained and supported. If you change your controller nothing happens - everything just keeps working. Fakeraid is not faster (runs 90% on the CPU in the driver, hence fake), but the quality of the driver is much worse and less maintained than Linux RAID (which is used in 1000000 commercial NAS solutions!). Most important: if you change your controller the RAID will probably not continue to work, and your data will be inaccessible - happy vendor lock-in.
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

Your making it sound like journaling could save entire data in the drive array if one or few drives fail.

State the journaling write consumption relative to time, for example 2 megabytes a day.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

Prominence wrote:Your making it sound like journaling could save entire data in the drive array if one or few drives fail.
Uh - sorry - no... a journal doesn't save any data at all - it's only purpose is to keep the file system consistent and make an immediate recovery from a crash possible... recovery of file system consistency - not data!
Prominence wrote:State the journaling write consumption relative to time, for example 2 megabytes a day.
The journal size is static (though configurable). It is used like a ring buffer. When creating a ext4 fs, the journal size will be calculated automatically. Example size: 100GB fs -> 128 MB journal. I have read, that using bigger journals may increase performance. Though I doubt it really makes any difference, the recommendation was to use 1% of the fs size or 1GB, whichever is smaller - so max 1GB.

The journal is used with each write operation - and only for write operations. So its usage (MB/day) is dependent on the amount of writes.
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

I am also going to RAID my new laptop with SSDs.

Today I tried Debian USB live on my laptop and found that wireless card driver is missing and won't recognize the card. What a hassle, now I have to go find the driver. Any suggestion on other distribution that can support wide variety of hardware and latest hardware preferably one without Gnome 3.

For the laptop, I am going to have 1 partition of ext4 and 1 partition of ntfs for each drive and raid it under the each OS.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

Prominence wrote:Today I tried Debian USB live on my laptop
Debain is always old (aka stable), so not recommended for desktop use. I suggest you try Ubuntu, Mint, Fedora or OpenSuse. Mint is basically Ubuntu/Debian with a sane UI (Gnome3 tech, but Gnome2 lokk&feel). Fedora is quick on new technologies, but makes installing closed-source software a bit more difficult than the others, OpenSuse previously had the best KDE support, don't know how it is now.
WLAN drivers are often "semi supported", because the firmware bits must be installed separately because of licensing issues. In most Linux driver problems Google is helpful. Solutions often differ between distributions, but if you find 1 solution, it can always somehow be converted to work with your distro too.
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

Dansan, have you done software raiding before for both Windows and Linux distributions.

Although, you made some good point about software RAID being portable, I don't think there are software RAID that are bootable.

Which brings back to the Spliff's first post in which he states whether an array is bootable or not.

I looked into tutorial screenshot of Windows RAID setup and it seems that the drive in which the OS occupy can not be part of Windows software RAID because it is not listed in the option to add.

So, in conclusion, to get the benefit of software RAID for Windows, one would require least 3 drives to get the benefit of RAID 0. I haven't looked into Linux software RAID because most tutorials seem to be outdated.
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: RAID Question

Post by dansan »

Prominence wrote:Dansan, have you done software raiding before for both Windows and Linux distributions.
No - I do not use Windows for servers.
Prominence wrote:Although, you made some good point about software RAID being portable, I don't think there are software RAID that are bootable..
I don't know about Windows, but a Linux RAID-1 is bootable, because it's just 2 partitions with the same content - it's completely transparent for the boot loader. Technically you're right - grub cannot boot from RAID, but in reality it is well possible, because it just boots from one of the two RAID-1 partitions :)

With anything else than RAID-1 it's not possible, but also not a problem. You just have to make a small partition that is not on RAID (for /boot), and put your bootloader and the kernel there. That is the one and only way for all RAID installations (except RAID-1). That is also the way Windows does it.
Prominence wrote:I looked into tutorial screenshot of Windows RAID setup and it seems that the drive in which the OS occupy can not be part of Windows software RAID because it is not listed in the option to add.
Afaik only a portion of the Windows installation must be on that partition - not the whole 20GB. It's still much more than with Linux, where a 100MB partition is sufficient. I have no experience with Windows-SW-RAIDs, so I don't know how much space you have to give that partition...
Prominence wrote:So, in conclusion, to get the benefit of software RAID for Windows, one would require least 3 drives to get the benefit of RAID 0.
Nope - just use partitions (instead of whole disks) to assemble your RAID.
Prominence wrote:I haven't looked into Linux software RAID because most tutorials seem to be outdated.
That's because there hasn't been any changes in the way it's done since like forever :)

It quite easy: Partition both disks to your liking (probably with the exact same layout), then use mdadm to assemble the partitions you want into a RAID. Watch /proc/mdstat as Linux builds your RAID in the background. You don't need to wait for completion - you can immediately begin using them.
User avatar
Prominence
Posts: 97
Joined: 24 Jun 2008, 07:21

Re: RAID Question

Post by Prominence »

Never said I was going to use Windows server OS.

Talking about RAID 0 only.

How come TRIM is disabled by default in Linux? What's the drawback of enabling it if there is any?
Post Reply

Return to “Off Topic Discussion”