Operating System - Linux
1752780 Members
6406 Online
108789 Solutions
New Discussion юеВ

Re: how to transfer physical volume infomation on to new disk

 
MANISH PATEL_2
Frequent Advisor

how to transfer physical volume infomation on to new disk

Hi,

My vg01 disk got failed. I have spare disk on server. Can you please let me know what are the steps to activate the new disk and create the logical volume....

How can i restore the physical volume info on new disk. do i need to create phy/logical volume manually ?

Please let me know as earliest as possible.

Thanks
Manish
5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: how to transfer physical volume infomation on to new disk

If you vg01 failed, then you have to restore data from a backup.

>>> How can i restore the physical volume info on new disk. do i need to create phy/logical volume manually ?

Yes. You have to use:

vgremove vg01
pvcreate /dev/
vgcreate vg01 /dev/
lvcreate -L -n vg01
mkfs -t ext3 /dev/vg01/
tune2fs -i 0 -m 0 -c0 /dev/vg01/
mount /path/mount/point
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: how to transfer physical volume infomation on to new disk

Shalom,

Set of tools here.
vgimport/vgexport
vgcfgrestore/vgcfgbackup


Steps:
vgexport the volume group.
pvcreate the new disk
vgimport the the volume group.


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
IT_2007
Honored Contributor

Re: how to transfer physical volume infomation on to new disk

is vg01 active or completly dead? can you do vgdisplay -v vg01?

Does it have a mirror? If so, remove bad disk and put new disk. issue vgcfgrestore command on to new disk.

If vg01 is completly destroyed then use procedure in the 1st reply.
MANISH PATEL_2
Frequent Advisor

Re: how to transfer physical volume infomation on to new disk

Hi IT2007,

VG01 is not dead, but I/O is giving error on vg01 which i found from syslog file.

Once i shutdown then it running fine for 2-3 days. I think may be some sectors were corrupted in particular LVM hence it want able to right on it and giving I/O error. Is there any way to find out which sector are bad and how to repair it.

Thanks
Manish
Patrick Terlisten
Honored Contributor

Re: how to transfer physical volume infomation on to new disk

Hello Manish,

how mandy PVs a member of the VG? Maybe it's only a faulty member of the VG. If you know which member disk a faulty, try pvmove. With pvmove you can move PEs to another PV. If only one disk is member of the VG, you can add a second PV and then use pvmove to move the PEs from the faulty PV.

Best regards,
Patrick
Best regards,
Patrick