Link to home
Create AccountLog in
Avatar of sdragoninc
sdragoninc

asked on

Help with Repairing an Unplugged local SR RAID5 on XenServer 6 after Successful RAID Rebuild With Changed RAID UUID

Environment:

XenServer 6 with two RAIDs:

/dev/md0 is a RAID5 with 3 (1TB) drives
     /dev/sda     /dev/sdb     /dev/sde

/dev/md1 is a RAID1 with 2 (1.5TB) drives
     /dev/sdc     /dev/sdd

For whatever reason, I never could get the RAIDs to auto show after reboots.  I ended up having to issue the following commands after each reboot of the XenServer to bring the RAIDs online.

 mdadm --create --assume-clean /dev/md0 --level=5 --raid-devices=3 /dev/sda /dev/sdb /dev/sde

 mdadm --create --assume-clean /dev/md1 --level=mirror --raid-devices=2 /dev/sdc /dev/sdd

----------------------------------------------------------------------------------

Situation:

One of the drives from the RAID5 failed (/dev/sda).
The drive was replaced with a fresh one and the RAID5 was rebuilt.

mdadm --create /dev/md0 --level=5 --raid-devices=3 missing /dev/sdb /dev/sde

and then

mdadm --add /dev/md0 /dev/sda


----------------------------------------------------------------------------------
Here is my current cat /proc/mdstat

[root@xen2 ~]# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid1 sdd[1] sdc[0]
      1465138496 blocks [2/2] [UU]
     
md0 : active raid5 sde[2] sdb[1] sda[0]
      1953524992 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
     
unused devices: <none>


-----------------------------------------------------------------------------------

In XenCenter, my local SR of both RAIDs show as unplugged after a reboot.

I usually just right click on it a select repair and it plugs the SR and everything is good.

The RAID1 still does this fine.

The RAID5 no will not repair and throw the following error:

Internal error: Failure("Storage_access failed with: SR_BACKEND_FAILURE_52: [Logical Volume mount/activate error [opterr=Unable to activate LV. Errno is 5]; ]")

I have noted that in the host OS itself, the UUID of the RAID5 changed after the rebuild.  I have a feeling that is the root cause of not being able to 'repair' the RAID5 with XenCenter.

The has to be a way to re-plug the SR (without loosing the data - the backup is of course not working) even after a changed UUID.

HELP!!!
Avatar of sdragoninc
sdragoninc

ASKER

For more information, my current pvscan and lvscan is shown below.  The pvscan is of course not showing the RAID5 and the lvscan is not showing the 1.8 TB volume containing the data.


[root@xen2 ~]# pvscan
  PV /dev/sdf3   VG VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067   lvm2 [923.50 GB / 378.45 GB free]
  PV /dev/md1    VG XSLocalEXT-f849955f-b2cc-1f70-3cf5-3a6e900ba7ba      lvm2 [1.36 TB / 0    free]
  Total: 2 [2.27 TB] / in use: 2 [2.27 TB] / in no VG: 0 [0   ]
[root@xen2 ~]#
 
 
[root@xen2 ~]# lvscan
  ACTIVE            '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/MGT' [4.00 MB] inherit
  ACTIVE            '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-03dfe99a-cee8-4b10-bc64-b757a69a7b5b' [90.20 GB] inherit
  ACTIVE            '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-c55ae04b-eadd-43dc-98f8-0974bd49d6d3' [230.46 GB] inherit
  inactive          '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-fc0e221e-860a-4a4e-a428-2b379dee001c' [8.00 MB] inherit
  inactive          '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/ISO' [20.00 GB] inherit
  inactive          '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-2aa25b74-05f2-4040-9893-4c88168b21f3' [16.00 MB] inherit
  inactive          '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-53e2a330-bc39-426b-a92e-d4091665100c' [40.09 GB] inherit
  inactive          '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-2696de96-d656-4c50-965c-5075c6098908' [44.04 GB] inherit
  inactive          '/dev/VG_XenStorage-6f16b830-534a-7fbf-aa7f-810a99a2f067/VHD-90852281-3174-4418-806e-9dabd9b58aec' [120.24 GB] inherit
  ACTIVE            '/dev/XSLocalEXT-f849955f-b2cc-1f70-3cf5-3a6e900ba7ba/f849955f-b2cc-1f70-3cf5-3a6e900ba7ba' [1.36 TB] inherit
[root@xen2 ~]#
No one ... ???
Hi  sdragoninc, I will do my best to try and help you her.. :-)

1) What make and model server are you running XenServer on.
2) What type of RAID card are you using?
3) What build of XenServer 6 are you running?
1) In House build using Intel Core2 Quad Q9600
2) Using software RAID (see my detailed notes above).
3) 6.0.2
ASKER CERTIFIED SOLUTION
Avatar of compdigit44
compdigit44

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer