1833032 Members
2380 Online
110049 Solutions
New Discussion

A twister

 
SOLVED
Go to solution
Michael Elleby III_1
Trusted Contributor

A twister

Ok, I have two L2000's in an SG config, two controllers, connected to two SC10 jbod's..

Both machines can see all drives in both units, with the same device file names. However, I was able to create a volume group with two drives on one of the node's that are being used in VG's on the 2nd node.

The question is: Why wasn't my pvcreate on one the disk devices halted since they are indicated to be in use, and, why was I subsequently able to create a vg, with the two of these disks in a pvg and create lv's (five) and mount them on filesystems?

I just finished running some dd's on all of the drives in each cabinet, and both systems identify the same devices with the same device names.

The only solution I can think of is, the particular device names I used were not shown to be in an active vg in /etc/lvmtab, but then, what happened to the structures on the disk? I went to the other system and verified that the file systems were intact.. (i.e. cluster is still up and app is still running)

Mike-
Knowledge Is Power
8 REPLIES 8
Michael Elleby III_1
Trusted Contributor

Re: A twister

P.S. The good thing about all this is, I'm working in a development cluster, so I can crash and burn anytime I want...

Mike
Knowledge Is Power
Sridhar Bhaskarla
Honored Contributor

Re: A twister

Michael,

In order not to confuse, let's say system1 has disk1 and disk2 configured into vg01. system2 can see disk1 and disk2. If you use pvcreate -f on disk1 and disk2, it is going to erase the VGID on these disks. If there is no data and if the file systems are mounted on system1, you will not see any errors for sometime. After vg02 up and running on system2 with disk1 and disk2, unmount the filesystems on system1, do a vgchange -a n and vgchange -a y, then it is going to bomb out. Or a reboot of system1 will prove it.

If you have data on system1 on these disks, you are going to lose it. If you just did pvcreate -f on these disks on system1 and didn't write any data into the filesystems, then you can recover these disks on system1 by using vgcfgrestore command. You will need to vgexport the volume groups on system2 before doing this ofcourse.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MANOJ SRIVASTAVA
Honored Contributor

Re: A twister

Hi Michael

If you are sure of the disk path tehn use pvcreate -f option to initialise the disk , there may be some resident old lvm information which will not allow you to run pvcreate by itself.


Manoj Srivastava.

Michael Elleby III_1
Trusted Contributor

Re: A twister

Sri, I got as far as to get the vg and lv created and mounted on system2, using the device files that were already in use in the VG on system1.

However, I never wrote any data to the filesystems on system2, nor did I deactivate the vg on system1. What I did do was to unmount fs, lvreduce, lvremove, vgreduce and vgremove on system2 to eliminate this vg.

I went to system1 and did a lvdisplay and it looks ok...

Is the vgcfgrestore I need to do, or is it even necessary?

Mike-
Knowledge Is Power
Domenico_5
Respected Contributor

Re: A twister

hi michael,

but in syslog you can read scsi reset?

when you mount a filesystem on system1 and than you mount a file system on system2, you must wait for some minute?
Sridhar Bhaskarla
Honored Contributor
Solution

Re: A twister

Michael,

To create the problem, unmount all the filesystems on system1, then do a vgchange -a n and vgchange -a y (if it is part of MC/ServiceGuard then vgchange -a n and vgchange -a e). vgchange -a e|y should fail. Also if you do a vgdisplay, you should see errors like "disk doesn't correspond to volume group" etc., This is exactly what is going to happen when you reboot the system next time or bring up MC/ServiceGuard package. If you have data, you will definitely see read and I/O errors.

Yes. You need to export the volume group on system2 and do a vgcfgrestore on all the disks followed by vgchange -a y.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Michael Elleby III_1
Trusted Contributor

Re: A twister

Sri-

I went ahead and removed the new lv structures that I created and removed the vg/pvg.. Also did a vgcfgrestore on the disks affected. However, I did it with the vg still activated so there was no need to do a vgchange -a y

Thanx for your help.

Mike-
Knowledge Is Power
Sridhar Bhaskarla
Honored Contributor

Re: A twister

vgchange -a y is to make sure that all PVs are good and are recognizable corresponding to the volume group. A step to verify but not mandatory.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try