/crossbeam/bin/xos-copy-dist and RAID-1 considerations

book

Article ID: 168034

calendar_today

Updated On:

Products

XOS

Issue/Introduction

When XOS is configured as RAID-1 (CPM8600+), the copy disk distribution process will only work when both disks are present.Performing copy disk distribution on a CPM with RAID configured and one disk present results in the following error message:

ERROR: Failed to create swap space for /dev/md10 For detail steps and outputs, see attached file broken raid.log

Cause

Copy disk distribution is a well-known functionality and useful for safe upgrade situations. However, if XOS is configured as RAID-1 (CPM8600+), the copy process will only work when both disks are present. This seems to be obvious, but because more than one partition can be created even when only one disk is inserted, you may try to copy from one partition to another on the same disk. This will not work.

The restriction is created by the swap partition and the way we configure it on RAID-1.

NOTE: You need enter single user mode from the grub menu, or by changing the kernel boot line inside /boot/grub/grub.conf and then rebooting the CPM. If you run "init 1" directly from CPM, the command /crossbeam/bin/xos-copy-dist will fail.

Performing copy disk distribution on a CPM with RAID configured and one disk present:

1 - View available distributions

sh-2.05a# /crossbeam/bin/xos-toggle-boot -l
modprobe:
modprobe: Can't locate module vfat
modprobe:
modprobe: Can't locate module freevfat
System is running on Distribution 1 (Release 8.1.0)
Default kernel for next boot is Distribution 1 1:
Linux (2.4.21-47.ELuni) (Distribution 1 - 8.1.0)
Available kernels: 0:
Linux (2.4.21-47.EL) (Distribution 1 - 8.1.0) 1:
Linux (2.4.21-47.ELuni) (Distribution 1 - 8.1.0) 2:
Linux (2.4.21-47.ELuni) (Distribution 1 - 8.1.0)


2 - Copy distribution
 

sh-2.05a# /crossbeam/bin/xos-copy-dist -d 2
Preparing file systems for the destination distribution
ERROR: Failed to create swap space for /dev/md10


For detail steps and outputs, see attached file "broken raid.log".

The failure happens because the Linux kernel can use the swap partition on disk A and disk B (not at the same time). If a software issue/crash happened on swap partition of disk A, the kernel will failover to the swap partition on disk B. This is not possible with "normal" partitions and RAID-1, as they only failover in the case of a physical problem.

Resolution

To copy a distribution in a RAID-1 environment, both disks should be available and synchronized. If it is necessary to change the second disk due to an RMA, use /crossbeam/bin/xos-raid-add to sync both disks.

Performing copy disk distribution on a CPM with RAID configured and 2 disks present and RAID synchronized:

1 - View available distributions

sh-2.05a# /crossbeam/bin/xos-toggle-boot -l
System is running on Distribution 1 (Release 8.1.4)
Default kernel for next boot is Distribution 1 1:
Linux (2.4.21-47.ELuni) (Distribution 1 - 8.1.4) Available kernels: 0:
Linux (2.4.21-47.EL) (Distribution 1 - 8.1.4)
1: Linux (2.4.21-47.ELuni) (Distribution 1 - 8.1.4)
2: Linux (2.4.21-47.ELuni) (Distribution 1 - 8.1.4)
3: Linux (2.4.21-47.EL) (Distribution 2 - 8.1.1)
4: Linux (2.4.21-47.ELuni) (Distribution 2 - 8.1.1)
5: Linux (2.4.21-47.ELuni) (Distribution 2 - 8.1.1)


2 - Copy distribution

sh-2.05a# /crossbeam/bin/xos-copy-dist -d 2
Copying distribution. Please be patient... ...
Done


The CPM boots from second distribution. For detail steps and outputs, see attached file raid.log

Workaround

 N/A