Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID Trouble
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Mickys21
n00b
n00b


Joined: 22 Jul 2003
Posts: 61
Location: Ipswich, UK

PostPosted: Thu Jun 17, 2004 2:53 pm    Post subject: RAID Trouble Reply with quote

Set Up a RAID 5..

9.1g - Boot Partition sda1 -- Swap sda2 -- / sda3
9.1g - / sdb1
9.1g - / sdc1 (Spare Disk)

Seemed to be set up well...
lsraid gives me....
Code:

[dev   9,   2] /dev/md2         8CE3C5A5.7FBE3A36.3989A6A7.6CB1410E online
[dev   8,   3] /dev/sda3        8CE3C5A5.7FBE3A36.3989A6A7.6CB1410E good
[dev   8,  17] /dev/sdb1        8CE3C5A5.7FBE3A36.3989A6A7.6CB1410E good
[dev   8,  33] /dev/sdc1        8CE3C5A5.7FBE3A36.3989A6A7.6CB1410E spare


Looks fine to me

also cat /proc/mdstat gives me

Code:

Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
md2 : active raid5 sdc1[2] sdb1[1] sda3[0]
      8305536 blocks level 5, 32k chunk, algorithm 3 [2/2] [UU]

unused devices: <none>


again looks fine to me.

but on doing a 'df' command it shows /dev/md2 only to have 8.5gb of space, identical to /dev/sda, it isnt showing the combind space of sda3 and sdb1

any ideas why this is not correct..

my /etc/raidtab

Code:

raiddev /dev/md2
raid-level 5
nr-raid-disks 2
nr-spare-disks 1
persistent-superblock 1
chunk-size 32
parity-algorithm right-symmetric
device /dev/sda3
raid-disk 0
device /dev/sdb1
raid-disk 1
device /dev/sdc1
spare-disk 0


its baffling me at the moment as everything looks fine, but I should have 16gb of space and not the 8.5 its giving me.
Back to top
View user's profile Send private message
kiezpro
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2004
Posts: 126
Location: Yes

PostPosted: Thu Jun 17, 2004 5:20 pm    Post subject: Reply with quote

AFAIK, for a RAID 5 to make sense you need at least three disks in the array, as the capacity of the array is n-1, where n is the total number of disks. So, if you set up your raidtab like this:

Code:
raiddev /dev/md2
raid-level 5
nr-raid-disks 3
nr-spare-disks 0
persistent-superblock 1
chunk-size 32
parity-algorithm right-symmetric
device /dev/sda3
raid-disk 0
device /dev/sdb1
raid-disk 1
device /dev/sdc1
raid-disk 2


you should have what you want. If you want to have a hot spare disk, you'll have to add another one.
Please be aware of the fact that you'll have to rebuild the array and thus lose all data on the array if you change the raidtab.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum