Forum
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Xen Server upgrade to 7.6 5 years 4 months ago #1690

  • Chaitanya
  • Chaitanya's Avatar Topic Author
  • Offline
  • Posts: 1

How can we upgrade XEN 7.4 to 7.6 with HA Lizard environment

Please Log in or Create an account to join the conversation.

Xen Server upgrade to 7.6 5 years 4 months ago #1692

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
Below are the detailed steps required to perform the upgrade with no VM downtime. The tricky part is that the upgrade procedure will wipe out all of the configuration needed for the management of the storage.

As an FYI - if you can wait a couple of weeks, we will have a new release which will make this process much easier as we will start storing all configuration files in the XAPI DB which will survive a major upgrade like the one you are planning. If you cannot wait, the below steps will work and have been verified on a 7.2 to XCP 7.6 migration.

BEGIN Instructions:

This procedure is only applicable when performaing a major or minor version upgrade which is is ISO driven (i.e 7.0 -> 7.5). Patch updates and yum updates (when applicable) do NOT require this procedure.

#############################################
## BACKUP ALL VMs AND POOL CONFIG
## BEFORE PROCEEDING.
## replace CIFS-SERVER-IP,SHARE-NAME,CIFS-USER-NAME,CIFS-PASSWORD in step 1 with your values!!
#############################################

(1) Assuming backup to a CIFS server (for other backup options try "/etc/ha-lizard/scripts/vm_backup.sh --help"
/etc/ha-lizard/scripts/vm_backup.sh select=all dump_db=true cifs_server='//CIFS-SERVER-IP/SHARE-NAME' cifs_user=CIFS-USER-NAME cifs_password=CIFS-PASSWORD mount_point=/mnt backup_path=/mnt/vm-backup verbose=true print_summary=true

(2) Migrate ALL vms from Master to Slave host

(3) Disable High availability (execute on any 1 of the hosts in the pool)
ha-cfg ha-disable

(4) Move the storage from the Master to the Slave host
iscsi-cfg manual-mode-enable (on both hosts)
iscsi-cfg become-secondary (on master)
iscsi-cfg become-primary (on slave)

(5) Insert XenServer or XCP-NG 7.x installation ISO in Master and reboot, then follow instructions to upgrade.
reboot

(6) After upgrade of Master is complete - Place installation tarballs for latest ha-lizard and iscsi-ha in /tmp - unpack
cd /tmp
tar -zxvf ha-lizard-*.tgz
tar -zxvf iscsi-ha-*.tgz

(7)
Install required repos for drbd and tgt packages
echo '#######################
## Base CentOS7 Repo ##
#######################
[ha-lizard-base]
name=CentOS-$releasever - ha-lizard
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/7/os/$basearch/
enabled=0
gpgcheck=0

#######################
## epel CentOS7 Repo ##
#######################
[ha-lizard-epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=0

#########################
## elrepo CentOS7 Repo ##
#########################
### Name: ELRepo.org Community Enterprise Linux Repository for el7
### URL: elrepo.org/

[ha-lizard-elrepo]
name=ELRepo.org Community Enterprise Linux Repository - el7
baseurl=http://elrepo.org/linux/elrepo/el7/$basearch/
mirrors.coreix.net/elrepo/elrepo/el7/$basearch/
jur-linux.org/download/elrepo/elrepo/el7/$basearch/
repos.lax-noc.com/elrepo/elrepo/el7/$basearch/
mirror.ventraip.net.au/elrepo/elrepo/el7/$basearch/
mirrorlist=http://mirrors.elrepo.org/mirrors-elrepo.el7
enabled=0
gpgcheck=0
protect=0' > /etc/yum.repos.d/ha-lizard.repo


(8) Install DRBD and iscsi target framework
yum install drbd84-utils --enablerepo=ha-lizard-elrepo -y
yum install drbd84-utils-sysvinit --enablerepo=ha-lizard-elrepo -y
chkconfig drbd off
yum install scsi-target-utils --enablerepo=ha-lizard-epel,ha-lizard-base -y
systemctl disable tgtd

(9) Install required packages
/tmp/ha-lizard-*/scripts/install --nostart
/tmp/iscsi-ha-*/scripts/install --nostart

(10) Copy config files from peer to upgraded host (below example assumes copying from slave to master)
scp /etc/lvm/lvm.conf root@<upgraded_host_ip>:/etc/lvm/
scp /etc/lvm/master/lvm.conf root@<upgraded_host_ip>:/etc/lvm/master/
scp /etc/drbd.conf root@<upgraded_host_ip>:/etc/
scp /etc/tgt/targets.conf root@<upgraded_host_ip>:/etc/tgt/
scp /etc/iscsi-ha/iscsi-ha.conf root@<upgraded_host_ip>:/etc/iscsi-ha/

(11) Update firewall to allow replication
FW_CHAIN_NAME='RH-Firewall-1-INPUT'
FW_RULE_POSITION=`iptables -L ${FW_CHAIN_NAME} --line-numbers | grep 'reject-with' | awk '{print $1}'`
REPLICATION_SUBNET='10.10.10.0/24' ## important - modif the subnet if you have configured something other than the default replication subnet
iptables -I RH-Firewall-1-INPUT $FW_RULE_POSITION -s $REPLICATION_SUBNET -j ACCEPT
service iptables restart

(12) re-establigh replication on upgraded host
service drbd start
rm –f /etc/lvm/cache/.cache && vgscan

(13) force host into manual mode before starting iscsi-ha
> /etc/iscsi-ha/state/manual

(14) Start iscsi-ha - check status - should be in manual mode and secondary
service iscsi-ha-watchdog start
iscsi-cfg status

(15) Start ha-lizard - check configuration. All original settings should be restored
service ha-lizard-watchdog start
ha-cfg get

(16) Expose storage on the Master
iscsi-cfg become-secondary (on slave)
iscsi-cfg become-primary (on master)

(17) MIgrate ALL VMs to the MASTER and then repeat steps 5-15 on the slave

(18) Re-enable HA
ha-cfg ha-enable

(15) Exit manual mode to restore dynamic storage control
iscsi-cfg manual-mode-disable (on both hosts)

Please Log in or Create an account to join the conversation.

Xen Server upgrade to 7.6 5 years 4 months ago #1693

Good timing. After my near disasters over the weekend I'm looking to upgrade my servers, although they're still on 7.0. Should your new process work on those as well?

Please Log in or Create an account to join the conversation.

Xen Server upgrade to 7.6 5 years 4 months ago #1694

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
Yes. New features will work on 7.0. So, if you upgrade to the next ha-lizard/iscsi-ha before your upgrade, it will be easier.

Please Log in or Create an account to join the conversation.

Xen Server upgrade to 7.6 5 years 4 months ago #1695

So the process for me should be to update your software first after you release the latest, then upgrade Xen (which I want to move to xcp-ng)? Is there an upgrade script or documented process for ha-lizard/iscsi-ha?

Please Log in or Create an account to join the conversation.

Xen Server upgrade to 7.6 5 years 4 months ago #1696

  • Salvatore Costantino
  • Salvatore Costantino's Avatar
  • Offline
  • Posts: 722
Correct. Once on the latest version, you'll be able I to easily backup/restore all storage related settings so that you won't have to deal with drbd, lvm, tgt and iptables configurations

Please Log in or Create an account to join the conversation.

  • Page:
  • 1