Software raid OK?

2009-04-20 Thread BAGI Akos

Hi List!

I installed a software raid, level1 with 3 disks, one of them is a spare.

I have 2 partitions:
md0 is for / and is made of sda1,sdb1, sdc1
md1 is for swap and made of sda2,sdb2, sdc2

- I can boot form both disks,
- the system works fine.
- mdstat says the raids are active
- mdmadm --detail seems to be fine ( Superblock is persistent )

However
mdadm -E says: no md superblock detected on /dev/md0
and
fdisk -l says: no valid partition table found on md0


Is the raid OK or not?
If not, how can I fix it?

THX
Akos


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Re: Software raid OK?

2009-04-20 Thread Gilles Mocellin
Le Monday 20 April 2009 11:44:31 BAGI Akos, vous avez écrit :
 Hi List!

 I installed a software raid, level1 with 3 disks, one of them is a spare.

 I have 2 partitions:
 md0 is for / and is made of sda1,sdb1, sdc1
 md1 is for swap and made of sda2,sdb2, sdc2

 - I can boot form both disks,
 - the system works fine.
 - mdstat says the raids are active
 - mdmadm --detail seems to be fine ( Superblock is persistent )

 However
 mdadm -E says: no md superblock detected on /dev/md0

mdadm -E handles RAID components, not the resulting RAID device.
You can have informations with mdadm -E /dev/sda1 for example.
To see the state of your RAID device, you can do :
$ cat /proc/mdstat
or
$ mdadm --details /dev/md0

 and
 fdisk -l says: no valid partition table found on md0

fdisk handles disks, not partitions.
md0 = RAID of sda1,sdb1,sdc1 partitions = a partition, with a filesystem on it.

 Is the raid OK or not?
 If not, how can I fix it?

No problem with your raid.



signature.asc
Description: This is a digitally signed message part.


Re: Software raid OK?

2009-04-20 Thread Michael Iatrou
When the date was Monday 20 April 2009, BAGI Akos wrote:

 Hi List!

 I installed a software raid, level1 with 3 disks, one of them is a spare.

 I have 2 partitions:
 md0 is for / and is made of sda1,sdb1, sdc1
 md1 is for swap and made of sda2,sdb2, sdc2

There is no particularly good reason to have the swap on RAID. You should 
define three independed swap partitions; if disk fails, kernel will use the 
other available.

-- 
 Michael Iatrou


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Software raid OK?

2009-04-20 Thread Douglas A. Tutty
On Mon, Apr 20, 2009 at 03:29:00PM +0300, Michael Iatrou wrote:
 When the date was Monday 20 April 2009, BAGI Akos wrote:
 
  Hi List!
 
  I installed a software raid, level1 with 3 disks, one of them is a spare.
 
  I have 2 partitions:
  md0 is for / and is made of sda1,sdb1, sdc1
  md1 is for swap and made of sda2,sdb2, sdc2
 
 There is no particularly good reason to have the swap on RAID. You should 
 define three independed swap partitions; if disk fails, kernel will use the 
 other available.

If swap fails, what happens if something important to the running of the
system (not just a user app) is swapped-out?  I've seen advice on this
list many times that to avoid a crash, if other system stuff is on raid,
that swap should be as well.

Doug.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Software raid OK?

2009-04-20 Thread Michael Iatrou
When the date was Monday 20 April 2009, Douglas A. Tutty wrote:

 On Mon, Apr 20, 2009 at 03:29:00PM +0300, Michael Iatrou wrote:
  When the date was Monday 20 April 2009, BAGI Akos wrote:
   Hi List!
  
   I installed a software raid, level1 with 3 disks, one of them is a
   spare.
  
   I have 2 partitions:
   md0 is for / and is made of sda1,sdb1, sdc1
   md1 is for swap and made of sda2,sdb2, sdc2
 
  There is no particularly good reason to have the swap on RAID. You
  should define three independed swap partitions; if disk fails, kernel
  will use the other available.

 If swap fails, what happens if something important to the running of the
 system (not just a user app) is swapped-out?  I've seen advice on this
 list many times that to avoid a crash, if other system stuff is on raid,
 that swap should be as well.

I cannot confirm that; instead I am assuming a workflow like the following:

1. A disk is about to fail
2. Notification from SMART hits sysadmin's mailbox
3. # swapoff /dev/sdXY
4. Replace disk, create partitions
5. # swapon /dev/sdXY
6. # mdadm /dev/mdK -a /dev/sdXZ

-- 
 Michael Iatrou


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Software raid OK?

2009-04-20 Thread Sam Kuper
Michael,

2009/4/20 Michael Iatrou m.iat...@freemail.gr

 When the date was Monday 20 April 2009, Douglas A. Tutty wrote:

  On Mon, Apr 20, 2009 at 03:29:00PM +0300, Michael Iatrou wrote:
   There is no particularly good reason to have the swap on RAID. You
   should define three independed swap partitions; if disk fails, kernel
   will use the other available.
 
  If swap fails, what happens if something important to the running of the
  system (not just a user app) is swapped-out?  I've seen advice on this
  list many times that to avoid a crash, if other system stuff is on raid,
  that swap should be as well.

 I cannot confirm that; instead I am assuming a workflow like the following:

 1. A disk is about to fail
 2. Notification from SMART hits sysadmin's mailbox
 3. # swapoff /dev/sdXY
 4. Replace disk, create partitions
 5. # swapon /dev/sdXY
 6. # mdadm /dev/mdK -a /dev/sdXZ


If the system is running unattended - for instance if it's a server being
run by a hobbyist, which doesn't have a sysadmin permanently available to
respond to problems - then step 3 may not occur before the disk fails. In
this scenario, isn't Douglas right that it's better to have the swap on
(redundant) RAID?

Many thanks,

Sam


Re: Software raid OK?

2009-04-20 Thread Mark Allums

Michael Iatrou wrote:

When the date was Monday 20 April 2009, Douglas A. Tutty wrote:


On Mon, Apr 20, 2009 at 03:29:00PM +0300, Michael Iatrou wrote:

When the date was Monday 20 April 2009, BAGI Akos wrote:

Hi List!

I installed a software raid, level1 with 3 disks, one of them is a
spare.

I have 2 partitions:
md0 is for / and is made of sda1,sdb1, sdc1
md1 is for swap and made of sda2,sdb2, sdc2

There is no particularly good reason to have the swap on RAID. You
should define three independed swap partitions; if disk fails, kernel
will use the other available.

If swap fails, what happens if something important to the running of the
system (not just a user app) is swapped-out?  I've seen advice on this
list many times that to avoid a crash, if other system stuff is on raid,
that swap should be as well.


I cannot confirm that; instead I am assuming a workflow like the following:

1. A disk is about to fail
2. Notification from SMART hits sysadmin's mailbox
3. # swapoff /dev/sdXY
4. Replace disk, create partitions
5. # swapon /dev/sdXY
6. # mdadm /dev/mdK -a /dev/sdXZ



Relying on S.M.A.R.T. is playing with atomic bombs.  Put everything on 
redundant storage, even swap.


Mark Allums


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org




Re: Software raid OK?

2009-04-20 Thread Michael Iatrou
When the date was Monday 20 April 2009, Sam Kuper wrote:

 Michael,

 2009/4/20 Michael Iatrou m.iat...@freemail.gr

  When the date was Monday 20 April 2009, Douglas A. Tutty wrote:
   On Mon, Apr 20, 2009 at 03:29:00PM +0300, Michael Iatrou wrote:
There is no particularly good reason to have the swap on RAID. You
should define three independed swap partitions; if disk fails,
kernel will use the other available.
  
   If swap fails, what happens if something important to the running of
   the system (not just a user app) is swapped-out?  I've seen advice on
   this list many times that to avoid a crash, if other system stuff is
   on raid, that swap should be as well.
 
  I cannot confirm that; instead I am assuming a workflow like the
  following:
 
  1. A disk is about to fail
  2. Notification from SMART hits sysadmin's mailbox
  3. # swapoff /dev/sdXY
  4. Replace disk, create partitions
  5. # swapon /dev/sdXY
  6. # mdadm /dev/mdK -a /dev/sdXZ

 If the system is running unattended - for instance if it's a server being
 run by a hobbyist, which doesn't have a sysadmin permanently available to
 respond to problems - then step 3 may not occur before the disk fails. In
 this scenario, isn't Douglas right that it's better to have the swap on
 (redundant) RAID?

I don't think there is a silver bullet for this.

There is a performance penalty related to soft-RAID. Also swappiness 
configuration must be taken into account. Physical memory and memory usage 
patterns from application perspective count too. And of course the required 
availability for the application is an important factor.

All I am saying is that when thorough evaluation of parameters like the 
above is out of scope, there is probably no good reason to have swap on 
RAID.

-- 
 Michael Iatrou


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Software raid OK?

2009-04-20 Thread Alex Samad
On Mon, Apr 20, 2009 at 10:08:22PM +0300, Michael Iatrou wrote:
 When the date was Monday 20 April 2009, Sam Kuper wrote:
 
  Michael,
 

[snip]

 
 I don't think there is a silver bullet for this.
 
 There is a performance penalty related to soft-RAID. Also swappiness 
 configuration must be taken into account. Physical memory and memory usage 
 patterns from application perspective count too. And of course the required 
 availability for the application is an important factor.
 
 All I am saying is that when thorough evaluation of parameters like the 
 above is out of scope, there is probably no good reason to have swap on 
 RAID.

with the cost of hd's being so low, I would suggest the default should
be swap on a raid1

 

-- 
Microsoft is not the answer.
Microsoft is the question.
NO (or Linux) is the answer.
(Taken from a .signature from someone from the UK, source unknown)


signature.asc
Description: Digital signature


Re: Software raid OK?

2009-04-20 Thread Sam Kuper
2009/4/21 Alex Samad a...@samad.com.au
 On Mon, Apr 20, 2009 at 10:08:22PM +0300, Michael Iatrou wrote:
  When the date was Monday 20 April 2009, Sam Kuper wrote:
   Michael,
 [snip]
 
  I don't think there is a silver bullet for this.
 
  There is a performance penalty related to soft-RAID. Also swappiness
  configuration must be taken into account. Physical memory and memory usage
  patterns from application perspective count too. And of course the required
  availability for the application is an important factor.
 
  All I am saying is that when thorough evaluation of parameters like the
  above is out of scope, there is probably no good reason to have swap on
  RAID.

 with the cost of hd's being so low, I would suggest the default should
 be swap on a raid1

I'm grateful to Mark, Michael and Alex for their replies.

I'm planning to go ahead with using RAID 1 for swap, as a possible
slight performance hit is more acceptable to me than a crash or data
loss would be. Indeed, that's why I'm using redundant RAID in the
first place.

Apologies for hijacking Bagi's thread!

Best,

Sam


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Re: Software raid OK?

2009-04-20 Thread Sam Kuper
2009/4/21 Sam Kuper sam.ku...@uclmail.net:
 Apologies for hijacking Bagi's thread!

s/Bagi/Akos/


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org