1825764 Members
2064 Online
109687 Solutions
New Discussion

Creating a VG

 
Diadina Cotte
Advisor

Creating a VG

Hi

I just replaced 2 disks in c0t0d2 on LUN 2
I did a rebuilt and a consistency check and it is fine. Before, there were 3 directories in those disks. I do need to recreate or create VG07 with 3 directories:

/extern01
/extern02
/extern03

all on VG07 c0t0d2

How can I create a volume group?
Coffee please ;-)
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: Creating a VG

Hi:

If you replaced a disk, have a look at the Technical Knowledge Base document #KBAN00000347. This document describes the various permutations for dealing with a disk replacement.

Regards!

...JRF...

Helen French
Honored Contributor

Re: Creating a VG

Some thoughts:

1) If yoy have replaced the disks which was part of a RAID array, then the restore procedure depends on the RAID level (RAID 5, 1 etc)

2) The directories are created on file systems level and not on VGs OR LVs OR device_file (disks)

3) If you just want to recreate VG information use this command:

# vgcfgrestore ( man vgxfgrestore for details)

4) If you want to create new VGs:

Use SAM OR

1) Make group special files
2) Make VG ( vgcreate)
3) Make LVs (lvcreate)
4) Make file systems (newfs)
5) Make mount points (mkdir /..)
6) Mount FS (mount)
7) Create directories you need ( mkdir)
Life is a promise, fulfill it!
Santosh Nair_1
Honored Contributor

Re: Creating a VG

It sound like you've replaced faulty disks in an existing VG (?) If that's the case, then depending on whether the LVs on the VG were mirrored or not, you might have to restore those files from backup.

But in any case, after replacing the bad drives, you should have done a vgcfgrestore on the disks and if they're mirrored, you should do a vgsync to synch up the mirrors. Otherwise, you'd have to restore the contents of those filesystem from backups.


Here are some docs that explains in greater detail:


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

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


-Santosh
Life is what's happening while you're busy making other plans
PIYUSH D. PATEL
Honored Contributor

Re: Creating a VG

Hi,

You can do a

# pvcreate /dev/rdsk/c0t0d2

# mkdir /dev/vg07
# mknod /dev/vg07/group c 64 0x070000

# vgcreate /dev/vg07 /dev/rdsk/c0t0d2

# lvcreate -L size /dev/vg07
# lvcreate -L size /dev/vg07
# lvcreate -L size /dev/vg07

Creates 3 logical volumes lvol1, lvol2 and lvol3

# newfs -F vxfs /dev/vg07/rlvol1
# newfs -F vxfs /dev/vg07/rlvol2
# newfs -F vxfs /dev/vg07/rlvol3

# mount /dev/vg07/lvol1 /extern01
# mount /dev/vg07/lvol2 /extern02
# mount /dev/vg07/lvol3 /extern03

You can modify your /etc/fsatb accrodingly

Piyush
Diadina Cotte
Advisor

Re: Creating a VG

Hi again

When i try to access the directories i can see the file list but i cannot do a more or a cat on any file.

The VG07 is there i just need to update it or re-create it if you will.

so vgcfgrestore should do the work for c0t0d2?
Coffee please ;-)
Patrick Wallek
Honored Contributor

Re: Creating a VG

What errors do you get when you try to do a 'cat' or a 'more' on the files?

I find it strange that you can see the files but can't cat them.
Thayanidhi
Honored Contributor

Re: Creating a VG

LVM command will not help to restore your data. It seems you replaced the disk in RAID box?

Data may be taken care (rebuild) by RAID it self, if it is raid level 1,1/0 or 5.

If the data is not intact, you may to restore your data from tape backup only.

--TT
Attitude (not aptitude) determines altitude.