Amahi in VM with RAID1 & ethernet bonding

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Amahi in VM with RAID1 & ethernet bonding

Postby moredruid » Sun Nov 01, 2009 1:27 pm

So finally I've had some time to sit down and test some stuff out.
I've managed to get F10 with RAID 1 installed... Of course I made no notes and to be honest it felt like blind luck that I've even gotten it installed. Diskdruid (or whatever you're presented with) confuses the hell out of me. Anyway, I've managed to do a software RAID1 install and that's what counts :D

Code: Select all

[root@testhda ~]# mdadm --detail /dev/md0 /dev/md0: Version : 0.90 Creation Time : Sun Oct 18 18:01:07 2009 Raid Level : raid1 Array Size : 10482304 (10.00 GiB 10.73 GB) Used Dev Size : 10482304 (10.00 GiB 10.73 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Sun Nov 1 21:11:27 2009 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 UUID : 1c68e255:8559f0a7:83a69132:d05cb678 Events : 0.6 Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 1 8 17 1 active sync /dev/sdb1
woohoo!

now of course we want to see if bonding works (persistent across reboots requires some modification).

Code: Select all

[root@testhda ~]# ifconfig bond0 Link encap:Ethernet HWaddr 08:00:27:6C:FF:DF inet addr:10.0.0.10 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe6c:ffdf/64 Scope:Link UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:63 errors:0 dropped:0 overruns:0 frame:0 TX packets:73 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:9711 (9.4 KiB) TX bytes:10395 (10.1 KiB) eth0 Link encap:Ethernet HWaddr 08:00:27:6C:FF:DF UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:29 errors:0 dropped:0 overruns:0 frame:0 TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4688 (4.5 KiB) TX bytes:5297 (5.1 KiB) eth1 Link encap:Ethernet HWaddr 08:00:27:6C:FF:DF UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1 RX packets:34 errors:0 dropped:0 overruns:0 frame:0 TX packets:35 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:5023 (4.9 KiB) TX bytes:5098 (4.9 KiB) eth2 Link encap:Ethernet HWaddr 08:00:27:42:66:D3 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe42:66d3/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:94 errors:0 dropped:0 overruns:0 frame:0 TX packets:96 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:82237 (80.3 KiB) TX bytes:12368 (12.0 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:90 errors:0 dropped:0 overruns:0 frame:0 TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8923 (8.7 KiB) TX bytes:8923 (8.7 KiB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Ahh, we have a tun0 device which means openvpn has started nicely!
Since I've configured bond0 to be on it's own network segment I needed to add another NIC that was NAT-ed with DHCP enabled to get to the internet (for the installation of the amahi repo stuff). The VirtualBox adapter gives out a lease in the 10.0.2.x range, this makes it confusing since you have to look carefully cause the networks look a lot like each other :D

Now to check if the hda services are really up and running:

Code: Select all

[root@testhda ~]# ps -ef | grep hd[a] root 2499 1 0 21:06 ? 00:00:00 hdactl - sleeping for 3795 secon root 2500 2499 0 21:06 ? 00:00:00 /usr/bin/perl -w /usr/bin/hdactl avahi 2661 1 0 21:06 ? 00:00:00 avahi-daemon: running [testhda.local]
yess they are! so I've given myself a little pat on the back for now. I'll need to test if the hda will work properly with the bonded interface, but everything seems to look fine.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Amahi in VM with RAID1 & ethernet bonding

Postby cpg » Mon Nov 02, 2009 4:04 am

WOW!

nice going!

i actually never tried bonding myself. i wanted to, to pair forces with my neighbor :)
but we never got too far.

(i'd be nice if you took notes on the RAID - it's an FAQ!)
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Amahi in VM with RAID1 & ethernet bonding

Postby moredruid » Mon Nov 02, 2009 6:30 am

Well to be honest I had some help with the RAID setup from here (old but not deprecated):
http://www.redhat.com/docs/manuals/linu ... -raid.html

it's quite an old document but still valid.
I can try installing again and documenting every step. I intend to do that anyway since now I've settled on a simple RAID with no LVM on it (I must have my LVM :))

the bonding is quite straightforward, I can whip up some documentation on that in no time if you want.
Most of the info is taken from here and having hands on experience with it:
http://www.redhat.com/docs/manuals/ente ... faces.html
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
marcel
Posts: 160
Joined: Sat May 16, 2009 12:46 am
Location: Netherlands

Re: Amahi in VM with RAID1 & ethernet bonding

Postby marcel » Mon Nov 02, 2009 9:43 am

two questions:

- Is raid with lvm possible?
- What is bonding?

Thanks for answering.
My HDA cpu: E1400 2Ghz; motherboard: Gigabyte GA-G33M-S2H; memory: Team 2Gb DDR2; 200GB OS HDD, 2x western digital GP 1TB storage HDDs; case: Antec P182

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Amahi in VM with RAID1 & ethernet bonding

Postby moredruid » Mon Nov 02, 2009 12:40 pm

two answers:

yes RAID with LVM is possible. Linux RAID & LVM are _very_ configurable and flexible, even to the point that it gets rediculous:
You can create a (striped) LVM on which you create a RAID5 with a (striped) LVM on top (on which you can create another RAIDx level with another LVM on top if you like and another and another until you either go completely nuts or you run out of disk space due to the filesystem overhead - each level takes a certain amount of disk space for inodes and the partition table etc.).

bonding is another word for aggregating 2 links into 1. OK, now I've told you nothing LOL... What this means that you can use 2 (or more) ethernet interfaces and "bundle" them into 1 visible interface. The outside world sees the 1 - bonded - interface (usually called bond0 if it's the first bonded interface) with an IP address even though the system has 2 (or more) interfaces active. This is usually configured for failover or load balancing (or both). So if you have 2 or more ethernet interfaces in your system you can set up bonding (I refrain from saying 2 NICs because a NIC can have multiple ethernet ports). There are more configuration options but you can find more on the internet (search on http://www.google.com/linux for ethernet bonding). Bonding is quite easy to set up in a VM since you can easily assign 2 or more ethernet interfaces to a VM - at least easier than adding real hardware :)
Workstation/server class NICs usually have more than 1 ethernet interface, I've got one like this (not sure exactly) in my hda but before really trying it on my "production" system I wanted to experiment and make sure it worked with Amahi.

you're welcome :mrgreen:
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
marcel
Posts: 160
Joined: Sat May 16, 2009 12:46 am
Location: Netherlands

Re: Amahi in VM with RAID1 & ethernet bonding

Postby marcel » Mon Nov 02, 2009 1:52 pm

hmmm, interesting stuff. So if i understand lvm correctly it is also very easy to add extra disk space to a raid 5 array? Like the drive extender technique from windows home server.
My HDA cpu: E1400 2Ghz; motherboard: Gigabyte GA-G33M-S2H; memory: Team 2Gb DDR2; 200GB OS HDD, 2x western digital GP 1TB storage HDDs; case: Antec P182

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Amahi in VM with RAID1 & ethernet bonding

Postby moredruid » Tue Nov 03, 2009 6:00 am

well I don't know the disk extender from Windows but from the sound of it it should do the same.
Adding data to a RAID array is different in that you have to worry about what happens if you add a disk to the RAID array and how to expand that space in the volume group and later on in the logical volume. I'm not sure what would happen there although I expect it to work fine.
Will test in VM when I find the time for it (I'm curious too).
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
marcel
Posts: 160
Joined: Sat May 16, 2009 12:46 am
Location: Netherlands

Re: Amahi in VM with RAID1 & ethernet bonding

Postby marcel » Tue Nov 03, 2009 9:49 am

I also will give it a try to install f10 onto a raid 1 (LVM) array. I find this very interesting stuff and i like to experiment. I will use virtualbox. I'll hope i get this working :roll:
My HDA cpu: E1400 2Ghz; motherboard: Gigabyte GA-G33M-S2H; memory: Team 2Gb DDR2; 200GB OS HDD, 2x western digital GP 1TB storage HDDs; case: Antec P182

User avatar
marcel
Posts: 160
Joined: Sat May 16, 2009 12:46 am
Location: Netherlands

Re: Amahi in VM with RAID1 & ethernet bonding

Postby marcel » Tue Nov 03, 2009 12:04 pm

I've installed F10 on a raid 1 array (Virtualbox).

Code: Select all

[root@SERVER ~]# mdadm --detail /dev/md0 /dev/md0: Version : 0.90 Creation Time : Tue Nov 3 19:34:06 2009 Raid Level : raid1 Array Size : 200704 (196.03 MiB 205.52 MB) Used Dev Size : 200704 (196.03 MiB 205.52 MB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Tue Nov 3 20:58:16 2009 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 UUID : c99476bc:7637558b:801f9af3:b80d52b3 Events : 0.6 Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 1 8 17 1 active sync /dev/sdb1

Code: Select all

[root@SERVER ~]# mdadm --query --detail /dev/md1 /dev/md1: Version : 0.90 Creation Time : Tue Nov 3 19:33:55 2009 Raid Level : raid1 Array Size : 13478464 (12.85 GiB 13.80 GB) Used Dev Size : 13478464 (12.85 GiB 13.80 GB) Raid Devices : 2 Total Devices : 2 Preferred Minor : 1 Persistence : Superblock is persistent Update Time : Tue Nov 3 21:01:49 2009 State : active Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 UUID : f3694284:bbb471f4:7b2d55d1:61cbd44d Events : 0.7 Number Major Minor RaidDevice State 0 8 3 0 active sync /dev/sda3 1 8 19 1 active sync /dev/sdb3

Code: Select all

[root@SERVER ~]# cat /proc/mdstat Personalities : [raid1] [raid6] [raid5] [raid4] md0 : active raid1 sda1[0] sdb1[1] 200704 blocks [2/2] [UU] md1 : active raid1 sda3[0] sdb3[1] 13478464 blocks [2/2] [UU] unused devices: <none>
A importentend thing to do is:

Code: Select all

root (hd0,0) setup (hd0) root (hd1,0) setup (hd1)
Now the Os will boot from both drives. See http://www.texsoft.it/index.php?c=hardw ... raid1&l=it



What i now want to do is add a raid 5 array (3 drives). Put the directory /var/hda/files onto the raid 5 array. How to move /var/hda/files from the raid 1 array to the raid 5 array?
My HDA cpu: E1400 2Ghz; motherboard: Gigabyte GA-G33M-S2H; memory: Team 2Gb DDR2; 200GB OS HDD, 2x western digital GP 1TB storage HDDs; case: Antec P182

User avatar
marcel
Posts: 160
Joined: Sat May 16, 2009 12:46 am
Location: Netherlands

Re: Amahi in VM with RAID1 & ethernet bonding

Postby marcel » Tue Nov 03, 2009 12:12 pm

Image


Strange?
My HDA cpu: E1400 2Ghz; motherboard: Gigabyte GA-G33M-S2H; memory: Team 2Gb DDR2; 200GB OS HDD, 2x western digital GP 1TB storage HDDs; case: Antec P182

Who is online

Users browsing this forum: No registered users and 11 guests