openSUSE Forums > Hardware » Help setting up LinuxRAID-1 in opensuse 11.1

Go Back   openSUSE Forums > Hardware
Forums FAQ Members List Search Today's Posts Mark Forums Read


Hardware Questions about drivers, peripheral cabling, configuration

Reply
Page 2 of 2 1 2
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 05-Jul-2009, 10:49
Puzzled Penguin
 
Join Date: Jan 2009
Posts: 30
epsilon_da hasn't been rated much yet
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

Because i have 2 disks and i want to have a speed beneffit from it and learn raid in the process.

Because i may choose in the future the laptop with 2 disks to have faster booting if this go well.

I have find this next 2 pages:
Fundación Código Libre Dominicano - Content
Moving your Linux root partition to software RAID | tolaris.com

Which i thik they have done something similar.
Moving to raid without reinstalling.

as i understand the process would be like this and please correct me if i am wrong:

sdb1 = boot
sdb2 = swap
sdb3 = raid1A
sdb4 = raid1B

with raid1A i plan to add sda when all data gets safe in sdb.

mdadm --create /dev/md0 --level=1 --force --raid-devices=1 /dev/sdb3
mdadm --create /dev/md1 --level=1 --force --raid-devices=1 /dev/sdb4

mount md0
copy all to md0
and prepare sdb to boot without sda
Get working grub and opensuse alone and check for all data being correct.
connect sda as second disk and partition it to be part of the raid with:

mdadm /dev/md0 --grow -n 2
mdadm /dev/md0 --add /dev/sda2

Any way, i can try without loosing data most steps but not the last one.
Reply With Quote
  #12 (permalink)  
Old 05-Jul-2009, 10:52
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

You get a speed loss on writes and a slight speed gain on reads.
Reply With Quote
  #13 (permalink)  
Old 05-Jul-2009, 11:02
Puzzled Penguin
 
Join Date: Jan 2009
Posts: 30
epsilon_da hasn't been rated much yet
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

considering both this exactly equals, raid1 gives ideally and conceptually 2 times the read-speed, because only one disk reads on a read operation, and the same write-speed because both disks writes on a write operation.

So i dont see any much loose.
Sure, on writing will some loose, the speed of the slower disk as maximum, but on reading will be a huge win, and is a most frecuent operation than writes.
Reply With Quote
  #14 (permalink)  
Old 05-Jul-2009, 11:20
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

No, that's not the practice. You get a slight loss of write speed due to the extra load on the CPU of having to write twice, probably not noticeable. You don't get 2x gain in read speed, not for a single request. You get a reduction in read latency due to the OS being able to select the disk that is closest to the requested location, provided the OS can do split seeks. Once the spot is located, the request is fulfilled from that disk. You won't get interleaving of reads from one disk then the other. (And why would the system do that anyway? It would unnecessarily tie up one of the disks around one location.) So your guess is wrong. The overall system read capacity hasn't increased either, you still have just as many hardware channels and disks as before you combined them into RAID.

You can find all this info by a web search.
Reply With Quote
  #15 (permalink)  
Old 05-Jul-2009, 11:25
Puzzled Penguin
 
Join Date: Jan 2009
Posts: 30
epsilon_da hasn't been rated much yet
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

Quote:
Originally Posted by BenderBendingRodriguez View Post
I guess your best option would be to use LVM mirroring. You will still need a separate /boot partition. Have a read here, hope it helps.

Chapter*7*Mirroring Data Using LVM
Thaks, seems like that fits much better to my needs.
I just need now to read more about how to make it done.
Reply With Quote
  #16 (permalink)  
Old 05-Jul-2009, 11:35
Puzzled Penguin
 
Join Date: Jan 2009
Posts: 30
epsilon_da hasn't been rated much yet
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

Quote:
Originally Posted by ken_yap View Post
No, that's not the practice. You get a slight loss of write speed due to the extra load on the CPU of having to write twice, probably not noticeable. You don't get 2x gain in read speed, not for a single request. You get a reduction in read latency due to the OS being able to select the disk that is closest to the requested location, provided the OS can do split seeks. Once the spot is located, the request is fulfilled from that disk. You won't get interleaving of reads from one disk then the other. (And why would the system do that anyway? It would unnecessarily tie up one of the disks around one location.) So your guess is wrong. The overall system read capacity hasn't increased either, you still have just as many hardware channels and disks as before you combined them into RAID.

You can find all this info by a web search.
I understand that the processor will need to process some more extra "ifs" as with any other volume management software, but the processor speed is in solid state, there is nothing mechanical, the bus is much faster too, and there for, it is a less loss when it comes to processing speed and improve on harddisk read speed.

In a normal current system, the processing loss wouldnt be noticeable at all, at least i dont notice that in my lvm data volume, and it is not yet morrired, when mirrored it would be faster.

of course, maybe i am missing some other conecept, i see the HD as the bottleneck, because is the only remaining mechanical part on most pcs.
Reply With Quote
  #17 (permalink)  
Old 05-Jul-2009, 11:40
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

It's not sufficient to say the mechanical component is the bottleneck and skip the rest of the analysis from that point. The devil is in the details. You don't get 2x read speed increase anyway.
Reply With Quote
  #18 (permalink)  
Old 11-Jul-2009, 08:23
Puzzled Penguin
 
Join Date: Jan 2009
Posts: 30
epsilon_da hasn't been rated much yet
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

Hi.

I have now working both drives with lvm.
Definitelly this is what i was looking for.
But i cant find the way to see what schedeuling policy is being used and how to change it.
All i can find on internet are HP commands which doesnt seems to be the same here.

In HP-UX docs says that lvchange and lvcreate should have a "-d p" option to set parallel scheduling, but in
man lvchange or man lvcreate i cant find this option, and any other about scheduling.
lvdisplay also doesnt show scheduling.

Does anyone know how to do that in linux?






sda1 = boot in disk 1, no lvm
sdb1 = boot in disk 2, no lvm
data/data = lvm without mirroring
data/root = lvm with mirroring


linux-8mmd:~ # hdparm -t /dev/sda1

/dev/sda1:
Timing buffered disk reads: 262 MB in 3.02 seconds = 86.83 MB/sec
linux-8mmd:~ # hdparm -t /dev/sdb1

/dev/sdb1:
Timing buffered disk reads: 174 MB in 3.03 seconds = 57.36 MB/sec
linux-8mmd:~ # hdparm -t /dev/data/data

/dev/data/data:
Timing buffered disk reads: 272 MB in 3.02 seconds = 90.02 MB/sec
linux-8mmd:~ # hdparm -t /dev/data/root

/dev/data/root:
Timing buffered disk reads: 278 MB in 3.02 seconds = 92.16 MB/sec

linux-8mmd:~ # lvdisplay -v /dev/data/root
Using logical volume(s) on command line
--- Logical volume ---
LV Name /dev/data/root
VG Name data
LV UUID mubgqI-2ZyT-uyyw-Vxa1-DyGK-NOHK-xJjUt7
LV Write Access read/write
LV Status available
# open 2
LV Size 10.00 GB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5
Reply With Quote
  #19 (permalink)  
Old 11-Jul-2009, 08:31
Flux Capacitor Penguin
 
Join Date: Jun 2008
Location: GMT+10
Posts: 5,232
ken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud ofken_yap has a reputation to be proud of
Default Re: Help setting up LinuxRAID-1 in opensuse 11.1

HP/UX documents should not be used as a source of information for Linux.
Reply With Quote
Reply
Page 2 of 2 1 2

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2