1752589 Members
4560 Online
108788 Solutions
New Discussion юеВ

lvol creating

 
SOLVED
Go to solution
Shehan
Super Advisor

lvol creating

Hi All

I have already created 2TB volume group. Its name is vg06. Now I want to create logical volume with size of whole amount(2TB).Its name is lvol1.

Please let me know all steps for creating the logical volume.

Thanks
Niru

12 REPLIES 12
Frank de Vries
Respected Contributor

Re: lvol creating

man lvcreate

Example:
Create a logical volume of size 1000000 MB in volume group /dev/vg06:

lvcreate -L 1000000 -n /dev/vg06


Look before you leap
Shehan
Super Advisor

Re: lvol creating

Don't I need to create file system on it?


Regards
Niru
Frank de Vries
Respected Contributor

Re: lvol creating

Not necessarily, maybe you use raw devices for Oracle ASM for instance.

For cooked filesystems:

Format: newfs -F vxfs /dev/vg06/
(in case of hfs, choose hfs)

mount /dev/vg06 /filesystem

I assume you need to use largefiles then:
fsadm -F vxfs -o largefiles /dev/vg06/

make entry in /etc/fstab if not part of cluster(ware).

Look before you leap
Pete Randall
Outstanding Contributor

Re: lvol creating

Yes, you need to create a file system (unless you want to use the raw disk space - for a database, for example), but you asked about creating a logical volume so that's the answer you got. To create a file system, take a look at the man page for newfs.


Pete

Pete
Frank de Vries
Respected Contributor

Re: lvol creating

Dear Nirukshitha

I noticed on your profile that you
have assigned:

"I have assigned points to 2 of 170 responses "

That is a very low ratio.
please read the forum rules again on how to assign points.

Look before you leap
Asif Sharif
Honored Contributor

Re: lvol creating

Hi Niru,

Create a logical volume lvol1 of size 2TB in volume group /dev/vg06 suppose all physical extents are on /dev/dsk/cxtxdx :


#lvcreate -n lvol1 vg06
#lvextend -L 2097152 /dev/vg06/lvol1 /dev/dsk/cxtxdx

If you need a filesystem construct it according to


#newfs -F vxfs /dev/vg06/rlvol1

You may use specific options, e.g. to support largefiles:


#newfs -F vxfs -o largefiles /dev/vg06/rlvol1

See also newfs(1M) and newfs_vxfs(1M) .

Mount it at the desired directory:


#mount /dev/vg06/lvol1 /mountdirectory

For specific mount option examples look into the /etc/fstab , fstab(4) or consult mount_vxfs(1M) .

Check:


#bdf

NOTE: Do not forget to add an appropriate entry in the /etc/fstab , fstab(4) , if you want the logical volume automatically mounted on system start-up.

Regards,
Asif Sharif
Regards,
Asif Sharif
Yogeeraj_1
Honored Contributor

Re: lvol creating

hi Niru,

this simplest way to do this is to use SAM:

SAM -> Disks and File Systems -> Logical Volumes

then:
Action -> Create


If you want to use Oracle ASM, then steps are slightly different.


if you need any further asistance, please let us know.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Cem Tugrul
Esteemed Contributor

Re: lvol creating

Hi,
so if u want to create 1 lvol size 2TB
Then;

#vgdisplay -v your_vgname
Look at the TOTAL PE

#lvcreate -l TOTALPE /dev/your_vgname
#newfs -o largefiles /dev/your_vgname/rlvolname
#mkdir /mountdir
#mount /dev/your_vgname/lvol1 /mountdir

Good Luck
Our greatest duty in this life is to help others. And please, if you can't
Shehan
Super Advisor

Re: lvol creating

Thanks. I did this

Nirukshitha