Openfiler and XenServer Reconnection Issues

Openfiler and XenServer Reconnection Issues

If you are trying to use OpenFiler 2.3 as a storage repository for Citrix XenServer, you may run into a reconnection issue when you reboot OpenFiler.  Namely, you cannot reconnect your iSCSI data storage.

The problem has to do with OpenFiler scanning the volume created by XenServer in the iSCSI Volume Group.

How to fix?  This worked for me:

1. Comment this out in /etc/rc.sysinit:333-337

1 #       if [ -x /sbin/lvm.static ]; then
2 #               if /sbin/lvm.static vgscan --mknodes --ignorelockingfailure > /dev/null 2>&1 ; then
3 #                       action $"Setting up Logical Volume Management:" /sbin/lvm.static #                                vgchange -a y --ignorelockingfailure
4 #               fi
5 #       fi

2. Change in /etc/lvm/lvm.conf:53

1 filter = [ "r|/dev/dm-*|", "r|/dev/VG_XenStorage*|", "r|/dev/sr/iscsi|", "a/.*/" ]

3.  Turn off AOE (ATA over Ethernet)

1 chkconfig aoe off

4. Restart and you should be good to go.

Credit goes to:

https://forums.openfiler.com/viewtopic.php?id=2280

Notes

Debian Lenny Paravirtualization XenServer

Paravirtualization with XEN and Debian Lenny
(or: how to get XENTools running with Debian Lenny)

1.) Install Debian Lenny with "Other install media" default Template and update it with aptitude.
Add the GPG-KEY of Citrix to aptitude:
wget -q http://updates.vmd.citrix.com/XenServer/5.5.0/GPG-KEY -O- | apt-key add -

2.) Add XenTools ISO, mount and install it:
mount -t iso9660 /dev/cdrom /cdrom
cd /cdrom
dpkg –i Linux/xe-guest-utilities_5.6.0-xxx_i386.deb
dpkg –i Linux/debian-lenny/linux-image2.6*

If you have x64:
dpkg –i Linux/xe-guest-utilities_5.6.0-xxx_amd64.deb
dpkg –i Linux/debian-lenny/linux-image2.6*

3.) Change the name of your HDD from "hda" to "xvda".
(if your HDD is "hdb", change to"xvdb", also for "hdd")
Change it in "/etc/fstab/" and "/boot/grub/menu.lst".
"fstab" is easy, and on "menu.lst" you have to change:
"kernel /boot/vmlinuz-2.6.x root=/dev/hda1 ro quiet"
to:
"kernel /boot/vmlinuz-2.6.x root=/dev/xvda1 ro quiet"
(or "hdb1" to "xvdb1")

4.) Next change "tty1" to "hvc0" in: "/etc/inittab".
"1:2345:respawn:/sbin/getty 38400 tty1"
to:
"1:2345:respawn:/sbin/getty 38400 hvc0"

5.) Now Shutdown VM.

6.) Go to any XenConsole.
Get the UUID of the VM with "xe vm-list".

7.) xe vm-param-set uuid=<uuid> HVM-boot-policy=""
xe vm-param-set uuid=<uuid> PV-bootloader=pygrub
xe vm-param-set uuid=<uuid> PV-args="- - quiet console=hvc0"

8.) Now make the HDD of the VM bootable.
You need the VBD-UUID. Get it with:
"xe vm-disk-list uuid=<uuid>" .

9.) Activate the Blockdevice of the HDD and make it bootable:
"xe vbd-param-set uuid=<vbd-uuid> bootable=true"

10.) After boot, use: "aptitude update; aptitude dist-upgrade" .
After every kernel update, do again Step 3.) change "hda" to"xvda" in "/boot/grub/menu.lst"

Updated for XenServer 5.6 by: Drachenfels GmbH on 01.06.2010

Notes

XenServer Editions

XenServer features by edition

Citrix® XenServer® is the only enterprise-class, cloud-proven virtualization platform that delivers all of the critical features needed for any server and datacenter virtualization implementation—scalability for any size business, support for Windows® and Linux OSs and complex storage needs, centralized multi-server management, live virtual machine migration, and much more. No matter where you choose to begin with XenServer, all editions are compatible and can be upgraded in place via license key, with no additional software installation or downtime required. Purchasing XenServer is simple with pricing appointed on a per server basis.  
 
Feature Free Advanced Enterprise Platinum
Free
virtual infrastructure
XenServer hypervisor Available Available Available Available
XenMotion® live migration Available Available Available Available
VM Disk Snapshot and Revert Available Available Available Available
XenCenter multi-server management Available Available Available Available
Resilient distributed management architecture Available Available Available Available
XenConvert Available Available Available Available
Advanced
management and
automation
High availability   Available Available Available
Memory optimization   Available Available Available
Performance alerting and reporting   Available Available Available
Automated workload balancing     Available Available
Host power management     Available Available
Provisioning services (virtual)     Available Available
Role-based administration     Available Available
Live memory snapshots and reverts     Available Available
Citrix® StorageLink™     Available Available
Lifecycle management       Available
Provisioning services (physical)       Available
Site recovery       Available
  Cost per server
Free
$1,000
$2,500
$5,000
 

Look at the pricing, Excellent value - XenServer 5.6 out Now

Openfiler DRBD + HA

The scenario I will try to illustrate, is 2 Openfiler systems in a linux-ha environment. For simplicity we shall refer to these systems as B1 and B2. B2 is configured to work as a hot standby, constantly checking if B1 is up. If anything happens to B1, B2 comes up, taking over the services of B1. From the outside world, only one system is visible at any point in time. This is done via a virtual ip address that is always assigned to one server. If anything happens to B1, and B2 decides to take over, it sends an ARP broadcast to the switch saying, hey, B1's mac just changes, I am B1. More about this can be read at http://www.linux-ha.org These are the steps I have outlined in my notes to get things going (these are bare instructions, please read the fine manuals) : 1.) Prepare your hardware. My systems have 3 Nics. 1 10/100 for the WAN, 1 Gigabit card for DRBD sync, 1 10/100 for running daily backups of the system files. DRBD is what will replicate your volumes. I used a crossover cable between the two cards, but you can always use a switch. 2.) Install Openfiler on both systems, do not do any LVM setups in Diskdruid, just leave the free space as is, you will come back to it later manually. 2a.) Setup ip networks, naturally separate on each NIC. 2b.) Most of you will have your WAN turned off, but if for any reason you need your WAN NICs on, make sure your iptables rules are set. Once all of your system is setup, and you can communicate on all interfaces, you can go on to setting up DRBD. 3.) DRBD is setup from one conf file, /etc/drbd.conf. Here is an example: ############## resource r0 { protocol C; incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f"; startup { wfc-timeout 10; degr-wfc-timeout 120; } disk { on-io-error detach; } net { timeout 60; connect-int 10; ping-int 10; #max-buffers 2048; max-epoch-size 2048; } syncer { rate 100M; group 1; #al-extents 257; } on B1 { device /dev/drbd0; disk /dev/hda4; address 192.168.30.30:7788; meta-disk internal; } on B2 { device /dev/drbd0; disk /dev/hda4; address 192.168.30.31:7788; meta-disk internal; } } ######################### All of these config options are described in detail in the original install file. Please also pay attention to the version of DRBD you have installed (rpm -qa | grep drbd). Configs have changed since 0.6. Once you have been successfull at configuring both sides, start drbd via /etc/rc.d/init.d/drbd. You can watch the status of your sync via "cat /proc/drbd". That will tell you what is the status of DRBD. Most likely you will be in Secondary/Secondary mode, which means that neither one of B1 or B2 is able to access the share. Remember, only one side can be primary at a time. Drbdadm is the tool to control the state of your DRBD. By issuing the following command : "drbdadm primary r0", you will bring B1 or B2 to primary mode. Once the state is considered primary, you can start accessing it from that server. You should practice setting your share to primary and secondary state on both sides. Issue the following commands: B1: drbdadm secondary r0 B2: drbdadm primary r0 B2: cat /proc/drbd B2: drbdadm secondary r0 B2: cat /proc/drbd B1: cat /proc/drbd B1: drbdadm primary r0 B1 cat /proc/drbd If you have been successful, you should see the state changes from one side to another. Now, lets go on to creating LVM volumes and groups. 4.) Bring both B1 and B2 to state Sec/Sec (DRBD) LVM HOWTO: http://www.tldp.org/HOWTO/LVM-HOWTO/index.html 4a. Bring B1 into primary 4b. pvcreate /dev/drbd0 If you say /dev/hda* you are shooting yourself in the foot. 4c. vgcreate openfiler /dev/drbd0 activate via vgchange -a y openfiler Now, you should be able to visit http://blabla:446 login, click volumes and vuala. You should see your volume. Do not create anything at this time. 4d. Put B1 in secondary. deactivate lvm, vgchange -a n openfiler 4e. Put B2 in primary. 4f. pvcreate /dev/drbd0 4g. vgcreate openfiler /dev/drbd0 activate lvm, vgchange -a y openfiler You should be able to see your volume on B2 now (via the web interface). Now here is what I put into my .bashrc file on both systems: alias prim="drbdadm primary r0 && vgchange -a y openfiler" alias sec="vgchange -a n openfiler && drbdadm secondary r0" alias disp="cat /proc/drbd" This way you can just type "disp" to see the status, and the logic behind failing over is this: When you execute "sec", your volume group deactivates and drbd goes secondary after that to ensure no writing. On the other side, when you issue "prim", the DRBD network drive comes up to primary, then the volume group gets activated. Now, when you create your volume in Openfiler, you will see that you can no longer "go secondary", it will say something like : vgchange -- can't deactivate volume group "openfiler" with 1 open logical volume I have the question into LVM right now, I will update you guys further. Also need to figure our how to setup heartbeat, but I hope the above cleared up some gray areas some of you could have had. I am terrible at writing manuals, so if you want help, come to the IRC chan on FreeNode, #openfiler, I should be able to help!

Notes

How to overcome the 4,095 MB paging file size limit in Windows

To create multiple paging files on one volume to overcome the 4,095-MB limit:
  1. On the drive or volume you want to hold the paging files, create folders for the number of paging files you want to create on the volume. For example, C:\Pagefile1, C:\Pagefile2, and C:\Pagefile3.
  2. Click Start, Click Run, type regedit in the Open box, and then click OK.
  3. In the left pane, locate and click the following registry subkey:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\MemoryManagement
  4. Find the Pagingfiles value, and then double-click it to open it.
  5. Remove any existing values, and add the following values:
    c:\pagefile1\pagefile.sys 3000 4000
    c:\pagefile2\pagefile.sys 3000 4000
    c:\pagefile3\Pagefile.sys 3000 4000
  6. Click OK, and then quit Registry Editor.
  7. Restart the computer to cause the changes to take effect.

Notes

[DRBD-user] Power off caused "Unknown" status.

Your link is very useful, it works now. Thanks. By the way, I changed /etc/drbd.conf like below: (drbd-8.3.0) #after-sb-0pri disconnect; after-sb-0pri "discard-older-primary"; #after-sb-1pri disconnect; after-sb-1pri discard-secondary; I think, for "one node power off" case, "after-sb-1pri discard-secondary; " will cause power off machine as sync target. By this way, it will avoid "unknown" status. I tested three times, it works. Best regards, Edward > Date: Sat, 11 Apr 2009 13:35:23 +0200 > From: r.bhatia at ipax.at > To: guohuai_li at hotmail.com > CC: drbd-user at lists.linbit.com > Subject: Re: [DRBD-user] Power off caused "Unknown" status. > > On 11.04.2009 04:39, guohuai li wrote: > > ue these commands, the logs on machine B are attached. > > > > It shows "Split-Brain detected". > > > > How to avoid this problem ? And how to restore it to proper status ? > > please refer to > http://www.drbd.org/users-guide/s-resolve-split-brain.html > > cheers, > raoul > --

Notes

How to change the default Google Desktop Data index folder

Unfortunately Google Desktop does not offer the ability to change the location of its index files. This is what you have to do if you want another location for the Google Desktop Data folder:

  • 1. Stop Google Desktop (Right-click the tray icon->Exit)
  • 2. Move Google Desktop Data directory to the desired location.
  • 3. Run regedit (go to start -> Run… -> regedit)
  • 4. Locate HKEY_CURRENT_USER\Software\Google\Google Desktop\data_dir
  • 5. Change its value to the location, chosen in step 2
  • 6. Start Google Desktop again

Handy especially when using small SSD's