1753522 Members
6729 Online
108795 Solutions
New Discussion юеВ

Re: LVM issue

 
SOLVED
Go to solution
Rkumar
Frequent Advisor

LVM issue

Dear experts,

I did one disk replacement activity sucessfully. This disk was in vg vgospcm. two lvols (/bto, /home) points we residing on this disk

kz004099:root[/]# vgcfgrestore -n /dev/vg02 /dev/rdsk/c0t4d0
Volume Group configuration has been restored to /dev/rdsk/c0t4d0

kz004099:root[/]# vgchange -a y /dev/vg02
Activated volume group
Volume group "/dev/vg02" has been successfully changed.


but after disk replacement when I tried to mount /bto and /home I got following errors

kz004099:root[/dev/vg02]# mount /home
vxfs mount: /dev/vg02/lvol21 is not a vxfs file system.

kz004099:root[/dev/vg02]# mount /dev/vg02/lvol22 /bto
/dev/vg02/lvol22: unrecognized file system

kz004099:root[/dev/vg02]# mount /dev/vg02/lvol21 /home
/dev/vg02/lvol21: unrecognized file system

kz004099:root[/dev/vg02]# mount /dev/vg02/lvol22 /bto
/dev/vg02/lvol22: unrecognized file system

Then I ran fsck on both the lvols. Despite this /home and /bto not get mounted.
====================================

kz004099:root[/]# fsck -F vxfs -o full /dev/vg02/lvol21
invalid super-block
search for auxiliary super-block? (ynq)y
alternate super-block not found
vxfs fsck: cannot initialize aggregate

kz004099:root[/dev/vg02]# fsck -F vxfs -o full /dev/vg02/lvol22
invalid super-block
search for auxiliary super-block? (ynq)y
alternate super-block not found
vxfs fsck: cannot initialize aggregate


kz004099:root[/]# cd /dev/vg02
kz004099:root[/dev/vg02]# ls -lrt
total 0
crw-r----- 1 root sys 64 0x020016 Apr 20 1999 rlvol22
crw-r----- 1 root sys 64 0x020000 Apr 20 1999 group
crw-r----- 1 root sys 64 0x020015 Apr 20 1999 rlvol21
brw-r----- 1 root sys 64 0x020015 Dec 3 2006 lvol21
brw-r----- 1 root sys 64 0x020016 Dec 3 2006 lvol22

Plz Suggest on this


rahul
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: LVM issue

Shalom rahul,

It would appear there is no filesystem on your lgoical volume.

newfs -F vxfs /dev/vg02/rlvol22

will lay down a new file system if there are no other problems.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sen_ux
Valued Contributor
Solution

Re: LVM issue


"......This disk was in vg vgospcm. "
What is vgospcm ? and you are restoring vg02 conf.

Coming to the issue...

Hope your lvols are not mirrored.

You need to create filesystems on the lvols , then mount it and restore the data.

#newfs /dev/vg02/rlvol21
#newfs /dev/vg02/rlvol22

#mount /home
#mount /bto

Thanks
Rkumar
Frequent Advisor

Re: LVM issue

Sorry By mistake I state vgospcm instead of vg02.

The info provided by you all is very useful for me. This mean all the time when a unmirrored disk get replaced. we need to cerate file systems for lvols residing on that particular disk. m i going in right direction experts?



rahul
James R. Ferguson
Acclaimed Contributor

Re: LVM issue

Hi Rahul:

> This mean all the time when a unmirrored disk get replaced. we need to cerate file systems for lvols residing on that particular disk

Yes, correct. Your 'vgcfgrestore' adds the LVM metadata structures to the replaced disk but that's as far as it goes. The 'newfs' creates the filesystem metatdata within the logical volume. You must then restore any data you want from a backup.

Having mirrored logical volumes protects you from having to restore data from a backup. You 'vgcfgrestore' and then simply 'lvextend' your good mirror to the new disk. No 'newfs' is required nor should be done in this case.

Regards!

...JRF...

Benoy Daniel
Trusted Contributor

Re: LVM issue

Rahul,

vgcfgrestore only restore the LVM header. If you dont have a mirrored copy, your data is gone. You need to restore data from backup.