Operating System - HP-UX
1831805 Members
2457 Online
110029 Solutions
New Discussion

How to create a new volume group & chunk?

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

How to create a new volume group & chunk?

Hi,

1) Can I hv step by step to create a new volume group? (Example volume group name is vg00)
In windows base, can I say the volume group is similar to a hard disk partition? Example c, d, e or etc

2) Can I hv step by step to create a new chunk? Actually what is different between volume group and chunk?

regards.
5 REPLIES 5
Sanjiv Sharma_1
Honored Contributor
Solution

Re: How to create a new volume group & chunk?

Hello,

I think you want to create a vg ( say vg05 better) with one or more chunk(logical volumes).

Say the hdd device file is /dev/rdsk/c2t3d4 of 8 GB capacity.

# pvcreate /dev/rdsk/c2t3d4
# mkdir /dev/vg05
# mknod /dev/vg05/group c 64 0x050000
# vgcreate /dev/vg05 /dev/dsk/c2t3d4
# lvcreate -L 8192 /dev/vg05
# newfs -F vxfs -o largefiles /dev/vg00/rlvol1
# mkdir /test
# mount /dev/vg05/lvol1 /test

You have a 8 GB filesystem ready for use.

hth.
Everything is possible
KapilRaj
Honored Contributor

Re: How to create a new volume group & chunk?

1). Volume groups are diffrent from C: D: etc... May be u can compare logical volume's to these drive letters as they both are partitions !

2).
pvcreate -f /dev/rdsk/c?t?d?
pvcreate -f /dev/rdsk/c?t?d?
mkdir /dev/vg??
mknod /dev/vg??/group c 64 0x020000
vgcreate /dev/vg?? /dev/dsk/c?t?d? /dev/dsk/c?t?d?
vgchange -a y /dev/vg??

man lvm and read some books .. I can not teach u LVM in a thread !

I never heard of chunk !!! (Stripe ?) Anyway read about LVM to have an idea !

Regds,

Kaps
Nothing is impossible
Naveej.K.A
Honored Contributor

Re: How to create a new volume group & chunk?

Hi,

Determine the hard disk where to create the VG. iocan -fnC disk will show you the device file name.
suppose you want to create the vg77 on a hard disk /dev/rdsk/c0t1d0

1. pvcreate -f /dev/rdsk/c0t1d0
2. mkdir /dev/vg77
3. mknod /dev/vg77/group c 64 0x770000
4. vgcreate /dev/vg77 /dev/dsk/c0t1d0

i think what you refer to the chunk is the file systems, for creating filesystem, you need to create logical volumes.

5. lvcreate -L 1000 /dev/vg77 will create a logical volume of 1GB (/dev/vg77/lvol1)
6. mkfs -F vxfs /dev/vg77/rlvol1 will create a vxfs filesystem
7. mkdir /test1 (creating mount point)
8. mount -F vxfs /dev/vg77/lvol1 /test1

will make the logical volume (chunk) on the hard disk usable

your c,d,e,on your windows is similar to the filesystems on your unix machine

the attachment is really excellent for a beginner to understand the concepts

with best wishes
Naveej
practice makes a man perfect!!!
Sanjay Kumar Suri
Honored Contributor

Re: How to create a new volume group & chunk?

Steps picked from some notes are listed below. Volume group is different than hard disk partitions. Volume groups can span multiple disks. However a logical volume can be thought as equivalent of a hard disk partition. I am not sure on chunk.

sks

1. Use ioscan to find device file name for the new disk:
#ioscan -funC disk
2. May initialize the disk:
#mediainit -v /dev/rdsk/c0t3d0
3. Use pvcreate command to create LVM data structures needed by LVM to begin using the disk as a physical volume. If the disk was previously part of another group, you may need to use the -f option on pvcreate:
#pcreate -f /dev/rdsk/c0t3d0
The disk is now ready to be added to a new or existing volume group.

4. Create a directory /dev/vgnn for the volume group. /dev/vg00 already exists on a pre-installed system.
#mkdir /dev/vg00

5. Create control file /dev/vgnn/group. This file provides the means by which LVM kernel and LVM commands communicate within the volume group. #mknod /dev/vg00/group 64 0x010000 Where 64 is major number (Always). 0x010000 is minor number (Always ends in 0000). hh is the hexadecimal representation of the volume group number. The group files should be owner by root, with rw-r----- permissions.

6. Create the volume group and specify the physical volumes it will contain. You can assign several volumes to a group at one time.
#vgcreate /dev/vg00 /dev/dsk/c0t3d0 /dev/dsk/c0t4d0

The options on vgcreate include:
-e max_physical_extents (default=1016/8683)
-l max_logical_vols (default=255)
-p max_physical_vols (default=16)
-s physical_extent_size (default=4 MB)

7. Verify the volume group.
# vgdisplay -v /dev/vg00
# pvdisplay -v /dev/dsk/c0t3d0
# pvdisplay -v /dev/dsk/c0t4d0
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Brian Butscher
Frequent Advisor

Re: How to create a new volume group & chunk?

A chunk is a term used to define disk space within a database, such as Informix. A chunk in a database is same as a logical volume in a volume group. When creating a logical volume to add disk space for a database, the logical volume is usually labeled in a way to identify what the chunk will be used for, as ex: lvol_data_chk1 or lvol_index_chk1. The numbering of the chunks is very useful as a dbspace within the database may have one or many chunks assigned to it. As each dbspace within the database fills up with data, a new chunk or logical volume will need to be created in the database volume group and then added to the dbspace within the database.
As a system admin, we configure the logical volumes (or chunks) within a volume group and it is the DBA's job to add the chunk to the database.