1836611 Members
1969 Online
110102 Solutions
New Discussion

volume group

 
SOLVED
Go to solution
navin
Super Advisor

volume group

want to bring a disk into an existing volume group,and need to create hfs filesystem on it after creating logical volumes.Will any body tell the necessary command or steps.appreciation
Learning ...
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: volume group

Hi:

This should be close. Let's assume that your existing VG is /dev/vg02 and that your new disk is c9t1d0. I assume that you have already created the device nodes for /dev/dsk/c9t1d0 and /dev/rdsk/c9t1d0.

1) pvcreate -f /dev/rdsk/c9t1d0
2) vgextend /dev/vg02 /dev/dsk/c9t1d0
3) lvcreate -L 2000 -n lvol5 /dev/vg02
This will create a 2000MB LV /dev/vg02/lvol5
4) newfs -F hfs /dev/vg02/rlvol5
5) mkdir /mountpoint
6) mount -F hfs /dev/vg02/lvol5 /mountpoint

You will proabably want to make an /etc/fstab entry to automate the mounting.

Note that if your new disk has more extents than your existing VG will allow some of your new disk will go unused.

By the way, you can do everybit of this in SAM
including making the device files and doing the /etc/fstab entry. If you are a novice, that may be your best choice.

Regards, Clay
If it ain't broke, I can fix that.
Helen French
Honored Contributor

Re: volume group

Hi Navin,

Try this:

1) Add the disk to the server.
2) Find out the device file for the new disk - 'ioscan -fnC disk' - (/dev/dsk/cxtxdx)
3) Extend VG - 'vgextend vg_name PV_name' - 'vgextend vgxx /dev/dsk/cxtxdx'
4) Create LV - 'lvcreate -L LV_size vg_name PV-name' - 'lvcreate -L XXX vgxx /dev/dsk/cxtxdx'
(here the LV-size should be in MB)
5) Create HFS file system - 'newfs -F hfs lv_name' - 'newfs -F hfs /dev/vgxx/rlvolx' (here the lv_name should be the raw device'
6) Mount file system - 'mount /mount_dir lv_name' - 'mount /mount_dir /dev/vgxx/lvolx'

HTH,
Shiju
Life is a promise, fulfill it!
Helen French
Honored Contributor

Re: volume group

Hi again,

Missed one step. You need to 'pvcreate' the new disk before extending the VG.

# pvcreate -f /dev/rdsk/cxtxdx

Also if you use SAM, it will be so easy for u. Just open SAM - Disk Devices - Volume group - Add new disk.

HTH,
Shiju
Life is a promise, fulfill it!