Operating System - HP-UX
1833166 Members
3364 Online
110051 Solutions
New Discussion

How to remove a Volume group without destory the data

 
Leon Shen
Frequent Advisor

How to remove a Volume group without destory the data

Hi Experts,

The rp3410 connect with DS2120 and Daisy Chain with 1 Scsi enclosure. After I copy all the data from scsi cnclosure to DS2120. What is the step to remove the volume group in scsi enclosure. Vg00 is the OS volume group. Lets say vg01 is under scsi enclosure. How do I remove the volume group without destory the data? Here is the step :

1.#lvremove -f /dev/vg01/data
2.#vgreduce vg01 /dev/dsk/c0t2d0
3.#vgremove vg01

Please correct if I made mistake

Best regads
Leon
4 REPLIES 4
Radhakrishnan Venkatara
Trusted Contributor

Re: How to remove a Volume group without destory the data

Hi,

Use vgexport command.

#vgexport -m map file vgname.

It exports vg from the system. Data will not be removed.

Regards
Radhakrishnan
Negative thinking is a highest form of Intelligence
Joseph Loo
Honored Contributor

Re: How to remove a Volume group without destory the data

hi,

vgremove will destroy everything about that volume group but vgexport allows u to import the data back (vgimport):

try this:

# umount
# vgchange -a n /dev/vg01
# vgexport -m /tmp/vg01_mapfile -s -v /dev/vg01
# strings /etc/lvmtab
check if vg01 still remains
# vi /etc/fstab
comment off the vg01 file systems

also refer to this doc:

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000075095108

regards
what you do not see does not mean you should not believe
Trond Haugen
Honored Contributor

Re: How to remove a Volume group without destory the data

If you lv/vgremove you COULD re-create if you know the EXACT procedure/sequence the volumes was created and extended.
vgexport is that safe way.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Geoff Wild
Honored Contributor

Re: How to remove a Volume group without destory the data

Use vgexport....then vgimport to bring it back....

But why don't you want to remove the data? Sounds like you are migrating from the SCSI enclosure to a DS2120 - why do you need the data on the SCSI enclosure?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.