Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
RAID - How do I do it?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 7:03 am    Post subject: RAID - How do I do it? Reply with quote

I'd like to move to the scary world of software RAID!

I have three HDDs in my machine...

hda - OS
hdb - data
hdd - data

hdb and hdd are full of data at the moment but it's backed up and they can be wiped, they are both 120 gig drives but are by different manufactureres and therefore are not identical geometries. hda is tiny (20 gig or something), just for the OS which I occasionally stage4 to hdb so it will be backed up.

hda - For the OS (no RAID required)
hdb and hdd will be set up in a RAID1 configuration, and should I go for performance or resilience?

I have rebuilt my kernel with RAID...

see below

Code:


md: linear personality registered for level -1
md: raid1 personality registered for level 1
md: multipath personality registered for level -4
md: faulty personality registered for level -5
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.




How do I set it up? No clue where to start.

someone said have a look at mdadm ? that right ?

cheers

bb


Last edited by bingobob on Sat May 12, 2007 9:50 am; edited 1 time in total
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 9:35 am    Post subject: Reply with quote

someone said have a look at mdadm ? that right ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 9:35 am    Post subject: Reply with quote

bingobob,

What do you want from your raid, improved reliability or improved performace.
My own setup is raid1 for boot (to keep bootloaders happy) and raid0 for other things.

Kernel raid is very flexible, since you raid partitions, not drives. It does not even force you to use partitions the same size. The space will still be used but you won't get the raid you expected in the odd corner.

The reliability/performace trade off is your call. the setup difference is the only the raid level you choose.

Install normally onto hda. When you make your kernel, be sure to choose raid support, raid0 and raid1 built in.
Make partitions on hdb and hdd for your raid sets. (you may have several raid sets, some raid0, others raid1).
Choose equal sizes on each drive. Set the partition types to 0xfd.

Use mdadm to make the raids on the partition pairs - its make your mind up time for raid levels now.
Never refer to the partitions on hdb and hdd again - they will still be in /dev but you don't use them.
Make filesystems on /dev/mdX as you would on any other device.
Mount /dev/mdX as you would /dev/hda1
Add entries to /etc/fstab for /dev/mdX and forget all about your raid set(s) until it breaks.
_________________
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
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 9:48 am    Post subject: Reply with quote

wow, think i need to digest this...ok, i took the next step and emerged mdadm.

I see config files in /etc and /etc/conf.d

I see what you're saying re once I'm done I will just see one "virtual" drive, and hear you re the flexibility. I want to keep it simple and just have two partitions (one on each drive, taking the whole - or close to - i realise there is a management overhead,120 gig)..

Will I really see a huge performance boost, i doubt that, so if not i should just plump for reliability. It's pretty fast as it is, no compliants, just a fileserver. It's RAID1 for me.

By install to hda (you mean a regular emerge to my OS drive), done this.

Do I need to re partition and format (and therefore wipe) hdb and hdd before beginning with mdadm?


Last edited by bingobob on Sat May 12, 2007 9:53 am; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 9:51 am    Post subject: Reply with quote

bingobob,

If you want to test, you can set up raid1 on one pair of identically sized partitions and raid0 on whatever is left over of both drives.

edit ====

I get almost a factor of 2x speed improvement.
Make your raid sets and run
Code:
hdparm -tT /dev/md0
and (special case)
Code:
hdparm -tT /dev/hdb1
to compare raid performace with the underlying drive(s). This is a read only test.
raid1 has to write twice, so writes are slower than reads, since reads will use both halves of the mirror.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Sat May 12, 2007 9:57 am; edited 1 time in total
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 9:54 am    Post subject: Reply with quote

now that, i don't understand! hehe..i mean i understand the first part (raid 1 on identically sized partions)

Will mdadm do the partioning for me, am more used to following install guide for partitioning, what about FS type? ext3 ok?

bb goes off to put thinking hat on.
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 9:56 am    Post subject: Reply with quote

have to pop out for an hour, will hope to start building on return...
I;d like to be raided today ! am sure i have all the hardware in place (and the all important backup)..
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 10:04 am    Post subject: Reply with quote

what do you mean by this...

"and raid0 on whatever is left over of both drives."
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 10:05 am    Post subject: Reply with quote

bingobob,

Use fdisk to create and set the partition tables - just as per the install, with the exception of setting the type to 0xfd.
mdadm will only create the raid set on the partitions you tell it to, its not a partitioning tool.

The kernel keeps the logical data organisation on the drive (raid level or whatever) well away from the filesystem code.
ext3 is a good choice but its not related to raid. Its a good idea to use a journaled filesystem when its going to be big.
Here is my raid partition scheme.
Code:
$ sudo /sbin/fdisk -l /dev/sda
Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40131   fd  Linux raid autodetect
/dev/sda2               6         130     1004062+  82  Linux swap / Solaris
/dev/sda4             131       36483   292005472+   5  Extended
/dev/sda5             131         739     4891761   fd  Linux raid autodetect
/dev/sda6             740        4387    29302528+  fd  Linux raid autodetect
/dev/sda7            4388        4631     1959898+  fd  Linux raid autodetect
/dev/sda8            4632        5361     5863693+  fd  Linux raid autodetect
/dev/sda9            5362        7307    15631213+  fd  Linux raid autodetect
/dev/sda10           7308       36483   234356188+  fd  Linux raid autodetect


edit ===

Make say a 60Gb partition on each drive for raid1 (hdb1 hdd1)
Allocate the rest of the space to hdb2 and hdd2. These partitions may not be the same size, as your drives are not identical.
Form /dev/md0 from hdb1 and hdd1 and make it raid1 - mirroring
Form /dev/md1 from hdb2 and hdd2 and make it raid0 - speed
Do some performace tests, repartition and set it up for real.
Code:
hdparm -tT
does not need filesystems or data, it reads the raw device its pointed at.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Sat May 12, 2007 10:11 am; edited 1 time in total
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 10:07 am    Post subject: Reply with quote

for the record here's my unraided result.

Code:


franz ~ # hdparm -tT /dev/hdd1

/dev/hdd1:
 Timing cached reads:   888 MB in  2.00 seconds = 443.88 MB/sec
 Timing buffered disk reads:   82 MB in  3.01 seconds =  27.20 MB/sec
franz ~ # hdparm -v /dev/hdd1

/dev/hdd1:
 multcount    =  0 (off)
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 256 (on)
 geometry     = 16383/255/63, sectors = 234436482, start = 63
franz ~ #



surprised that u say it could double performance, nice!
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 10:09 am    Post subject: Reply with quote

ok, so i will repartition, later...

here's the output of fdisk -l (as it stands)

Code:


franz ~ # fdisk -l

Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1           5       40131   83  Linux
/dev/hda2               6          68      506047+  82  Linux swap / Solaris
/dev/hda3              69        2434    19004895   83  Linux

Disk /dev/hdb: 122.9 GB, 122942324736 bytes
16 heads, 63 sectors/track, 238216 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1      238216   120060832+  83  Linux

Disk /dev/hdd: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1       14593   117218241   83  Linux

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn't contain a valid partition table
franz ~ #




hdb and hdd parttions are similar in size at the moment but not identical
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 10:10 am    Post subject: Reply with quote

thanks, for this btw, the mists of confusion are clearing - especially the fdisk info.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 10:29 am    Post subject: Reply with quote

bingobob,

Hmm. 27Mb/sec is not very good. Getting
Code:
 multcount    =  0 (off)
 IO_support   =  0 (default 16-bit)
both on will either give a better data rate or reduced CPU load for the same data rate. 7200rpm drives should be over 40Mb/sec.

Do you have 80 wire IDE ribbon cables ?
They have a smaller pitch than the ribbons on the floppy drive
If so, are they connected the right way round and is the motherboard capable of detecting them?

Post your lspci and dmesg outputs - your IDE drives may go faster before you add in raid.

I see you have a new 400Gb drive too. If you put a slice of that in the mix, you could have raid5
_________________
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
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 11:00 am    Post subject: Reply with quote

yes..they may well have the wrong cables on them...

so many options may as well get the best performance possible while im at it...

yes the nes 400 giger you helped me with :-) ... tar for that (pun intended...I need to get out more)...but yes maybe put some of that into the mix although had intended just to chuck backup tar balls on it...

on way home now will have to check these cables.

Code:


franz ~ # dmesg && lspci

 protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 7, 524288 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Simple Boot Flag at 0x3a set to 0x1
Machine check exception polling timer started.
io scheduler noop registered
io scheduler cfq registered (default)
Real Time Clock Driver v1.12ac
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
[drm] Initialized drm 1.0.1 20051102
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serio: i8042 KBD port at 0x60,0x64 irq 1
mice: PS/2 mouse device common for all mice
loop: loaded (max 8 devices)
e100: Intel(R) PRO/100 Network Driver, 3.5.10-k2-NAPI
e100: Copyright(c) 1999-2005 Intel Corporation
sis900.c: v1.08.09 Sep. 19 2005
ACPI: PCI Interrupt 0000:00:04.0[A] -> GSI 19 (level, low) -> IRQ 16
0000:00:04.0: Realtek RTL8201 PHY transceiver found at address 1.
0000:00:04.0: Using transceiver found at address 1 as default
eth0: SiS 900 PCI Fast Ethernet at 0x8800, IRQ 16, 00:e0:18:b5:eb:1b.
Linux video capture interface: v1.00
saa7130/34: v4l2 driver version 0.2.14 loaded
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SIS5513: IDE controller at PCI slot 0000:00:02.5
ACPI: PCI Interrupt 0000:00:02.5[A] -> GSI 16 (level, low) -> IRQ 17
SIS5513: chipset revision 0
SIS5513: not 100% native mode: will probe irqs later
SIS5513: SiS 962/963 MuTIOL IDE UDMA133 controller
    ide0: BM-DMA at 0xa400-0xa407, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xa408-0xa40f, BIOS settings: hdc:DMA, hdd:DMA
Probing IDE interface ide0...
hda: WDC WD200BB-60BNA1, ATA DISK drive
hdb: Maxtor 6Y120L0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: Compaq CRD-8484B, ATAPI CD/DVD-ROM drive
hdd: WDC WD1200BB-00DWA0, ATA DISK drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=38792/16/63, UDMA(100)
hda: cache flushes not supported
 hda: hda1 hda2 hda3
hdb: max request size: 128KiB
hdb: 240121728 sectors (122942 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(133)
hdb: cache flushes supported
 hdb: hdb1
hdd: max request size: 512KiB
hdd: 234441648 sectors (120034 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(33)
hdd: cache flushes supported
 hdd: hdd1
hdc: ATAPI 48X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.20
ehci_hcd: block sizes: qh 128 qtd 96 itd 192 sitd 96
ACPI: PCI Interrupt 0000:00:03.3[D] -> GSI 23 (level, low) -> IRQ 18
ehci_hcd 0000:00:03.3: EHCI Host Controller
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
ehci_hcd 0000:00:03.3: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:03.3: reset hcs_params 0x103206 dbg=1 cc=3 pcc=2 ordered !ppc ports=6
ehci_hcd 0000:00:03.3: reset hcc_params 7070 thresh 7 uframes 1024
PCI: cache line size of 128 is not supported by device 0000:00:03.3
ehci_hcd 0000:00:03.3: supports USB remote wakeup
ehci_hcd 0000:00:03.3: irq 18, io mem 0xe5800000
ehci_hcd 0000:00:03.3: reset command 080002 (park)=0 ithresh=8 period=1024 Reset HALT
ehci_hcd 0000:00:03.3: init command 010001 (park)=0 ithresh=1 period=1024 RUN
ehci_hcd 0000:00:03.3: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: default language 0x0409
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.17-gentoo-r4 ehci_hcd
usb usb1: SerialNumber: 0000:00:03.3
usb usb1: uevent
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 6 ports detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: no power switching (usb 1.0)
hub 1-0:1.0: individual port over-current protection
hub 1-0:1.0: Single TT
hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
hub 1-0:1.0: power on to power good time: 20ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0000
drivers/usb/core/inode.c: creating file '001'
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
ehci_hcd 0000:00:03.3: GetStatus port 1 status 001803 POWER sig=j CSC CONNECT
hub 1-0:1.0: port 1, status 0501, change 0001, 480 Mb/s
ACPI: PCI Interrupt 0000:00:03.0[A] -> GSI 20 (level, low) -> IRQ 20
ohci_hcd 0000:00:03.0: OHCI Host Controller
drivers/usb/core/inode.c: creating file '002'
ohci_hcd 0000:00:03.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:03.0: created debug files
ohci_hcd 0000:00:03.0: irq 20, io mem 0xe7000000
ohci_hcd 0000:00:03.0: resetting from state 'reset', control = 0x0
ohci_hcd 0000:00:03.0: enabling initreset quirk
ohci_hcd 0000:00:03.0: OHCI controller state
ohci_hcd 0000:00:03.0: OHCI 1.0, NO legacy support registers
ohci_hcd 0000:00:03.0: control 0x083 HCFS=operational CBSR=3
ohci_hcd 0000:00:03.0: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:03.0: intrstatus 0x00000004 SF
ohci_hcd 0000:00:03.0: intrenable 0x8000000a MIE RD WDH
ohci_hcd 0000:00:03.0: hcca frame #0003
ohci_hcd 0000:00:03.0: roothub.a 01000202 POTPGT=1 NPS NDP=2(2)
ohci_hcd 0000:00:03.0: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:03.0: roothub.status 00008000 DRWE
ohci_hcd 0000:00:03.0: roothub.portstatus [0] 0x00000100 PPS
ohci_hcd 0000:00:03.0: roothub.portstatus [1] 0x00000100 PPS
usb usb2: default language 0x0409
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OHCI Host Controller
usb usb2: Manufacturer: Linux 2.6.17-gentoo-r4 ohci_hcd
usb usb2: SerialNumber: 0000:00:03.0
usb usb2: uevent
usb usb2: configuration #1 chosen from 1 choice
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: uevent
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
hub 2-0:1.0: standalone hub
hub 2-0:1.0: no power switching (usb 1.0)
hub 2-0:1.0: global over-current protection
hub 2-0:1.0: power on to power good time: 2ms
hub 2-0:1.0: local power source is good
hub 2-0:1.0: no over-current condition exists
hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x501
drivers/usb/core/inode.c: creating file '001'
ACPI: PCI Interrupt 0000:00:03.1[B] -> GSI 21 (level, low) -> IRQ 19
ohci_hcd 0000:00:03.1: OHCI Host Controller
drivers/usb/core/inode.c: creating file '003'
ohci_hcd 0000:00:03.1: new USB bus registered, assigned bus number 3
ohci_hcd 0000:00:03.1: created debug files
ohci_hcd 0000:00:03.1: irq 19, io mem 0xe6800000
ohci_hcd 0000:00:03.1: resetting from state 'reset', control = 0x0
ehci_hcd 0000:00:03.3: port 1 high speed
ehci_hcd 0000:00:03.3: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
ohci_hcd 0000:00:03.1: enabling initreset quirk
ohci_hcd 0000:00:03.1: OHCI controller state
ohci_hcd 0000:00:03.1: OHCI 1.0, NO legacy support registers
ohci_hcd 0000:00:03.1: control 0x083 HCFS=operational CBSR=3
ohci_hcd 0000:00:03.1: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:03.1: intrstatus 0x00000004 SF
ohci_hcd 0000:00:03.1: intrenable 0x8000000a MIE RD WDH
ohci_hcd 0000:00:03.1: hcca frame #0003
ohci_hcd 0000:00:03.1: roothub.a 01000202 POTPGT=1 NPS NDP=2(2)
ohci_hcd 0000:00:03.1: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:03.1: roothub.status 00008000 DRWE
ohci_hcd 0000:00:03.1: roothub.portstatus [0] 0x00000100 PPS
ohci_hcd 0000:00:03.1: roothub.portstatus [1] 0x00000100 PPS
usb usb3: default language 0x0409
usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: OHCI Host Controller
usb usb3: Manufacturer: Linux 2.6.17-gentoo-r4 ohci_hcd
usb usb3: SerialNumber: 0000:00:03.1
usb usb3: uevent
usb usb3: configuration #1 chosen from 1 choice
usb usb3: adding 3-0:1.0 (config #1, interface 0)
usb 3-0:1.0: uevent
hub 3-0:1.0: usb_probe_interface
hub 3-0:1.0: usb_probe_interface - got id
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
hub 3-0:1.0: standalone hub
hub 3-0:1.0: no power switching (usb 1.0)
hub 3-0:1.0: global over-current protection
hub 3-0:1.0: power on to power good time: 2ms
hub 3-0:1.0: local power source is good
hub 3-0:1.0: no over-current condition exists
usb 1-1: new high speed USB device using ehci_hcd and address 2
ehci_hcd 0000:00:03.3: port 1 high speed
ehci_hcd 0000:00:03.3: GetStatus port 1 status 001005 POWER sig=se0 PE CONNECT
drivers/usb/core/inode.c: creating file '001'
ACPI: PCI Interrupt 0000:00:03.2[C] -> GSI 22 (level, low) -> IRQ 21
ohci_hcd 0000:00:03.2: OHCI Host Controller
drivers/usb/core/inode.c: creating file '004'
ohci_hcd 0000:00:03.2: new USB bus registered, assigned bus number 4
ohci_hcd 0000:00:03.2: created debug files
ohci_hcd 0000:00:03.2: irq 21, io mem 0xe6000000
ohci_hcd 0000:00:03.2: resetting from state 'reset', control = 0x0
ohci_hcd 0000:00:03.2: enabling initreset quirk
ohci_hcd 0000:00:03.2: OHCI controller state
ohci_hcd 0000:00:03.2: OHCI 1.0, NO legacy support registers
ohci_hcd 0000:00:03.2: control 0x083 HCFS=operational CBSR=3
ohci_hcd 0000:00:03.2: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:03.2: intrstatus 0x00000004 SF
ohci_hcd 0000:00:03.2: intrenable 0x8000000a MIE RD WDH
ohci_hcd 0000:00:03.2: hcca frame #0003
ohci_hcd 0000:00:03.2: roothub.a 01000202 POTPGT=1 NPS NDP=2(2)
ohci_hcd 0000:00:03.2: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:03.2: roothub.status 00008000 DRWE
ohci_hcd 0000:00:03.2: roothub.portstatus [0] 0x00000100 PPS
ohci_hcd 0000:00:03.2: roothub.portstatus [1] 0x00000100 PPS
usb usb4: default language 0x0409
usb usb4: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: OHCI Host Controller
usb usb4: Manufacturer: Linux 2.6.17-gentoo-r4 ohci_hcd
usb usb4: SerialNumber: 0000:00:03.2
usb usb4: uevent
usb usb4: configuration #1 chosen from 1 choice
usb usb4: adding 4-0:1.0 (config #1, interface 0)
usb 4-0:1.0: uevent
hub 4-0:1.0: usb_probe_interface
hub 4-0:1.0: usb_probe_interface - got id
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
hub 4-0:1.0: standalone hub
hub 4-0:1.0: no power switching (usb 1.0)
hub 4-0:1.0: global over-current protection
hub 4-0:1.0: power on to power good time: 2ms
hub 4-0:1.0: local power source is good
hub 4-0:1.0: no over-current condition exists
ohci_hcd 0000:00:03.0: suspend root hub
usb 1-1: default language 0x0409
usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Samsung ML-2550 Series
usb 1-1: Manufacturer: SAMSUNG ELECTRONICS CO., LTD
usb 1-1: SerialNumber: 2M37B1EA100142H.
usb 1-1: uevent
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: uevent
drivers/usb/core/inode.c: creating file '002'
ehci_hcd 0000:00:03.3: GetStatus port 2 status 001803 POWER sig=j CSC CONNECT
hub 1-0:1.0: port 2, status 0501, change 0001, 480 Mb/s
drivers/usb/core/inode.c: creating file '001'
USB Universal Host Controller Interface driver v3.0
ohci_hcd 0000:00:03.1: suspend root hub
hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x501
ehci_hcd 0000:00:03.3: port 2 high speed
ehci_hcd 0000:00:03.3: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
usb 1-2: new high speed USB device using ehci_hcd and address 3
ohci_hcd 0000:00:03.2: suspend root hub
ehci_hcd 0000:00:03.3: port 2 high speed
ehci_hcd 0000:00:03.3: GetStatus port 2 status 001005 POWER sig=se0 PE CONNECT
usb 1-2: default language 0x0409
usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: Freecom Hard Drive
usb 1-2: Manufacturer: Freecom
usb 1-2: SerialNumber: 01BC0E4B0053
usb 1-2: uevent
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: adding 1-2:1.0 (config #1, interface 0)
usb 1-2:1.0: uevent
drivers/usb/core/inode.c: creating file '003'
hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0000
hub 1-0:1.0: state 7 ports 6 chg 0000 evt 0000
hub 3-0:1.0: state 7 ports 2 chg 0000 evt 0000
hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0000
usblp 1-1:1.0: usb_probe_interface
usblp 1-1:1.0: usb_probe_interface - got id
drivers/usb/core/file.c: looking for a minor, starting at 0
drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x324A
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usb-storage 1-2:1.0: usb_probe_interface
usb-storage 1-2:1.0: usb_probe_interface - got id
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
md: linear personality registered for level -1
md: raid1 personality registered for level 1
md: multipath personality registered for level -4
md: faulty personality registered for level -5
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
Advanced Linux Sound Architecture Driver Version 1.0.11rc4 (Wed Mar 22 10:27:24 2006 UTC).
ACPI: PCI Interrupt 0000:00:02.7[C] -> GSI 18 (level, low) -> IRQ 22
intel8x0_measure_ac97_clock: measured 51759 usecs
intel8x0: clocking to 48000
ALSA device list:
  #0: SiS SI7012 with CS4299 at 0x9400, irq 22
ip_conntrack version 2.4 (7168 buckets, 57344 max) - 224 bytes per conntrack
ip_conntrack_pptp version 3.1 loaded
ip_nat_pptp version 3.0 loaded
ip_tables: (C) 2000-2006 Netfilter Core Team
ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/
ClusterIP Version 0.8 loaded successfully
arp_tables: (C) 2002 David S. Miller
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 164k freed
usb usb2: uevent
usb 2-0:1.0: uevent
usb usb3: uevent
usb 3-0:1.0: uevent
usb usb4: uevent
usb 4-0:1.0: uevent
usb usb1: uevent
usb 1-0:1.0: uevent
usb 1-1: uevent
usb 1-1:1.0: uevent
usb 1-2: uevent
usb 1-2:1.0: uevent
  Vendor: SAMSUNG   Model: HD400LD           Rev: WQ10
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 781422768 512-byte hdwr sectors (400088 MB)
sda: Write Protect is off
sda: Mode Sense: 03 00 00 00
sda: assuming drive cache: write through
 sda: unknown partition table
sd 0:0:0:0: Attached scsi disk sda
usb-storage: device scan complete
EXT3 FS on hda3, internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS on hdd1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding 506036k swap on /dev/hda2.  Priority:-1 extents:1 across:506036k
eth0: Media Link On 100mbps full-duplex



00:00.0 Host bridge: Silicon Integrated Systems [SiS] 651 Host (rev 01)
00:01.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)
00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS962 [MuTIOL Media IO] (rev 04)
00:02.1 SMBus: Silicon Integrated Systems [SiS] SiS961/2 SMBus Controller
00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE]
00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] AC'97 Sound Controller (rev a0)
00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 0f)
00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 65x/M650/740 PCI/AGP VGA Display Adapter
franz ~ #


Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 1:16 pm    Post subject: Reply with quote

bingobob,

Your chipset is UDMA 133 capabale,
Code:
SIS5513: chipset revision 0
SIS5513: not 100% native mode: will probe irqs later
SIS5513: SiS 962/963 MuTIOL IDE UDMA133 controller
    ide0: BM-DMA at 0xa400-0xa407, BIOS settings: hda:DMA, hdb:DMA
    ide1: BM-DMA at 0xa408-0xa40f, BIOS settings: hdc:DMA, hdd:DMA
your drives are UDMA 100, so you can do better than 27Mb/sec

I have a box with the SiS5513 too, I get
Code:
hdparm -tT /dev/hda

/dev/hda:
 Timing cached reads:   638 MB in  2.00 seconds = 318.92 MB/sec
 Timing buffered disk reads:  158 MB in  3.00 seconds =  52.66 MB/sec

_________________
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
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 1:19 pm    Post subject: Reply with quote

is this a hardware thing? (i.e. cables) or hdparm settings ?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 1:48 pm    Post subject: Reply with quote

bingobob,

Its likely to be cables, or cables fitted the wrong way round. On 80 wire cables the two ends are different but the connectors are not, so they can be interchanged. Everything still operates except the 80 wire detect.
With 40 wire cables the theoretical max data rate is 33Mb/sec and your 27Mb, is just less than that, so that fits.

Compare the wire pitch between the floppy and IDE ribbons. They should a) be different. b) The IDE cable should have two wires for every one in the floppy cable. While its nice to fix, it has no effect on setting up raid.

My nForce2 box gives me a boot up warning but there is nothing in dmesg. Do you get a warning about no 80 wire ribbon detected as the kernel detects your HDD?
_________________
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
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Sat May 12, 2007 2:41 pm    Post subject: Reply with quote

I wouldn't recommend Software RAID for ATA - You've sensibly put both disks on different IDE channels which will help a lot, but hda is still sharing a channel which could be problematic during heavy load.

Software RAID puts a much bigger strain on the disk subsystem, and with ATA setups that typically run off a bus, you can run into bottleneck hell.

If you have any SATA sockets, I'd recommend building the RAID on them instead...


As for the actual creation, assuming you compiled all the right bits in and emerged mdadm, the next step is to prep the disks for RAID:

I usually use cfdisk, then setup your partiton(s) - I just make one big one spanning the whole disk. Change the TYPE to FD (Linux RAID Autodetect) - This is semi-important.
Do this for all the disks to be in the array.
The partitions should all be the same size for minimum future hassles :)

Next, create the array using mdadm - The command will be something like:
Code:
mdadm -C /dev/md0 --verbose -l 1 -n 2 /dev/hdb1 /dev/hdd1


Read the docs if you are not sure!


After some whirring, you should have a new device - /dev/md0
(You can check on the array progress using 'cat /proc/mdstat' and 'mdadm-D /dev/md0')

Treat md0 as if it was a fresh disk partition - Basically from this point on, you just format it with mke2fs or whatever filesystem you want to use, then its ready for use!

If you want to use the 400GB drive and RAID5, there are extra optimization tricks (e.g. setting stripe and stride sizes), but I'd strongly recommend against using RAID5 on ATA!
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 2:49 pm    Post subject: Reply with quote

interesting...well there is no SATA on this system...hmm this has thrown a spannner in the works. my whole plan was to buy the external 400 gigger and then raid1 the two internal disks for some resiliaance...

its a P4 with 1 gig ram. better off without raid then?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat May 12, 2007 4:03 pm    Post subject: Reply with quote

bingobob,

An IDE bus with only one drive is not really a bus.
In the case of access to hda and hdb, accesses will have to be queued but hda is the system and programs and hdb will be data, so in practice the performance loss for using IDE will be very small, as the syatem will not be trying to read/write data at the same time as system info. If you run into swapping all bets are off but swapping is a performance killer anyway.

Note that operations on the same IDE bus cannot be overlapped but operations on different IDE busses can (and will be).
In short, you won't notice.

edit ====

The bottleneck with 7,200 rpm drives (about 50MB/sec) is the head/platter data rate - not the connecting bus.
With 15,000 rpm drives, you begin to move the bottleneck to the bus.
_________________
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
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sat May 12, 2007 6:24 pm    Post subject: Reply with quote

I have been slightly distracted by going and buying a macbook this afternoon. oops, and yes, i do intend to dual boot it to gentoo in the future! hehe, thanks for the RAID help, going to do it a little later on.
Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sun May 13, 2007 7:24 am    Post subject: Reply with quote

have taken the plunge, repartioned both drives as type FD - i used the maximum space.

run this command

Code:

mdadm -C /dev/md0 --verbose -l 1 -n 2 /dev/hdb1 /dev/hdd1


now it's building, how exciting!

Code:

franz ~ # cat /proc/mdstat
Personalities : [linear] [raid1] [multipath] [faulty]
md0 : active raid1 hdd1[1] hdb1[0]
      117218176 blocks [2/2] [UU]
      [===>.................]  resync = 17.1% (20090496/117218176) finish=48.9min speed=33041K/sec

unused devices: <none>
franz ~ #


neddy, i see your point re the wires in the server, i haven't opened it up yet to check it out but plan to do this, i imagine i can get the performance boost at any time by fixing that problem, (i.e. applies equally to RAIDED or unraided, its a hardware issue).

I will try that hdparm test when it's built to see performance, would I expect improvements ?

later I will put my data back !!! :-)

thanks

bb

ps...looking good!

Code:


franz ~ # mdadm -D /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Sun May 13 08:10:16 2007
     Raid Level : raid1
     Array Size : 117218176 (111.79 GiB 120.03 GB)
  Used Dev Size : 117218176 (111.79 GiB 120.03 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Sun May 13 08:10:16 2007
          State : clean, resyncing
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

 Rebuild Status : 30% complete

           UUID : 8389810a:c0155f1e:48681755:91132023
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       3       65        0      active sync   /dev/hdb1
       1      22       65        1      active sync   /dev/hdd1
franz ~ #


Back to top
View user's profile Send private message
bingobob
Apprentice
Apprentice


Joined: 05 Apr 2004
Posts: 296
Location: Hertfordshire, UK

PostPosted: Sun May 13, 2007 8:14 am    Post subject: Reply with quote

strangely...seems a bit slower !


Code:



franz ~ # hdparm -tT /dev/md0

/dev/md0:
 Timing cached reads:   896 MB in  2.00 seconds = 448.10 MB/sec
 Timing buffered disk reads:   78 MB in  3.05 seconds =  25.58 MB/sec
franz ~ # hdparm -tT /dev/md0

/dev/md0:
 Timing cached reads:   898 MB in  2.00 seconds = 448.26 MB/sec
 Timing buffered disk reads:   78 MB in  3.03 seconds =  25.77 MB/sec
franz ~ #






forgot to format !
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun May 13, 2007 12:30 pm    Post subject: Reply with quote

bingobob,

The format won't make any difference. I would have expected slower writes, writes have to go to both drives separately and faster reads as both drives can be read at the same time.
Run both hdparm -tT /dev/hdd1 and hdparm -tT /dev/md0 You need to be sure that nothing else is using the disks when you do these speed tests.

As you say, the cable fix can be done at any time.
_________________
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
thanny
n00b
n00b


Joined: 15 Aug 2005
Posts: 55

PostPosted: Tue May 15, 2007 5:36 pm    Post subject: Reply with quote

RAID1 will offer zero performance benefit. All you get with RAID1 is reliability. And if you're not mirroring the boot drive, I have to wonder what good having a reliable data volume will be if the one and only boot volume fails.

RAID0 will definitely offer a performance benefit. Since you seem to have a method for backing your data up, you'd be better off with RAID0, which almost doubles performance while doubling the space on a given mount point.

All recent 7200rpm drives read at speeds greater than 70MB/sec near the logical beginning (the outer edges of the platter). All drives are slower near the logical end (near the spindle), because the linear speed of the data under the drive head is reduced. For IDE, having the 80-wire cable is crucial (it's still only 40 pins, but having each signal travel on two wires kills a lot of noise).

No single 15Krpm drive comes close to saturating the data bus. It still takes 3 or 4 of them to bog down a U320 SCSI bus. With SAS (the only other interface you'll see a 15Krpm drive on), each drive has its own bus, and no drive comes close to saturating its bus.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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