Operating System - HP-UX
1752790 Members
6314 Online
108789 Solutions
New Discussion юеВ

Re: Issue with LVM Disk and Help in Creating Disk

 
SOLVED
Go to solution
Jon Le
Advisor

Issue with LVM Disk and Help in Creating Disk

Hello everyone. Here are some details beforehand.

ioscan:
I have a HP-UX 9000, class RP5430.

the following scan is for a DS2100 external disk enclosure that has 3 harddrive in place.

0/3/0/0.0.0
sdisk claimed device seagate ST318404LC
/dev/dsk/c7t0d0
/dev/rdsk/c7t0d0

0/3/0/0.2.0
sdisk claimed device HP 18.2GST318406LC
/dev/dsk/c7t2d0
/dev/rdsk/c7t2d0

0/3/0/0.4.0
sdisk claimed device HP 18.2GST318406LC
/dev/dsk/c7t4d0
/dev/rdsk/c7t4d0

I had a disk go bad or a configuration error but I was using c7t0d0. However that disk got replaced and I want to use c7t0d0.

When I go into SAM in Disk Devices, it shows all 3 "unused".

Here is what I am trying to do. Begin to use all 3 disk. Each of the disk is 18.2 gig so I would like to have a volume group of 54.6 gig and possibly add more at a later date.

Here is the problem that I am running into:

when I do the following, i get the this error:

# pvdisplay /dev/dsk/c7t0d0
pvdisplay: Warning: couldn't query physical volume "/dev/dsk/c7t0d0": This specified path does not correspond to physical volume attached to this volume group
pvdisplay: warning: couldn't query all of the physical volumes.
pvdisplay; couldn't retrieve the names of the physical volumes belonging to volume group "/dev/test"
pvdisplay: cannot display physical volume "/dev/dsk/c7t0d0"

#vgdisplay /dev/test
vgdisplay: volume group not activated
vgdisplay: cannot display volume group "/dev/test"

#lvdisplay /dev/test/lvol1
lvdisplay: couldn't query logical volume "/dev/test/lvol1"
volume group not activated.

How do I go about resolving this error??

Also if you can provide me with a step by step instruction on how to start using the 3 disk. I know the steps involved but would like to confirm it with you guys. Thank you for your help in this matter.
25 REPLIES 25
James R. Ferguson
Acclaimed Contributor

Re: Issue with LVM Disk and Help in Creating Disk

Hi Jon:

> vgdisplay /dev/test
> vgdisplay: volume group not activated

This means that the volume group is not active, so do:

# vgchange -a y /dev/test

Regards!

...JRF...
Jon Le
Advisor

Re: Issue with LVM Disk and Help in Creating Disk

tried to activate it however here is what i am getting:

# vgchange -a y /dev/test

vgchange: warning: couldn't attach to the volume group physical volume "/dev/dsk/c7t0d0":
Cross device link
vgchange: warning: couldn't query physical volume "/dev/dsk/c7t0d0":
the specified path does not correspond to physical volume attached to this volume group
vgchange: warning: couldn't query all of the physical volume.
vgchange: couldn't activate volume group "/dev/test"
Quorum not present, or some physical volume(s) are missing.

Thank you for the quick response.
melvyn burnard
Honored Contributor
Solution

Re: Issue with LVM Disk and Help in Creating Disk

well if your disk has been replaced, you need to recreate the LVM headers on it.
Firstly though, do a strings /etc/lvmatb and verify what disks are in vg named test

If all three disks are listed, you can use vgcfgrestore to recreate the headers from the backupfile
man vgcfgrestore.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Jon Le
Advisor

Re: Issue with LVM Disk and Help in Creating Disk

when I do a strings /etc/lvmtab

i get the following:

# strings /etc/lvmtab

/dev/vg01
/dev/dsk/c1t0d0
/dev/dsk/c2t0d0
/dev/dsk/c2t2d0
/dev/vg00
/dev/dsk/c1t2d0
/dev/test
/dev/dsk/c7t0d0

This is what is in my fstab file:

/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs delaylog 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2

/dev/vg01/data /data vxfs rw,suid,largefiles,delaylog,datainlog 0 2

/dev/test/lvol1 /test vxfs rw,suid,largefiles,delaylog,datainlog 0 2

Torsten.
Acclaimed Contributor

Re: Issue with LVM Disk and Help in Creating Disk

The disk is still empty, but you have a valid VG backup for this disk.

# vgcfgrestore -n vgtest /dev/rdsk/c7t0d0

will restore the config.

# vgchange -a y vgtest

will activate the VG.

# vgdisplay -v vgtest

Now you need to do a "newfs" to the LVOLs (if there are any) to make them useable.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Jon Le
Advisor

Re: Issue with LVM Disk and Help in Creating Disk

how do I start from scratch. Delete everything and begin from nothing.
Torsten.
Acclaimed Contributor

Re: Issue with LVM Disk and Help in Creating Disk

You need to vgexport the vgtest in order to remove it from /etc/lvmtab.

man vgexport

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Jon Le
Advisor

Re: Issue with LVM Disk and Help in Creating Disk

thank you, i would run the following:

# vgexport -v -f backup /dev/test


after I do that, I can start with

1. creating a PV (pvcreate)
2. vgcreate
3. lvcreate

Tim Nelson
Honored Contributor

Re: Issue with LVM Disk and Help in Creating Disk

Here is what I would do after a bad disk replacement ( you can vgexport as mentioned because the data is gone any way) but this is good practice.

Remove old drive, insert new one.
ioscan
ioscan -kfnC disk ( look for your c7t0d0 disk as claimed)

vgcfgrestore -l -n /dev/vgtest ( this lists what devices the vgtest thinks it has)
vgcfgrestore -n /dev/vgtest /dev/rdsk/c7t0d0
vgchange -a y /dev/vgtest
vgdisplay -v /dev/vgtest

( In this case because you only had one drive and it is replaced, data is gone so.. )

newfs /dev/vgtest/rlvol1
mount /test-filesystem

or just start over

vgexport /dev/vgtest
pvcreate /dev/rdsk/c7t0d0
mkdir /dev/vgtest
mknod /dev/vgtest/group c 64 0x0Y0000 (pick a unique minor number for Y )
vgcreate /dev/vgtest /dev/dsk/c7t0d0
lvcreate -L SIZE_MB -n NAME /dev/vgtest
newfs /dev/vgtest/rNAME
edit /etc/fstab
mount /new_test_filesstem