All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Hickey <bugfood-ml@fatooh.org>
To: "Aaron C. de Bruyn" <aaron@darkpixel.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Moron Destroyed RAID6 Array Superblocks
Date: Sat, 14 Apr 2007 00:28:05 -0700	[thread overview]
Message-ID: <46208285.80801@fatooh.org> (raw)
In-Reply-To: <1176519568.7325.3.camel@localhost.localdomain>

Aaron C. de Bruyn wrote:
> Ok--I got moved in to my new place and am back and running on the 'net.
> I sat down for a few hours and attempted to write a script to try all
> possible combinations of drives...but I have to admit that I'm lost.
> 
> I have 8 drives in the array--and I can output every possible
> combination of those.  But what the heck would be the logic to output
> all combinations of the 8 drives using only 6 at a time?  My head hurts.

You want only 5 at a time, don't you?
8 drives - 1 spare - 2 parity = 5

Anyway, a very quick-n-dirty way to get what you want is to:
1. calculate all permutations
2. strip away the last items of each permutation
3. get rid of duplicate lines

$ wget http://hayne.net/MacDev/Perl/permutations
$ perl permutations a b c d e f g h | cut -d' ' -f-5 | sort -u

The Perl script above is from:
http://hayne.net/MacDev/Perl/

-Corey

  reply	other threads:[~2007-04-14  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-08 15:21 Moron Destroyed RAID6 Array Superblocks Andrew Burgess
2007-04-14  2:59 ` Aaron C. de Bruyn
2007-04-14  7:28   ` Corey Hickey [this message]
2007-04-14  6:42 ` Aaron C. de Bruyn
  -- strict thread matches above, loose matches on Subject: below --
2007-04-08  4:10 Aaron C. de Bruyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46208285.80801@fatooh.org \
    --to=bugfood-ml@fatooh.org \
    --cc=aaron@darkpixel.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.