Ubuntu Raid 5

Next planned iteration: Do per 20100827 iteration but starting with Ubuntu Server then minimal gnome install..

Also: LDAP server, poss LUNA GUI?



20100830 http://manpages.ubuntu.com/manpages/lucid/man1/powernowd.1.html



20100827 Now to repeat all per below but with 64bit ubuntu desktop

Using the knowledge learned from the 20100826 experiment below


  • Gigabyte 880GM-UDH2 MB
  • AMD X2 245 CPU
  • 1 x 80GB IDE Hardrive
  • 4 x 2TB WD EARS drives already configured as software raid via previous openfiler 2.3 installation with LVM vol group and volumes defined


Installed Ubuntu 10.04.1 AMD_64 on standalone IDE fnf-server1

  • Installed Non GPL video drives, reboot
  • Installed updates, reboot
  • Installed (all in one go, then reboot):
    • mdadm (postfix as internet site, mail server = fnf-server1)
    • LVM2, system-config-lvm
    • KVM, libvirt0, virt-manager, dnsmasq
    • Checked that user am in group libvirtd - yes I am..
  • Reboot
  • Applications -> Systems Tools -> Logical Volume Management
    • Didn't do 'sudo mdadm --assemble --scan' first but predefined volumes are showing on the software raid array so assume that the 'Restarting LVM' does this for us.. (checked in System -> Administration -> Disk Utility as well afterwards)
    • Mounted predefined volumes as /bbdaf-xxx
  • From the Openfiler setup each of the above volumes is read RW access to group 501:
    • System -> Adminsitration -> Usrrs & Groups: Added group bbdaf as gid 501
  • To fix KVM & DNSMASQ conflict did this:
First stop dnsmasq:
# /etc/init.d/dnsmasq stop
Disable dnsmasq daemon autostart:
'sudo gedit /etc/default/dnsmasq':
  • Make Virt-Manager Run With root Privileges:
    • sudo gedit /usr/bin/virt-manager
    • #!/bin/sh

      exec gksudo python "/usr/share/virt-manager/virt-manager.py" "$@"
  • Reboot




Had Openfiler on IDE drive & 4 x 2tb drives in a software raid5 array setup via the openfiler tools with Volume groups & 2 x volumes shared

Removed Openfiler IDE drive and replaced with another.


Ubuntu 10.04 desktop

Installed Ubuntu Desktop 10.04 to the IDE drive.

Ran  updates



Installed MDADM which required postfix, (postfix install = Internet Site)

Ran mdadm command: sudo mdadm --assemble --scan

It found md0 ok.. but can I see existing partitions? how?



Ok, need LVM so installed LVM2 & dependancies

Seems there is a lack of LVM gui tools, installed system-config-lvm & dependancies, with warning that it just does things you tell it to with no yes/no are you sure confirm..

Found it in Applications -> Systems Tools -> Logical Volume Management

It found my LVM volumes, I selected each and edited:

  • Mount, Mount when rebooted
  • Entered bbdaf-xxx as mount points
  • reboot
  • yes drives are visible but.. I don't have rights..


Drives show permissions as

  • Owner user 99
  • Group folder access = 501

Adminstration -> Users & Groups

  • Added a group bbdaf with group no 501, with me as a member
  • rebooted
  • yay can see folder contents

Still need to change the owner..



Might be useful : http://havetheknowhow.com/Configure-the-server/Configure-KVM.html

Installed KVM, libvirt0, virtmanager

I was automatically in group libvirtd, added myself to kvm

Ran Virtual machine Manager

- Need to add new connection and use localhost (QEMU) not localhost (QEMU usermode) or otherwise I cant create vm files in the storage pool

(per https://bugs.launchpad.net/ubuntu/+source/virt-manager/+bug/405388)

- add raided dir bbdaf-vm as storage pool


But cant setup VM as virtlib conflicts with dnsmasq:

Fix per http://miguel.leugim.com.mx/index.php/2008/11/22/goodbye-virtualbox-welcome-kvmvirt-manager/

According to the instructions you must now log out and log in in 
order to use virt-manager and start creating vms for the dozen. But no,
there is something you must do before. You must fix the network for
virt-manager. Keep reading.
First stop dnsmasq:
# /etc/init.d/dnsmasq stop
Disable autostart for it editing /etc/default/dnsmasq and changing:
This is because virt-manager and libvirtd will start the dnsmasq with
the appropriate configuration and the default config for dnsmasq
conflicts with it and prevents the “default” network from virt-manager
to start.
Now, log out, log in again, restart the libvirtd (or restart the machine) in order to the changes to take effect.
If everything works ok, you should see something like this in your processlist:
$ ps ax|grep dnsmasq
14482 ?        S      0:00 dnsmasq
–keep-in-foreground –strict-order –bind-interfaces –pid-file 
–conf-file  –listen-address –except-interface lo
–dhcp-leasefile=/var/lib/libvirt/dhcp-default.leases –dhcp-range,
If you see a dnsmasq process with status Z (zombie), then review your configuration and the instructions.
Ok, with dnsmasq working correctly, start virt-manager as your user 
and try to connect to the localhost machine you’ll see in the
virt-manager window. Before creating the first virtual machine, we must
start the network. Click the “Details” button, after selecting localhost
and you’ll see the “Host Details” dialog box. Select the “Virtual
Network” tab. There you’ll see the “default” network in an inactive
status (it only appears if you are connected to the machine). Start it.
Now you can create your virtual machines without problems.
As you can see, the “default” network isn’t configured to autostart 
itself. And after a while, you get tired of starting it before running
or creating a vm. To enable autostart, run the following in the command
line (because I didn’t find a way to do it with the GUI):
$ virsh net-autostart default
From now on, the network will always start with the libvirtd. 

Ok, created a machine etc.

But cannot clone get Permission denied, this guy says http://www.howtoforge.com/kvm-guest-management-with-virt-manager-on-ubuntu-8.10

2.1 Make Virt-Manager Run With root Privileges
Normally virt-manager is run as a normal user (i.e., without root 
privileges). This is fine as long as you only want to start, stop, or
pause KVM guests. If you want to create or delete KVM guests (works only
if KVM is installed on the same system!), virt-manager must be run with
root privileges.
If KVM is installed on the same system as virt-manager, and you want to create or delete KVM guests, open a terminal (Applications > Accessories > Terminal)
and open the file /usr/bin/virt-manager:
sudo gedit /usr/bin/virt-manager
Insert the word sudo between exec and python so that the file looks as follows:

exec sudo python "/usr/share/virt-manager/virt-manager.py" "$@"
That's it - virt-manager will be executed with root privileges from now on.

BUT, I did the above and after clicking VMM nothing happens.. so installing python-gksu2, nope it seems that if I start LVM which runs as root then start virt-manager I'm ok

- found a solution: make the line above use gksudo:

exec gksudo python "/usr/share/virt-manager/virt-manager.py" "$@"