Disk Enclosures
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create the /dev/vg01 lvols ?

SOLVED
Go to solution
Jay_41
Occasional Contributor

How do I create the /dev/vg01 lvols ?

After restoring my /dev/vg01 volume group with a "vgscan", how do I actually see/create the lost files under /dev/vg01 ? For example, an "ll /dev/vg01" only shows the group and not any lvol's ?
3 REPLIES
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: How do I create the /dev/vg01 lvols ?

You are halfway home. vgscan's job is to update /etc/lvmtab and create the group device node. You now use vgimport to finish the job.


e.g. vgimport -v /dev/vg01 /dev/dsk/c1t5d0 /dev/dsk/c1t4d0 ...

Use the appropriate disk devices and list as many disks as make up vg01. That should create an lvoln and a rlvoln for each LVOL in the VG.

Man vgimport for details.
If it ain't broke, I can fix that.
Jay_41
Occasional Contributor

Re: How do I create the /dev/vg01 lvols ?

vgimport states that the /dev/vg01 already exists in /etc/lvmtab. This is true since I ran vgscan prior to this.

How do I create the lvols in the /dev/vg01 directory ???

Thanks.
A. Clay Stephenson
Acclaimed Contributor

Re: How do I create the /dev/vg01 lvols ?

HI Jay:

Let's start all over and get it right this time.

1) strings /etc/lvmtab and note the disks associated with vg01.
2) vgchange -a n /dev/vg01
3) ls -l /dev/vg01/group
Note the MINOR device number. e.g. 0x010000
4) Let's throw all the LVM node data away (this will not harm anything on the disks):
vgexport /dev/vg01
5) mkdir /dev/vg01
6) mknod /dev/vg01/group c 64 0x010000 (using the correct minor device number)
7) vgimport -v /dev/vg01/ /dev/dsk/c1t5d0 /dev/dsk/c1t4d0 (or whatever disks you listed using the above strings /etc/lvmtab command above.)
8) ls -l /dev/vg01 - you should now see all the LVOL device nodes
9) vgchange -a y /dev/vg01
The LVOL's should now be available for mounting filesystems.

If it ain't broke, I can fix that.