Operating System - HP-UX
1830077 Members
25056 Online
109998 Solutions
New Discussion

Create Physical Volume, Logical Volume, & Volume Group

 
SOLVED
Go to solution
Betty Hardin
Frequent Advisor

Create Physical Volume, Logical Volume, & Volume Group

We recently installed 2 new drives into an FC60 storage array. I see the drive in SAM as 'unused' - do not see it in ioscan - nor is it listed in either dev/dsk or dev/rdsk.

Not sure that I am doing things in the correct sequence - because I can't see it in /dev/rdsk, I can't run pvcreate from the command line.

Attempts to create it using LVM in Sam results in this error "vgextend: couldn't open physical volume "dev/dsk/c7t1d0". Invalid Argument".

So apparently; something is wrong - but I not sure what.

This is what I had hoped to do:
pvcreate /dev/rdsk/c7t1d0
vgcreate vg09
lvextend -L 400 /dev/vg09/lvol1
umount /dev/vg09/lvol1
extendfs /dev/vg09/rlvol1
mount /dev/vg09/lvol3 /mnt

I really prefer to do it from the command line if possible.

TIA
Betty
7 REPLIES 7
twang
Honored Contributor

Re: Create Physical Volume, Logical Volume, & Volume Group

Hi,
You mentioned that you cannot pvcreate from the command line, could you post the error message here?
You said that you can see the drive in SAM, could you show what information you see in SAM?

regards
twang
Alex Lavrov.
Honored Contributor
Solution

Re: Create Physical Volume, Logical Volume, & Volume Group

Hello,

Also make sure that the disk is OK.

ioscan -fnDisk

diskinfo /dev/rdsk/c7t1d0

dd if=/dev/rdsk/c7t1d0 of=/dev/null bs=8192k
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Devender Khatana
Honored Contributor

Re: Create Physical Volume, Logical Volume, & Volume Group

Hi,

It should aways be done from command line always. Follow these steps.

Identify both new drives and corresponding device files. Find out the health of disks using
#diskinfo /dev/rdsk/cxtydz

It should not display 0KB size.
Use pvcreate -f /dev/rdsk/cxtydz
Now decide wheather you want to create new VG or want to some existing VG onto these drives. you can even extend on one and create new vg on the other. Further steps will depend on your this decision.

HTH,
Devender
Impossible itself mentions "I m possible"
Wodisch
Honored Contributor

Re: Create Physical Volume, Logical Volume, & Volume Group

Hi Betty,

you may to have execute "insf -C disk" first,
to create the neccessary device files.
Then try the already mentioned "diskinfo" on the raw devices to verify the new disks can be accessed - a size of 0 (zero) means failure - they cannot be accessed!
Then go on with your "pvcreate", but think about using the options of "vgcreate":
-l 100 # one hundred LVs ought to be enough
-p 100 # to be able to add more PVs later
-s 64 # use bigger PEs for today's disks
-e 2048 # 2048 * 64 MB = 128GB/disk should be safe for the near future

BTW, why would you like to create a new VG?
You must enlarge the existing one to be able to add the newly added space to your existing LV!

FWIW,
Wodisch
Betty Hardin
Frequent Advisor

Re: Create Physical Volume, Logical Volume, & Volume Group

insf -C disk

This is what I was looking for - I was previously unable to run pvcreate because I did not have a device id.

Inherited this system. Previously worked with AIX - but it has been so long ago that I don't remember anything. I am not familiar with HPUX beyond daily routine tasks and basic scripting.

This system was previously maintained by outside consultants. Now the IT Boss has changed and the outside consultants are gone.

Every disk on this system has been created with it's own volume group. Several of them are in the same logical volume.

I would like to eventually get to:
vg00 root
vg01 apps
vg02 db

Any suggestions for the best way to get there? This is a production box.

Thanks
Betty
Betty Hardin
Frequent Advisor

Re: Create Physical Volume, Logical Volume, & Volume Group

In fact, this is what I am looking at (not including new drives). Any suggestions to get it back to where I want it to be?

lvafter vg07 Unused 17280 0
lvapsgn vg06 Unused 8640 0
lvbackup vg03 Unused 17280 0
lvitsdb vg04 Unused 8640 0
lvol1 vg00 HFS 300 1 /stand
lvol1 vg01 VxFS 51800 0 /u2
lvol1 vg02 VxFS 34560 0 /u3
lvol1 vg03 VxFS 17280 0 /u1
lvol1 vg04 VxFS 8640 0 /u6
lvol1 vg05 VxFS 17280 0 /u5
lvol1 vg06 VxFS 8640 0 /u4
lvol1 vg07 VxFS 17280 0 /u7
lvol1 vg08 VxFS 17320 0 /u8
lvol2 vg00 Swap/Dump 1024 1
lvol3 vg00 VxFS 400 1 /
lvol4 vg00 VxFS 400 1 /home
lvol5 vg00 VxFS 1500 1 /opt
lvol6 vg00 VxFS 300 1 /tmp
lvol7 vg00 VxFS 1500 1 /usr
lvol8 vg00 VxFS 1500 1 /var
lvsamba vg05 Unused 17280 0
lvsymix vg01 Unused 51800 0
lvtrend vg02 Unused 34560 0


Betty Hardin
Frequent Advisor

Re: Create Physical Volume, Logical Volume, & Volume Group

Completed