Operating System - HP-UX
1747980 Members
4476 Online
108756 Solutions
New Discussion юеВ

Re: why lvol1 was created as well as I just created vg01

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

why lvol1 was created as well as I just created vg01

I created vg01 by using the command "vgcreate -e 65535 -s 128 /dev/vg01 devicefile", however, when it is completed, lvol1 is automatically created as well with 0 size. I have to start with lvol2 if i want to create a logicl volume. Further more, the lvol1 and lovl2 seems the same file system, as the result of "lvcreate..." and newfs on lvol2.

hpux11iv2

Please let me know why?
Thanks,
none
15 REPLIES 15
Tingli
Esteemed Contributor

Re: why lvol1 was created as well as I just created vg01

It can be this is an old disk with the old logical volume left there. Or maybe the system is cloned and had a old lv01 left in the device file system.
James R. Ferguson
Acclaimed Contributor

Re: why lvol1 was created as well as I just created vg01

Hi Hanry:

Are you sure that the device files for lvol1 where not already present (left over from a previous reincarnation)? An 'ls -l /dev/vg01' would be useful.

Regards!

...JRF...
Hanry Zhou
Super Advisor

Re: why lvol1 was created as well as I just created vg01

this is a brand new disk, and i just removed vg01, and redo everything again. It happened again, after I created vg01, lvol1 automatically created with 0 size. Then I used "lvcreate -L 50000 -n lvol2 /dev/vg01", newfs, mount.. and then copy data over to the file system. After all being done, lvol1 is identical to lvol2. I could either mount lvol1 or lvol2, they have the same data.
none
Hanry Zhou
Super Advisor

Re: why lvol1 was created as well as I just created vg01

right after I created vg01, if I want to lvremove lvol1, it says the logical volume is not there, but when I do vgdisplay, it shows there with 0 size.
none
James R. Ferguson
Acclaimed Contributor

Re: why lvol1 was created as well as I just created vg01

Hi (again) Hanry:

What does this show (post the output):

# ls -l /dev/vg01

Regards!

...JRF...
Steven E. Protter
Exalted Contributor

Re: why lvol1 was created as well as I just created vg01

Shalom,

If lvcreate was not run, lvol1 was not created by the statement listed in this thread.

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
Patrick Wallek
Honored Contributor
Solution

Re: why lvol1 was created as well as I just created vg01

Here it what I would do:

Deactivate the VG
Export the VG (vgexport vg01)
Verify that the /dev/vg01 directory does NOT exist.
Create the /dev/vg01 directory
Create the /dev/vg01/group file with mknod (verify that you use a unique minor number)
pvcreate -f on the disk
Create your VG again
Activate the VG
Do a vgdisplay and see what is there.

If it still happens, post ALL of the above steps that you did so we can look.

This is definitely not normal behavior.
Hanry Zhou
Super Advisor

Re: why lvol1 was created as well as I just created vg01

I have already removed lvol1, and now only lvol2 exist with 0 size

ll /dev/vg01
total 0
crw-r--r-- 1 root sys 64 0x010000 Jun 16 2009 group
brw-r----- 1 root sys 64 0x010001 Mar 2 15:52 lvol2
crw-r----- 1 root sys 64 0x010001 Mar 2 15:52 rlvol2



vgdisplay -v /dev/vg01 | more
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 65535
VGDA 2
PE Size (Mbytes) 128
Total PE 5467
Alloc PE 0
Free PE 5467
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0


--- Physical volumes ---
PV Name /dev/dsk/c3t0d1
PV Status available
Total PE 5467
Free PE 5467
Autoswitch On
none
Robert-Jan Goossens_1
Honored Contributor

Re: why lvol1 was created as well as I just created vg01

Hi,

--
this is a brand new disk, and i just removed vg01, and redo everything again. It happened again
--

How did you remove the volume group?

# vgchange -a n vg01
# vgexport vg01

and re-create the volume group again.

# vgcreate -e 65535 -s 128 /dev/vg01 disk-device-file

Regards,
Robert-Jan