Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to install Gentoo on a software RAID0 array [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sun Jan 23, 2005 4:32 pm    Post subject: How to install Gentoo on a software RAID0 array [solved] Reply with quote

Hello

I have two different 9.1Go SCSI u160 and I'd like to install Gentoo on a software-made RAID0.

I've partitionned the two hard drives so that there is a partition on each drive with the same number of sectors.

Code:
livecd root # sfdisk -l

Disk /dev/sda: 1116 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     11      12-     96358+  83  Linux
/dev/sda2         12    1053    1042    8369865   83  Linux
/dev/sda3       1054    1115      62     498015   83  Linux
/dev/sda4          0       -       0          0    0  Empty

Disk /dev/sdb: 1116 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          0+   1042-   1042    8369865   83  Linux
/dev/sdb2       1042+   1115      74-    594404+  83  Linux
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty


So my raid would be using /dev/sda2 and /dev/sdb1
/dev/sda1 would be /boot and /dev/sda3 and /dev/sdb2 would be swap.

I tried to mkraid but it doesn't work:
Code:
livecd root # mkraid /dev/md0
cannot determine md version: no MD device file in /dev.


I've checked out the HOWTO software RAID (http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html) and they say if I don't have /proc/mdstat it's likely that the system I'm on doesn't support RAID. This file isn't on the liveCD and mkraid seems to report that we cannot initialize any RAID device since this seems to be unsuported by the liveCD

I'm using the 2004.3 x86 minimal liveCD.
So is this impossible to do with this liveCD, if yes, will the universal liveCD have the RAID kernel modules & all built-in or not.
Otherwise how can I complete my installation?

Thank you.
_________________
I am not sending subliminal messages


Last edited by Tsuna on Tue Jan 25, 2005 8:16 am; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Jan 23, 2005 5:19 pm    Post subject: Reply with quote

Tsuna,

You are aiming to have sda3 (about 500Mb) and sdb2 about (600MB) as swap in your final raid system. You can do a standard install into this space, using another partition as swap, if you need swap.
When stage 3 is complete, and you are running your own kernel, you just copy the install into the raid space and remake swap as originally intended.

However, the liveCD may have raid modules built but not loaded.
Try
Code:
modprobe raid0
and
Code:
modprobe raid1

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sun Jan 23, 2005 7:06 pm    Post subject: Reply with quote

thank you for this suggestion and although this is a possibility i'd like to use it in last resort.
I loaded the kernel modules you suggested (I didnt think about this possibility) and I do have a /proc/mdstat file right now.
Code:
livecd root # cat /proc/mdstat
Personalities : [raid0] [raid1]
unused devices: <none>

But I still dont have any /dev/mdX and thus can't make my mkraid.

I bet some module is missing that will make theses /dev/mdX appear.
I need to go to eat, I'll look for them later

Any more suggestions please people?
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sun Jan 23, 2005 7:21 pm    Post subject: Reply with quote

Tsuna,

When you mkraid your raid /dev/md emtries will appear by magic.
OK, its devfs creating them 'on the fly'.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sun Jan 23, 2005 10:09 pm    Post subject: Reply with quote

nope it doesnt :/

Code:
livecd root # mkraid /dev/md0
cannot determine md version: no MD device file in /dev.
livecd root # mkraid /dev/md1
cannot determine md version: no MD device file in /dev.
livecd root # mkraid /dev/md2
cannot determine md version: no MD device file in /dev.
livecd root # mkraid /dev/md3
cannot determine md version: no MD device file in /dev.
livecd root # mkraid /dev/md
cannot determine md version: no MD device file in /dev.
livecd root # mkraid
cannot determine md version: no MD device file in /dev.
livecd root # lsmod
Module                  Size  Used by
raid1                  12512  0
raid0                   6144  0
md                     33420  2 raid1,raid0
ipv6                  182560  14
evdev                   6464  0
aic7xxx               144344  0
e100                   23296  0
mii                     2304  1 e100
parport_pc             27072  0
parport                22728  1 parport_pc
sbp2                   16744  0
ohci1394               24836  0
ieee1394               62008  2 sbp2,ohci1394
ohci_hcd               15044  0
uhci_hcd               23152  0
usb_storage            46208  0
ehci_hcd               21028  0
livecd root # ls /dev
cdrom     inotify  loop6  ram13   rd       stdout  tty17  tty28  tty39  tty5   tty60   ttyS13  ttyS24  ttyS35  ttyS46   vcs12   vcsa5
cdroms    input    loop7  ram14   sda      tts     tty18  tty29  tty4   tty50  tty61   ttyS14  ttyS25  ttyS36  ttyS47   vcs2    vcsa6
console   kmem     mem    ram15   sda1     tty     tty19  tty3   tty40  tty51  tty62   ttyS15  ttyS26  ttyS37  ttyS5    vcs3    zero
core      kmsg     null   ram2    sda2     tty0    tty2   tty30  tty41  tty52  tty63   ttyS16  ttyS27  ttyS38  ttyS6    vcs4
fb        log      port   ram3    sda3     tty1    tty20  tty31  tty42  tty53  tty7    ttyS17  ttyS28  ttyS39  ttyS7    vcs5
fb0       loop     ptmx   ram4    sdb      tty10   tty21  tty32  tty43  tty54  tty8    ttyS18  ttyS29  ttyS4   ttyS8    vcs6
fbsplash  loop0    pts    ram5    sdb1     tty11   tty22  tty33  tty44  tty55  tty9    ttyS19  ttyS3   ttyS40  ttyS9    vcsa
fd        loop1    ram0   ram6    sdb2     tty12   tty23  tty34  tty45  tty56  ttyS0   ttyS2   ttyS30  ttyS41  urandom  vcsa1
full      loop2    ram1   ram7    shm      tty13   tty24  tty35  tty46  tty57  ttyS1   ttyS20  ttyS31  ttyS42  vc       vcsa12
hdc       loop3    ram10  ram8    sndstat  tty14   tty25  tty36  tty47  tty58  ttyS10  ttyS21  ttyS32  ttyS43  vcc      vcsa2
ide       loop4    ram11  ram9    stderr   tty15   tty26  tty37  tty48  tty59  ttyS11  ttyS22  ttyS33  ttyS44  vcs      vcsa3
initctl   loop5    ram12  random  stdin    tty16   tty27  tty38  tty49  tty6   ttyS12  ttyS23  ttyS34  ttyS45  vcs1     vcsa4

_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Sun Jan 23, 2005 11:33 pm    Post subject: Reply with quote

help please :/
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Jan 23, 2005 11:53 pm    Post subject: Reply with quote

Code:
# mdadm --create /dev/md0 --auto=yes --level=0 --raid-devices=2 /dev/sda2 /dev/sdb1

You will also want to use fdisk to change the partition type from 83 (Linux) to fd (Linux raid autodetect) on the partitions that will be part of the array (sda2 and sdb1)
Back to top
View user's profile Send private message
Tsuna
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2005
Posts: 147

PostPosted: Mon Jan 24, 2005 9:32 am    Post subject: Reply with quote

Code:
livecd root # mdadm --create --verbose /dev/md0 --chunk=32 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb1
mdadm: error opening /dev/md0: No such file or directory
livecd root # mdadm --create /dev/md0 --auto=yes --level=0 --raid-devices=2 /dev/sda2 /dev/sdb1
mdadm: /dev/sda2 appears to contain an ext2fs file system
    size=8867880K  mtime=Wed Dec  8 12:05:43 2004
Continue creating array? y
mdadm: array /dev/md0 started.
# cat /proc/mdstat
Personalities : [raid0] [raid1]
md0 : active raid0 sdb1[1] sda2[0]
      16739584 blocks 64k chunks

unused devices: <none>

Ok I wasn't using the right command and I thought I had to mkraid BEFORE using mdadm (that's what they say in the Linux Software RAID HOWTO at least, http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html)

edit: I thought 32K chunks would be more optimized for the root partition of the installation (because it's manipulating a lot of littles files most of the time, isnt it)
edit2: ok I had to reboot in order to "free" /dev/md0 and then I used mdadm --create --verbose /dev/md0 --auto=yes --chunk=32 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb1 and it worked properly

Thank you people for your generous help :)
_________________
I am not sending subliminal messages
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Tue Jan 25, 2005 12:19 am    Post subject: Reply with quote

Tsuna wrote:
I thought I had to mkraid BEFORE using mdadm (that's what they say in the Linux Software RAID HOWTO at least, http://www.tldp.org/HOWTO/Software-RAID-HOWTO-5.html)

mkraid is the old way of doing things (part of the sys-fs/raidtools package), mdadm is the new way. You don't need to use both.
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Tue Jan 25, 2005 1:21 am    Post subject: Reply with quote

Tsuna wrote:
edit2: ok I had to reboot in order to "free" /dev/md0 and then I used
Code:
mdadm --create --verbose /dev/md0 --auto=yes --chunk=32 --level=0 --raid-devices=2 /dev/sda2 /dev/sdb1
and it worked properly

Thank you people for your generous help :)

Please edit the title of this topic, and insert [SOLVED] in the title.
Back to top
View user's profile Send private message
pilla
Bodhisattva
Bodhisattva


Joined: 07 Aug 2002
Posts: 7729
Location: Underworld

PostPosted: Wed Jul 20, 2005 2:12 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-p-2587699.html
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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