Operating System - HP-UX
1833497 Members
2635 Online
110052 Solutions
New Discussion

creating a file system (LVM 10.20)

 
SOLVED
Go to solution

creating a file system (LVM 10.20)

I want to create a separate file system on vg00. How do I dtermine if I have the space first, then how do I create the filesystem?
Thanks!
3 REPLIES 3
Jim Mulshine
Frequent Advisor

Re: creating a file system (LVM 10.20)

Use "vgdisplay -v vg00" to see if there are free extents to create a new logical volume. Then use lvcreate to create a logical volume. Next, use newfs or mkfs to create a filesystem. Or, run SAM and go in under Filesystems to create a new filesystem.
Steffi Jones_1
Esteemed Contributor
Solution

Re: creating a file system (LVM 10.20)

Hello Glenn,

there are a few commands which can help you determine if you have space available.

Sam will help you with that, but here are the commands from the command line:

vgdisplay -v /dev/vg00
=> look for the line which says Free PE. If that says anything else but 0 then you should have some space left.

If the PE size is set to 4 MB (that is the default) then you multiply the free PE by 4 and have the available MB number.

You can then easily create a new lvol with the size you want and mount that new lvol to a mountpoint.

Once you have determined that you have space, you can try to run sam and have sam do all the steps for you.

I just posted the manual steps in a similiar thread... check it out:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x4bc4d1e5762fd5118fef0090279cd0f9,00.html

Good luck,
Steffi Jones
Daniel Correa
Advisor

Re: creating a file system (LVM 10.20)

Glenn,

To see if you have any free space do "vgdisplay -v vg00". Under the --volume groups -- heading you will see "Free PE". Also look at "PE size" This is 4mb by default but may be different for your system. If you do have free PE's next look at the end of the vgdisplay for -- Physical Volumes - This will show the free space on each disk. If you have disk mirroring you will want to make sure you have adequate space on two disk to hold your file system.

If your physical volumes looked like this for example;

PV Name /dev/dsk/cXtXd0
PV Status available
Total PE 1023
Free PE 100

PV Name /dev/dsk/cYtYd0
PV Status available
Total PE 1023
Free PE 100

You would have 100*4mb = 400mb free on each disk. If you have free space then to create the file system you would do the following;

lvcreate -n {lvol_name} /dev/vg00

{lvol_name} = name you want for the lvol

Creating without a size will allow you to extend to the disk you want rather than letting the system do it. next;

lvextend -L {size in mb} /dev/vg00/{lvol_name} /dev/dsk/cXtXd0

create the file system structure by doing;

newfs -F vxfs /dev/vg00/r{lvol_name}

Use "r" for raw. If you want an HFS filesystem substitute hfs for vxfs.

create your mount point using mkdir

mount your file system;

mount /dev/vg00/{lvol_name} /{mount point}

Add your file system to /etc/fstab so it will be mounted on the next boot.

if you have mirroring then you need to extend onto the second disk;

lvextend -m 1 /dev/vg00/{lvol_name} /dev/dsk/cYtYd0