How to Recover XenServer Physical Volume Structure after Accidental Deletion

This article describes how to recreate a Physical Volume (PV) and restore Logical Volume Manager (LVM) structure in a situation where Shared or Local storage metadata has been damaged or overwritten.

Warning! Perform the instructions at your own risk. It is recommended to raise a case with Citrix Technical Support to confirm the cause of the issue and then perform necessary steps. Do not attempt commands in this article unless you are confident in understanding of the issue and suggested steps.

If a PV information has been accidentally deleted or tempered with, LVM commands such as “lvscan”, “vgscan”, and “pvscan” return incorrect or empty output.

Note: The commands lvscan, vgscan, and pvscan also return empty output if storage is disconnected or XenServer has problems with communicating to the storage device. Ensure that storage is attached and can be accessed from XenServer, by testing reading with hdparm –t /dev/sd<x> or hdparm –t /dev/mapper/<scsi id> for multipathed SRs, before proceeding with the following instructions. Correct output returns the PV associated with block device and corresponding Volume Groups.

For instance, correct output of pvscan command for shared SR (iSCSI or HBA) with multipath enabled would be in the following format.

PV /dev/mapper/<scsi id> VG VG_XenStorage-<SR uuid> lvm2 [<size total/size free>]

Note how the block device appears under /dev/mapper. If multipath is not enabled, PV value would point to a single block device /dev/sd<x>, like in case of the local storage. For example:

PV /dev/sda3 VG XSLocalEXT-fdf91589-39f4-4104-9856-3cb6c606255 lvm2 [457.75 GB / 0 free]

If only /dev/sd<x> device is displayed, you can confirm scsi id of that device by inspecting output of command.

ls –alh /dev/disk/by-id/


For example, if there is an iSCSI device with scsi id of “23237636464633731” and uuid “e79f14b6-055e-a166-42ce-bf535db5f285”, as seen in general tab of the SR in XenCenter, then the pvscan output for this SR is as follows.

PV /dev/mapper/23237636464633731 VG VG_XenStorage-e79f14b6-055e-a166-42ce-bf535db5f285 lvm2 [1.22 TB / 116.00 GB free]

However, when LVM has been tempered with, pvscan command may provide no output for that SR, or another Volume Group (VG_XenStorage-<different uuid>) name will be assigned to the PV on the expected scsi device.

Background

This problem can occur in following or similar cases:
  1. Storage has been accidentally mapped to another XenServer pool and/or PV and VG metadata has been removed or overwritten with new PV and VG information.
  2. LVM metadata has been removed with incorrect pv/vg commands executed on the host.

  3. Storage failure that caused corruption on the LUN affecting LVM metadata.

Related:

SEP not login

I need a solution

I have a problem with the Symantec Enpoint Protection product.
The Symantec Endpoint Protection that we have runs within a VM, while for the datastore from symantec our protection endpoint is a different VM.

to connect Symantec Endpoint protection with the datastore we use the ISCSI initiator but the ISCSI Initiator cannot connect between Symantec Endpoint Protection and the datastore, so we have difficulty logging into our SEP console.

Please provide a solution to the problems we are facing, we have great hopes for the support you provide

Regards,

Ibn Rizal

0

Related:

Re: HOW TO CONNECT HOST DIRECTLY TO THE VNX5400 without SAN switch

For direct attach, it’s the same as for a switch, except you can only connect as many paths as you have HBA’s (fiber channel or iSCSI). If your host has one HBA, you can only connect one cable to the array. So you should have at least two HBA’s so you can connection one HBA to SPA and the other HBA to SPB to have failover protection.

Go to this link and select VNX Series, then in the VNX Server Tasks, select Attach a Server and follow the wizard.,

https://mydocuments.emc.com/

glen

Related:

Re: Unable to get I/O Ethernet modules working in VNX5300

So I have reimaged and updated my VNX5300 (out of support) to latest FLARE 32.000.5.249, and it still doesn’t seem to support any of the many Ethernet modules I insert, so I can run iSCSI and sancopy over ethernet.

I have this problem with all of my lab arrays it seems, regardless of software version. Surely these cards are supported by the latest software, what am I doing wrong here?

Card p/ns

303-195-100c-01 (dual SFP 10g modules)

and 303-121-100a (4xgig Ethernet) – I have tried 6 of these modules, same thing.



I put in a 4x8gbFC module and it said Present – so the card slots seems to be fine… 4GB FC said Not Supported.



I’m hoping there’s just some enabler or something I am missing, pls help if you’ve seen this before.



emc_ethernet_nogo.PNG.png

Related:

Re: gatekeeper migration and discover

this is being done on an aix host



I am migrating 7 luns from an existing emc san array to another emc san array…and need to remove the old luns

6 luns are gatekeepers and 1 lun is data — 40 G

I ran config manager on the host and the new luns are showing up from the new array….

I will perform a migratepv to move the data from old 40 Gig disk to the new 40G disk

at this point I will remove disk from vg and rmdev the disk from the aix odm

question is

how to remove the other 6 old 3 meg gatekeep devices?

do I need to move the data from the old pv to the new pv via migratepv

or do I just remove the old gk devices by rmdeving them and them unzoning them?

also, there was a mention of a discovery that is recommended to be done…

how do I do a discovery?

do I run discover after I rmdev all the luns?

Related:

gatekeeper migration and discover

this is being done on an aix host



I am migrating 7 luns from an existing emc san array to another emc san array…and need to remove the old luns

6 luns are gatekeepers and 1 lun is data — 40 G

I ran config manager on the host and the new luns are showing up from the new array….

I will perform a migratepv to move the data from old 40 Gig disk to the new 40G disk

at this point I will remove disk from vg and rmdev the disk from the aix odm

question is

how to remove the other 6 old 3 meg gatekeep devices?

do I need to move the data from the old pv to the new pv via migratepv

or do I just remove the old gk devices by rmdeving them and them unzoning them?

also, there was a mention of a discovery that is recommended to be done…

how do I do a discovery?

do I run discover after I rmdev all the luns?

Related:

Re: Very Slow Unity VSA 4.4

Hey there,

Iam trying out the unity community edition in an lab environment with two Dell R810 Hosts with a RAID5 of SSDs.

I was reading the manual, checked out the HowTo videos and it was real easy to get it up and running.

But the performance is soooooo poor, oh man.

The Unity is installed on the servers SSDs and I mapped two 500GB virtual dirves into the unity for a Pool.

I present a NFS and also a iSCSI datastore to the ESXi host where is unity is installed too.

The result is performance of about ~25MB/s if I copy a vmdk-file to the unitys datastore.

The CPU usage is meanwhile about 50-80% and if I start another copy job it peaks at 100%.

Can anybody help me? We’ll like to use the Unitys in production environments, but with this result…..never.

I only post because I like the workflow of this storage system and wnat to give it a chance.

Any idea is welcome

Related:

Dell EMC Unity: SANCopy Pull prefers iSCSI over FC if both protocols are configured (User Correctable)

Article Number: 525420 Article Version: 2 Article Type: Break Fix



Dell EMC Unity 300,Dell EMC Unity 300F,Dell EMC Unity 350F,Dell EMC Unity 400,Dell EMC Unity 400F,Dell EMC Unity 450F,Dell EMC Unity 500,Dell EMC Unity 500F,Dell EMC Unity 550F,Dell EMC Unity 600,Dell EMC Unity 600F,Dell EMC Unity 650F

For SANCopy Pull for third-party migrations, if both FC and iSCSI connectivity are configured, iSCSI will be used by default for third-party LUN migrations with no option to switch to FC.

This is Functioning as Designed (FAD).

To use FC for third-party migrations, delete the iSCSI path and connection using the following commands:

/remote/iscsi/connection/path and/remote/iscsi/connection

UnitySANCopySession:

Descriptor Id: 733

Session Name: sv_517-targetLUN934958-20171123T160628

Session Type: Pull

Session Status: Success

Is Incremental: no

Default Owner: B

Current Owner: B

Originator: Admin

Source LUN WWN: 60:06:01:60:0D:60:3C:00:C5:E1:16:5A:00:4D:16:65

User Connection Type: FC first <======================= User preference

Actual Connection Type: iSCSI <======================= Actual connection


Source LUN Location: Frontend

Source Start Block Address: 0

User Size to Copy: 0

Driver Size to Copy: 20971520

Auto-Restart: 1

Auto-Transfer: 0

Initial Throttle: 7

Current Throttle: 7

User Bandwith: 4294967295

User Latency: 4294967295

Session ID: 131559268119562900

Blocks Copied: 20971520

Percentage Copied: 100%

Session Bandwith: 32735

Session Latency: 0

Start Time: 2017-Nov-23 16:06:54

Completion Time: 2017-Nov-23 16:07:30

Source Failure Status: No failure

Buffer Size: 1024

Buffer Count: 4

I/O Transfer Count: 20479

Number of Destinations: 1


Below is the cli guide of the command:

06:25:40 service@(none) spa:~> uemcli /remote/iscsi/connection/path –help

Storage system address: 127.0.0.1

Storage system port: 443

HTTPS connection

Manage and monitor iSCSI connection path. An iSCSI connection can have one or more iSCSI paths configured

Actions:

[Show]

/remote/iscsi/connection/path { -connection <value> | -connectionName <value> } show [ -output { nvp | csv | table [ -wrap ] } ] [ { -brief | -detail | -filter <value> } ]

[Create]

/remote/iscsi/connection/path create [ -async ] { -connection <value> | -connectionName <value> } [ -descr <value> ] -addr <value> [ -port <value> ] -if <value>

[Delete]

/remote/iscsi/connection/path { -connection <value> | -connectionName <value> } -index <value> delete [ -async ]

Related:

Re: Hyper-V Cluster 2012 R2 (12 Node ) , Unity 550F( with offloading ISCSI ) -> Disk Role Change over 70 Seconds !

Hi,

we have opend a Ticket already with EMC , but as we cant use our shiny new Unity at all at the Moment . I would like to adress the Problem to the Community as well.

Ist Situation , we have a VNX connected to a Hyper-V 2012 Cluster via ISCSI ( 10GB ) … MS DSM was used not PowerPath . The Combination workst since 4 Years … no Drops not Problems … rock solid !!ur

Now we got our new Unity the first Thing we noticed that the Lun 0 is now not a Disk -1 as on our 2 VNX .

We configured the ISCSI Part exactly ! like we did with the VNX , everthing looks alike .

BUT if you switch the Hyper-V Disk Role to another Node in the Cluster the DiskRole Process will take Seconds until the ROLE is GREEN again in the FailOverCluster Managment Console and even then there is now IO Traffic until around 80! Seconds later. “

So the VM “Stops” for 80 Seconds ( like it is freezed ! ) . The Storage is for that Reason at the Moment not usable because we have such an Impact in the Production that it is irresponsible to use the “expensive” Unity for that Matter.

The Same Disk Role Change on a Disk Role with a VNX 5600 then the Traffic will “break in” for a fraction of a second and then it “goes” on … like a breeze.

Anyone has such an Experience also in Regard to an UNITY 550F, 300 ( firmware 4.4 ) . The two Unitys are connected via Each other in an active/active Failover Senario ( for that Reason then need direct FC Connection ). We have a Speciality on the UNITY 550F as they have the ISCSI ( Ethernet Interfaces with Offloading ) . Maybe there are also Question in Regard to PowerPath and the “ISCSI with Offloading” , which could fit the Problem Description.

Maybe someon has a Glue where to start the Search or has maybe heard form EMC ( I read about PowerPath Error Description which sounded alike )

Regards and Thanks

Related:

Dell EMC Unity: How To change ethernet port settings (User Correctable)[1]

Article Number: 502880 Article Version: 5 Article Type: How To



Unity Family

Ethernet port settings can changed in Unisphere and via uemcli.

In Unisphere:

1. Select the Settings icon, and then select Access > Ethernet.

2. To change Ethernet port speed and MTU, select the relevant Ethernet port, and then select the Edit icon.

MTU has a default value. If you change the value, you must also change all components of the network path (switch ports and host). If you want to support jumbo frames, set the MTU size to 9000 bytes.

view and edit ethernet port settings

Ethernet port properties

This is also described in the Unisphere help.

via uemcli:

1. list all ethernet ports:

The -detail will show all attributes, so we can see, what speeds and MTU sizes are available for a particular port.

C:>uemcli -d 10.10.10.11 -u admin -p mikemyers /net/port/eth show -detail

Storage system address: 10.10.10.11

Storage system port: 443

HTTPS connection

1: ID = spa_mgmt

Name = SP A Management Port

SP = spa

Protocols = mgmt

MTU size = 1500

Requested MTU size = 0

Available MTU sizes = 1500

Speed = 10 Gbps

Requested speed = auto

Available speeds = auto

Health state = OK (5)

Health details = “The port is operating normally.”

Connector type = RJ45

MAC address = xx:xx:xx:xx:xx:xx

SFP supported speeds =

SFP supported protocols =

2: ID = spa_eth2

Name = SP A Ethernet Port 2

SP = spa

Protocols = file, net, iscsi

MTU size = 1500

Requested MTU size = 0

Available MTU sizes = 1500, 9000

Speed = 10 Gbps

Requested speed = auto

Available speeds = auto

Health state = OK (5)

Health details = “The port is operating normally.”

Connector type = RJ45

MAC address = xx:xx:xx:xx:xx:xx

SFP supported speeds =

SFP supported protocols =

3: ID = spa_eth3

Name = SP A Ethernet Port 3

SP = spa

Protocols = file, net, iscsi

MTU size = 1500

Requested MTU size = 0

Available MTU sizes = 1500, 9000

Speed = 10 Gbps

Requested speed = auto

Available speeds = auto

Health state = OK (5)

Health details = “The port is operating normally.”

Connector type = RJ45

MAC address = xx:xx:xx:xx:xx:xx

SFP supported speeds =

SFP supported protocols =

4: ID = spa_eth1

Name = SP A Ethernet Port 1

SP = spa

Protocols = file, net, iscsi

MTU size = 1500

Requested MTU size = 0

Available MTU sizes = 1500, 9000

Speed = 10 Gbps

Requested speed = auto

Available speeds = auto

Health state = OK (5)

Health details = “The port is operating normally.”

Connector type = RJ45

MAC address = xx:xx:xx:xx:xx:xx

SFP supported speeds =

SFP supported protocols =

5: ID = spa_eth0

Name = SP A Ethernet Port 0

SP = spa

Protocols = file, net, iscsi

MTU size = 1500

Requested MTU size = 0

Available MTU sizes = 1500, 9000

Speed = 10 Gbps

Requested speed = auto

Available speeds = auto

Health state = OK (5)

Health details = “The port is operating normally.”

Connector type = RJ45

MAC address = xx:xx:xx:xx:xx:xx

SFP supported speeds =

SFP supported protocols =

2. modify ethernet port settings:

set port to auto:

C:>uemcli -d 10.10.10.11 -u admin -p mikemyers /net/port/eth -id spa_eth0 set -speed auto

Storage system address: 10.10.10.11

Storage system port: 443

HTTPS connection

ID = spa_eth0

Operation completed successfully.

Valid speed qualifiers are: Kbps, Mbps, Gbps ( case-sensitive)

Example:

-speed 1Gbps would set the port to 1GBit/sec.

set port to MTU 9000:

C:>uemcli -d 10.10.10.11 -u admin -p mikemyers /net/port/eth -id spa_eth0 set -mtuSize 9000

Storage system address: 10.10.10.11

Storage system port: 443

HTTPS connection

ID = spa_eth0

Operation completed successfully.

Please note:

– Only speed and MTU can be set.

– Only data Ethernet Port can be configured, Sync Replication Management Ports cannot be modified.

If you try, you will get this error message:

Operation failed. Error code: 0x6000935

Only data Ethernet Port can be configured. (Error Code:0x6000935)

Related: