Disk Enclosures
1747984 Members
4694 Online
108756 Solutions
New Discussion юеВ

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

 
SOLVED
Go to solution
Rath Kum
Frequent Advisor

How to mount a EVA Snapshot/MirrorClone on RHEL5.3

Hello

I am testing Snapshot/MirrorClone on EVA80K/RHEL5.3

1.I created a Vdisk and presented to host A
2.ran (pvcreate /dev/dm-7),(vgcreate VGSource1 /dev/dm-7),(lvcreate VGSource1 -L 4G /dev/dm-7), (mkfs /dev/VGSource1/lvol0),fstab entry(/dev/VGSource1/lvol0 /mnt/Vdisk1 ext2 ..),created a directory /mnt/Vdisk1,mounted the Vdisk (ex./mnt/Vdisk1),Copied some data (cp /var/log/messages .)
3.Next took the Snapshot of the Vdisk say Snap1 and Presented to second host B
4.Scanned and disk showsup
5.ran pvscan
PV /dev/mpath/mpath19 VG VGSource1 lvm2 [4.00 GB / 1020.00 MB free]

Can anyone please explain me what are the Next Steps to mount the Snapshot to see the data

Your help will be greatly appreciated

Thanks
15 REPLIES 15
Bill Costigan
Honored Contributor
Solution

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

the pvscan should show you a list of EXPORTED VGs, the volumegroup name and disks that make up the volume group.

using that info do a vgimport and a vgchange. You can then create and mount point and mount the lvol.

See below.

root@myhost lbin]# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE PV "/dev/sda1" of VG "VolGroup00" [99.94 GB / 0 free]
pvscan -- ACTIVE PV "/dev/sdb1" of VG "VolGroup00" [99.94 GB / 0 free]
pvscan -- ACTIVE PV "/dev/sdc1" of VG "VolGroup00" [99.94 GB / 832 MB free]
pvscan -- inactive PV "/dev/sdd1" is in EXPORTED VG "VolGroup01" [99.94 GB / 0 free]
pvscan -- inactive PV "/dev/sde1" is in EXPORTED VG "VolGroup01" [99.94 GB / 0 free]
pvscan -- inactive PV "/dev/sdf1" is in EXPORTED VG "VolGroup01" [99.94 GB / 832 MB free]
pvscan -- total: 6 [599.99 GB] / in use: 6 [599.99 GB] / in no VG: 0 [0]

[root@myhost lbin]# vgimport -f VolGroup01 /dev/sd[d-f]1
vgimport -- doing automatic backup of volume group "VolGroup01"
vgimport -- volume group "VolGroup01" successfully imported and activated

[root@myhost lbin]# mkdir /u01
[root@myhost lbin]# mount /dev/VolGroup01/LogVol00 /u01
[root@myhost lbin]# ll /u01
Rath Kum
Frequent Advisor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

Hi Bill

Thanks for your valuable response.I will try that..
Rath Kum
Frequent Advisor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

Bill

I am not getting any EXPORT VG display and below is the o/p of pvscan !

[root@qmpllsyb1001 ~]# pvscan
PV /dev/mpath/mpath19 VG VGSource1 lvm2 [4.00 GB / 1020.00 MB free]
PV /dev/mpath/3600508b4000cfd74000070000e520000
VG vgmirror lvm2 [5.00 GB / 1020.00 MB free]
PV /dev/cciss/c0d0p2 VG rootvg lvm2 [136.50 GB / 105.50 GB free]
Total: 3 [145.49 GB] / in use: 3 [145.49 GB] / in no VG: 0 [0 ]
Bill Costigan
Honored Contributor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

You must be using a different version, pvscan has some options to display other info. Try 'pvscan -v'

Assuming the VGSource1 is the VG you want you could try.

'vgimport VGSource1'

It's not clear from the pvscan what its state is.

perhaps 'vgdisplay VGsource1' would give you an idea of its state.

a 'vgchange -a y VGsource1' would activate the VG if it was already imported but not active.
Rath Kum
Frequent Advisor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

Hi Bill

This is the output i got :

[root@qmpllsyb1001 ~]# lvscan
ACTIVE '/dev/VGSource1/lvol0' [3.00 GB] inherit
ACTIVE '/dev/vgmirror/lvol0' [4.00 GB] inherit
ACTIVE '/dev/rootvg/root' [2.00 GB] inherit
ACTIVE '/dev/rootvg/opt' [2.00 GB] inherit
ACTIVE '/dev/rootvg/home' [6.00 GB] inherit
ACTIVE '/dev/rootvg/tmp' [3.00 GB] inherit
ACTIVE '/dev/rootvg/usr' [5.00 GB] inherit
ACTIVE '/dev/rootvg/var' [5.00 GB] inherit
ACTIVE '/dev/rootvg/swap' [8.00 GB] inherit
[root@qmpllsyb1001 ~]#
[root@qmpllsyb1001 ~]# vgchange -a y VGSource1
1 logical volume(s) in volume group "VGSource1" now active

[root@qmpllsyb1001 ~]# vgdisplay VGSource1
--- Volume group ---
VG Name VGSource1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 4.00 GB
PE Size 4.00 MB
Total PE 1023
Alloc PE / Size 768 / 3.00 GB
Free PE / Size 255 / 1020.00 MB
VG UUID N9NaBs-1Qts-tMWA-zmB5-1BKI-lotE-Usqz0s

[root@qmpllsyb1001 ~]# vgimport VGSource1
Volume group "VGSource1" is not exported

Rath Kum
Frequent Advisor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

[root@qmpllsyb1001 ~]# pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/mpath/mpath19 VG VD lvm2 [4.00 GB / 1020.00 MB free]
PV /dev/mpath/3600508b4000cfd74000070000e520000 VG vgmirror lvm2 [5.00 GB / 1020.00 MB free]
PV /dev/cciss/c0d0p2 VG rootvg lvm2 [136.50 GB / 105.50 GB free]
Total: 3 [145.49 GB] / in use: 3 [145.49 GB] / in no VG: 0 [0 ]
Rath Kum
Frequent Advisor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

[root@qmpllsyb1001 ~]# pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/mpath/mpath19 VG VGSource1 lvm2 [4.00 GB / 1020.00 MB free]
PV /dev/mpath/3600508b4000cfd74000070000e520000 VG vgmirror lvm2 [5.00 GB / 1020.00 MB free]
PV /dev/cciss/c0d0p2 VG rootvg lvm2 [136.50 GB / 105.50 GB free]
Total: 3 [145.49 GB] / in use: 3 [145.49 GB] / in no VG: 0 [0 ]
Bill Costigan
Honored Contributor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

It looks like VGSource1 is already imported and active.

Did you try mounting its lvol to the mount point?

I didn't see the lvol name but it should be the same as on the original server.

vgdisplay -v VGSource1 should show the lvol name if you don't know it.
Rath Kum
Frequent Advisor

Re: How to mount a EVA Snapshot/MirrorClone on RHEL5.3

Bill

Yes I mounted on /mnt/SS2 but i dont see snapshot data in it ,it is empty

[root@qmpllsyb1001 ~]# vgdisplay -v VGSource1
Using volume group(s) on command line
Finding volume group "VGSource1"
--- Volume group ---
VG Name VGSource1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 4.00 GB
PE Size 4.00 MB
Total PE 1023
Alloc PE / Size 768 / 3.00 GB
Free PE / Size 255 / 1020.00 MB
VG UUID N9NaBs-1Qts-tMWA-zmB5-1BKI-lotE-Usqz0s

--- Logical volume ---
LV Name /dev/VGSource1/lvol0
VG Name VGSource1
LV UUID 2WOCzw-Vsc1-ECfl-s56Q-0aFY-c8SO-AkjBfW
LV Write Access read/write
LV Status available
# open 1
LV Size 3.00 GB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:10

--- Physical volumes ---
PV Name /dev/mpath/mpath19
PV UUID C0x6iE-Xfd9-pVDY-eIN2-vR58-CSR5-7dAEQI
PV Status allocatable
Total PE / Free PE 1023 / 255

[root@qmpllsyb1001 ~]# cat /etc/fstab
/dev/rootvg/root / ext3 defaults 1 1
/dev/rootvg/opt /opt ext3 defaults 1 2
/dev/rootvg/home /home ext3 defaults 1 2
/dev/rootvg/tmp /tmp ext3 defaults 1 2
/dev/rootvg/usr /usr ext3 defaults 1 2
/dev/rootvg/var /var ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/rootvg/swap swap swap defaults 0 0
/dev/vgsource/lvsource /mnt ext3 defaults 0 0
/dev/chwtest1/chwtest1 /chwtest1 ext3 noauto 0 0
/dev/chwtest2/chwtest2 /chwtest2 ext3 noauto 0 0
/dev/chwtest2/chwtest2a /chwtest2a ext3 noauto 0 0
/dev/vgmirror/lvol0 /mnt/mirror1 ext2 defaults 0 0
/dev/VGSource1/lvol0 /mnt/SS2 ext2 defaults 0 0


[root@qmpllsyb1001 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-root
2.0G 314M 1.6G 17% /
/dev/mapper/rootvg-opt
2.0G 435M 1.5G 24% /opt
/dev/mapper/rootvg-home
5.9G 141M 5.4G 3% /home
/dev/mapper/rootvg-tmp
3.0G 99M 2.7G 4% /tmp
/dev/mapper/rootvg-usr
4.9G 1.2G 3.5G 25% /usr
/dev/mapper/rootvg-var
4.9G 241M 4.4G 6% /var
/dev/cciss/c0d0p1 193M 17M 167M 9% /boot
tmpfs 4.9G 0 4.9G 0% /dev/shm
/dev/mapper/VGSource1-lvol0 3.0G 4.5M 2.8G 1% /mnt/SS2
[root@qmpllsyb1001 ~]# cd /mnt/SS2
[root@qmpllsyb1001 SS2]# ls
[root@qmpllsyb1001 SS2]#