Operating System - HP-UX
1748288 Members
3264 Online
108761 Solutions
New Discussion юеВ

Re: Urgent*** Pls help me

 
SOLVED
Go to solution
Johnson Punniyalingam
Honored Contributor

Re: Urgent*** Pls help me

>>>>>># vgcreate /dev/Test_vgworking /dev/dsk/c12t1d0
Increased the number of physical extents per physical volume to 6399.
vgcreate: The physical volume "/dev/dsk/c12t1d0" is already recorded in the "/etc/lvmtab" file<<<<<<<<<<<<

Look at the above error c12t1d0 -> this disk is already used and it belongs to vg "/dev/usdsrcexe"

you have not created a new "Test_vgworking"

than how could you say you successfully created vg and you got problem in creating the logical volume ??

You need use free disk inorder to create you Volume Group "Test_vgworking"
Problems are common to all, but attitude makes the difference
Sagar Sirdesai
Trusted Contributor

Re: Urgent*** Pls help me

Hi

You've to recreate the lvmtab file

mv /etc/lvmtab /etc/lvmtab.prev

vgscan -v

This will recreate you're lvmtab


Then proceed with creation of volume and LV.

Sagar
S.S.
Super Advisor

Re: Urgent*** Pls help me

Hi,
I checked the /etc/lvmtab i found that
/dev/vgnew
/dev/dsk/c12t1d0
/dev/dsk/c14t1d0
/dev/dsk/c16t1d0
/dev/dsk/c18t1d0
/dev/dsk/c4t1d0
/dev/dsk/c6t1d0
/dev/dsk/c8t1d0
/dev/dsk/c10t1d0

After that i tried to activate the same volumegroup

# vgchange -a y /dev/vgnew
Activated volume group
Volume group "/dev/vgnew" has been successfully changed.

root@oratest [/]
# lvcreate -L 200 -n test2working /dev/vgnew
Warning: rounding up logical volume size to extent boundary at size "208" MB.
Logical volume "/dev/vgnew/test2working" has been successfully created with
character device "/dev/vgnew/rtest2working".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vgnew/test2working" could not be extended.
Run the "lvextend" command to create space on the Logical Volume.

root@oratest [/]
# newfs -F vxfs /dev/vgnew/rtest2working
vxfs newfs: no space allocated to device /dev/vgnew/rtest2working

root@oratest [/]
# mkdir -p /test2working


root@oratest [/]
# mount /dev/vgnew/test2working /test2working
/dev/vgnew/test2working: unrecognized file system

If there is no space for the disk /dev/dsk/c12t1d0 then it can be freed up as it is not necessary.

Pls help me how this can be done.

Thanks all for giving your suggestions.
Johnson Punniyalingam
Honored Contributor

Re: Urgent*** Pls help me

>>I removed the volumegroup and tried to create a new volumegroup.<<

you have not remove volumegroup which volume did you removed ?

#lvremove of all logical volume residing under vg which you want to remove


#vgexport

Once vg has been sucefully removed than

# pvcreate -f /dev/rdsk/c12t1d0
# vgcreate /dev/vgTest_working /dev/dsk/c12t1d0
# lvcreate -L 100 -n test2working /dev/Test_vgworking
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: Urgent*** Pls help me

vgdisplay -v /dev/vgnew -> post the output

can you look for Free PE * PE Size = free space left in the volume group can you check that
Problems are common to all, but attitude makes the difference
S.S.
Super Advisor

Re: Urgent*** Pls help me

Thank you all. I sorted this.

My sincere thanks to Johnson. I have followed your steps.

Thank you Johnson, you save me.

Here are my steps performed.

root@oratest [/dev]
# cd /dev

root@oratest [/dev]
# ll vgnew
total 0
crw-r--r-- 1 root sys 64 0x080000 Jan 20 14:21 group
crw-r----- 1 root sys 64 0x080004 Jan 20 14:25 rtest2working
brw-r----- 1 root sys 64 0x080004 Jan 20 14:25 test2working

root@oratest [/dev]
# cd

root@oratest [/]
# vgexport /dev/vgnew
vgexport: Volume group "/dev/vgnew" is still active.
vgexport: Couldn't export volume group "/dev/vgnew".

root@oratest [/]
# vgchange -a n /dev/vgnew
Volume group "/dev/vgnew" has been successfully changed.

root@oratest [/]
# vgexport /dev/vgnew

root@oratest [/]
# cd /dev

root@oratest [/dev]
# ll vgnew
vgnew not found

root@oratest [/dev]
# cd

root@oratest [/]
# strings /etc/lvmtab
Checked, /dev/vgnew is not existed

root@oratest [/]
# pvcreate -f /dev/rdsk/c12t1d0
Physical volume "/dev/rdsk/c12t1d0" has been successfully created.

root@oratest [/]
# mkdir /dev/Test_vgworking
You have mail in /var/mail/root

root@oratest [/]
# ll /dev/*/group
crw-r--r-- 1 root sys 64 0x090000 Jan 20 13:38 /dev/Test/group
crwxrwxrwx 1 root sys 64 0x020000 Oct 27 2007 /dev/Test_vgdata2prod/group
crwxrwxrwx 1 root sys 64 0x0b0000 Sep 22 16:24 /dev/Test_vgdata3prod/group
crwxrwxrwx 1 root sys 64 0x0c0000 Sep 22 19:10 /dev/Test_vgdata4prod/group
crwxrwxrwx 1 root sys 64 0x0f0000 Mar 16 2009 /dev/Test_vgdataprod/group
crwxrwxrwx 1 root sys 64 0x040000 Oct 27 2007 /dev/Test_vgexeprod/group
crwxrwxrwx 1 root sys 64 0x030000 Oct 27 2007 /dev/Test_vglogsprod/group
crwxrwxrwx 1 root sys 64 0x050000 Nov 13 2007 /dev/usdsrcdb1/group
crwxrwxrwx 1 root sys 64 0x060000 Nov 13 2007 /dev/usdsrcdb2/group
crwxrwxrwx 1 root sys 64 0x070000 Nov 13 2007 /dev/usdsrcexe/group
crwxrwxrwx 1 root sys 64 0x000000 Sep 20 2007 /dev/vg00/group
crwxrwxrwx 1 root sys 64 0x0a0000 Jun 10 2009 /dev/vgsyslog/group

root@oratest [/]
# mknod /dev/Test_vgworking/group c 64 0x080000

root@oratest [/]
# vgcreate /dev/Test_vgworking /dev/dsk/c12t1d0
Increased the number of physical extents per physical volume to 6399.
Volume group "/dev/Test_vgworking" has been successfully created.
Volume Group configuration for /dev/Test_vgworking has been saved in /etc/lvmconf/Test_vgworking.conf

root@oratest [/]
# lvcreate -L 200 -n test2working /dev/Test_vgworking
Logical volume "/dev/Test_vgworking/test2working" has been successfully created with
character device "/dev/Test_vgworking/rtest2working".
Logical volume "/dev/Test_vgworking/test2working" has been successfully extended.
Volume Group configuration for /dev/Test_vgworking has been saved in /etc/lvmconf/Test_vgworking.conf

root@oratest [/]
# newfs -F vxfs -o largefiles /dev/Test_vgworking/rtest2working
version 4 layout
204800 sectors, 204800 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles supported
204800 data blocks, 203656 free data blocks
7 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 8192 data blocks

root@oratest [/]
# mkdir /test2working
mkdir: cannot create /test2working: File exists

root@oratest [/]
# mount /dev/Test_vgworking/test2working /test2working

root@oratest [/]
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 1800704 294176 86% /
/dev/vg00/lvol1 314736 65280 217976 23% /stand
/dev/vg00/lvol8 10485760 2092784 8331376 20% /var
/dev/vg00/lvol9 12582912 1089024 11314364 9% /var/adm/crash
/dev/vg00/lvol7 8388608 1572784 6762608 19% /usr
/dev/usdsrcexe/usdsrcexe
62881792 49400544 13375968 79% /usdsrcexe
/dev/usdsrcdb2/usdsrcdb2
262078464 215946592 45771480 83% /usdsrcdb2
/dev/usdsrcdb1/usdsrcdb1
209682432 177621072 31810912 85% /usdsrcdb1
/dev/vg00/lvol6 8388608 5602792 2764496 67% /tmp
/dev/vg00/lvol5 10485760 7110472 3348952 68% /opt
/dev/vg00/lvol4 8912896 7599568 1303680 85% /home
/dev/vg00/dba 5242880 513706 4433664 10% /dba
/dev/Test_vglogsprod/prodarch
36667392 97424 36286256 0% /test2arch
/dev/Test_vgdataprod/proddb1
716800000 655124944 61193240 91% /test2db1
/dev/Test_vgdata2prod/proddb2
524189696 340827616 181944552 65% /test2db2
/dev/Test_vgdata3prod/test2db3
256016384 188364664 67123208 74% /test2db3
/dev/Test_vgdata4prod/test2db4
256016384 136445952 118636296 53% /test2db4
/dev/Test_vgexeprod/prodexe
73334784 56903672 16431112 78% /test2exe
/dev/Test_vglogsprod/prodredo
5242880 3757566 1392486 73% /test2redo
/dev/Test_vgworking/test2working
204800 1157 190923 1% /test2working


Now, i would like to know should i execute the vgcfgbackup /dev/Test_vgworking ?
S.S.
Super Advisor

Re: Urgent*** Pls help me

Also Johnson,

For us the PE size is configured as 32MB. Now, how can i change the default PE (4MB) to 32MB ?
Johnson Punniyalingam
Honored Contributor

Re: Urgent*** Pls help me

>>Now, i would like to know should i execute the vgcfgbackup /dev/Test_vgworking ?<<

No Need "LVM" will take care of it :) if you which you also do .
Problems are common to all, but attitude makes the difference
S.S.
Super Advisor

Re: Urgent*** Pls help me

I want to add the Alternate Links also.

/dev/dsk/c14t1d0
/dev/dsk/c16t1d0
/dev/dsk/c18t1d0
/dev/dsk/c4t1d0
/dev/dsk/c6t1d0
/dev/dsk/c8t1d0
/dev/dsk/c10t1d0

How can we add these ?
Johnson Punniyalingam
Honored Contributor

Re: Urgent*** Pls help me

>>For us the PE size is configured as 32MB. Now, how can i change the default PE (4MB) to 32MB ?<<

while creating "volume group" you have specify that

A disk in a volume group can hold a maximum of 65535 PE , Physical extents of default size 4MB .

The default size of 4 MB per PE is too small for this disk that you are trying to create the VG on .

So increase the size of the PE in powers of 2 to fit the size of the physixal disk .

do man vgcreate for more options ( seee the -s and -e options )

Problems are common to all, but attitude makes the difference