Home_greyopenFATE - openSUSE feature tracking > #311037
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

let partitioner create faster RAID

Feature state

openSUSE Distribution
Unconfirmed

Description

Both mkfs.ext[234] and mkfs.xfs have options to tune the filesystem for striped RAID (i.e. RAID0/RAID10), so it would be nice if yast2/disk could make use of it.
The options are
-E stride=x -E stripe-width=y and -d sunit=x,swidth=y
notice that units of above sizes may vary.
There are several sites out there describing how to choose the proper values for x and y, e.g.
http://www.mythtv.org/wiki/Optimizing_Performance

Discussion


icons/user_comment.png B. W. wrote: (3 years ago)

I have found this perl code doing the calculations
#!/usr/bin/perl -w
use strict;
my $raiddev="/dev/md0";
my $raidlevel=0; # one of 0,5,6 for striping with 0,1,2 redundant disks
my $blocksize=4; # FS block size KiBiBytes
my $chunksize=128; # 4-256 KiBiBytes (multiple of $blocksize)
my @physdevs=();
# ...
# create new RAID
system(qw(echo mdadm --create), $raiddev, "--level", $raidlevel, "--chunk", $chunksize, "--raid-devices", scalar @physdevs, @physdevs);

# create FS
my $stripewidth=@physdevs;
if($raidlevel==1) {$stripewidth=1;}
if($raidlevel==5) {$stripewidth--;}
if($raidlevel==6) {$stripewidth-=2;}
$stripewidth*=$chunksize/$blocksize;
system(qw(echo mkfs.ext3 -b), $blocksize*1024, "-R", "stride=".($chunksize/$blocksize), "-R", "stripe-width=".$stripewidth, $raiddev);

icons/user_comment.png G. F. wrote: (3 years ago)

Even in 11.3 this should already work.

The kernel got "disk topology" support around 2.6.32 I think. Definitely by 2.6.34 which is in 11.3.

The mdraid layer of the kernel got patches to set these values in time for 2.6.34 as well.

Ext4 and XFS should both have the code already that uses this internal kernel knowledge.

If a userspace app (eg. mkfs.ext4) wants to access it, it can look in /sys/block/sda/queue/* for the info.

So if you have a machine that is not tuning the filesystem based on your raid setup, its a bug, not a missing feature of yast.

Last change: 3 years ago
Voting
Score: 2
  • Negative: 2
  • Neutral: 1
  • Positive: 4
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint