Operating System - HP-UX
1825764 Members
2048 Online
109687 Solutions
New Discussion

Re: VG creation from Storage

 
SOLVED
Go to solution
GTFSpanneer
Frequent Advisor

VG creation from Storage

Hi ,
30 Gb allocated from san . i need to create a new logical volume. could you please help me.
Please provide command step by step. first time i am going to create LV from SAN.
disk 58 0/7/1/0/4/0.24.44.0.0.2.0 sdisk CLAIMED DEVICE HP MSA VOLUME

Thanaks in advance.
Regards
RPS
21 REPLIES 21
Wim Rombauts
Honored Contributor

Re: VG creation from Storage

Could you please specify your OS-version, and the output of :
"ioscan -fnC disk" for the above disk (we need to know the device file names)
GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Thanks WiM for quick reply. Please find the attached file for output of "ioscan -fnC disk"

Os version is 11.23

Regards
RPS
g3jza
Esteemed Contributor
Solution

Re: VG creation from Storage

Hi,
it seems that your DSF is missing.
To create it, run:
#insf -v

You should then run #ioscan -fn
again and see your DSF for disk 58

In which Volume group do you want to create your new LV?

After the DSF for the disk58 has been created, then initialize it for LVM usage:
#pvcreate

After the disk has been initialized, add it to the VG, in which you want to create the new LV:
#vgextend

Then create new LV:
#lvcreate -L -n

GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi g3jza ,
This LV is temporay purpose for one month. after one month i have reacalim. How to recail it.

regads
RPS
g3jza
Esteemed Contributor

Re: VG creation from Storage

After deciding that you no longer need the LV and thus FS and all data contained in that FS, then :

# umount
# lvremove /dev//

you can also potentially vgreduce the disk which is used for the VG:
#vgreduce
#pvremove (optional)

Then unpresent the disk from the server so it can be used elsewhere, this is being done on the disk array...
GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi g3jza,
Thanks. i don't want to extend the vg . i needd to create PV+VG+LV+FS. please provide me steps.
Thanks in advance.
Regards
RPS




g3jza
Esteemed Contributor

Re: VG creation from Storage

Did you run the #insf -v
to create the DSF for the new disk?

then #ioscan -fn
again and give me the output of disk58.

GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi g3jza,

Please find attached file.

Thanks
RPS

g3jza
Esteemed Contributor

Re: VG creation from Storage

One more thing, give output of your VG group files please:
#ll /dev/vg*/group

Ok so your new DSFs that got created is according to this: /dev/dsk/c9t2d0, /dev/rdsk/c9t2d0

you wanted to create the PV from it so:
#pvcreate /dev/rdsk/c9t2d0

You didn't specify the parameters of VG, so I assume the defaults will be ok, it's temporary anyways, so:
#mkdir /dev/vgname
#mknod /dev/vgname/group c 64 0x0Y0000
where 'Y' is the number following the last minor number from the #ll /dev/vg*/group output
#vgcreate vgname /dev/dsk/c9t2d0

The 'vgname' should be unique to your system, it could be anything like vgora, vgtemp....doesn't really matter....

Then create the 30GB LV:
#lvcreate -L 30720 /dev/vgname

Create a FS within the LV:
#newfs -F vxfs -o largefiles /dev/vgname/rlvol1 (largefiles option is optional, if you are going to have files bigger than 2GB in that FS)

Finally mount the FS:
#mount /dev/vgname/lvol1 /your_mount_point

GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi g3jza,

Thanks . please see the output.

:root>ll /dev/vg*/group
crw-r----- 1 root sys 64 0x000000 Apr 9 2007 /dev/vg00/group
crw-r--r-- 1 root sys 64 0x010000 Apr 16 2007 /dev/vg01/group
crw-r--r-- 1 root sys 64 0x020000 Apr 16 2007 /dev/vg02/group
crw-r--r-- 1 root sys 64 0x030000 Apr 16 2007 /dev/vg03/group
crw-r--r-- 1 root sys 64 0x040000 Apr 16 2007 /dev/vg04/group
crw-r--r-- 1 root sys 64 0x050000 Apr 16 2007 /dev/vg05/group
crw-r--r-- 1 root sys 64 0x060000 Apr 16 2007 /dev/vg06/group
crw-r--r-- 1 root sys 64 0x070000 Apr 16 2007 /dev/vg07/group
crw-r--r-- 1 root sys 64 0x080000 Apr 16 2007 /dev/vg08/group
Torsten.
Acclaimed Contributor

Re: VG creation from Storage

You should use the new agile device file when creating the VG, e.g. /dev/disk/disk__

No need to create a "group" file, if you are running 11.31 march 2008 or newer, just do a

# vgcreate /dev/vgname /dev/disk/disk__

the create the LVOL, create the file system and mount it (see above).

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Torsten.
Acclaimed Contributor

Re: VG creation from Storage

Use

# ioscan -m dsf

and search the new device file that matches /dev/dsk/c9t2d0.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi Torsten,
OS Version is 11.23.

Rgards
RPS
g3jza
Esteemed Contributor

Re: VG creation from Storage

Torsten: he said OS is 11.23...
g3jza
Esteemed Contributor

Re: VG creation from Storage

ok,
then:

#mkdir /dev/vgtest
#mknod /dev/vgtest/group c 64 0x090000
would be ok.

Torsten.
Acclaimed Contributor

Re: VG creation from Storage

Sorry, haven't noticed this.


In this case you should vgextend the VG with the other path (/dev/dsk/c14t2d0) for multipathing (PVLINKS):

vgextend vgtest /dev/dsk/c14t2d0

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
g3jza
Esteemed Contributor

Re: VG creation from Storage

Torsten: That's a good point, to ensure high availability, forgot about that...
GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi g3jza,

Thank you very much. I have created the file system. And i need on more help from you. I need reclaim the space after one month.Please provide steps remove the fs+lv+vg+pv.

Thanks & Regards
RPS
g3jza
Esteemed Contributor

Re: VG creation from Storage

If you want to remove the FS+LV+VG+PV:

There's no need to remove the FS...I mean, you could just rm -rf /your_mount_point , where the LV is mounted, but that's not necessary, you can go ahead by removing LV+VG+PV like this:

unmount the FS first:
#umount /your_mount_point (where the LV is mounted)

deactivate the VG:
#vgchange -a n vgtest

Shortcut to removing VG:
#vgexport vgtest

one comment here: I hope that only the one LV you created was in vgtest, as the whole vgtest will "disappear"

Optionally remove the PV:
#pvremove /dev/rdsk/c9t2d0

Then tell your storage team to unpresent the disk/lun from the server, so it can be used elsewhere...
Sunny123_1
Esteemed Contributor

Re: VG creation from Storage

If you want to remove all that you created

then just unmount FS and export volume group

unmount the FS
#umount /mountpoint

Deactivate the Volume Group:
#vgchange -a n vgname

export VG
#vgexport vgname

considering u want to remove all LVs and data.

Remove the Physical Volume
#pvremove /dev/rdsk/c?t?d?

Regards
Sunny
GTFSpanneer
Frequent Advisor

Re: VG creation from Storage

Hi g3jza & Sunny,
Thanks.


Reagards
RPS