Operating System - HP-UX
1834921 Members
2915 Online
110071 Solutions
New Discussion

How do you create a partition in HPUX?

 
John Smoltz
Occasional Contributor

How do you create a partition in HPUX?

What is a command that will let me create a partion in HPUX with the unused free space?
4 REPLIES 4
Rick Garland
Honored Contributor

Re: How do you create a partition in HPUX?

If you are talking about creating a filesystem, can use the lvcreate and lvextend commands. SAM is also very handy at doing this as well.
Antoanetta Naghiu
Esteemed Contributor

Re: How do you create a partition in HPUX?

If you have already the physical disk attached, the volum group created, let's say vg0x.
lvcreate -L xxx -n partiton_name /dev/vg0x
where xxx is the size in MB of the partition. (see man lvextend for details).
That's it. You have your partition unused.

Via sam, it is possible as well, sam->disk and fs->logical volume. Go to action->create.
Choose the vg where to create it,In the new window, type the size, the name and under Usage [File System] highlight it and enter. Choose Raw (no fs, no swap). Go ok, ok, ok.
Henry_3
Occasional Contributor

Re: How do you create a partition in HPUX?

1. You can find unused disk and make LVM on
unused disk.

# ioscan -fnC disk

# pvcreate /dev/rdsk/c2t1d1

(if you want to make volume group name vg01)
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/c2t1d1

(if you want to make partition )
# lvcreate -L 350 /dev/vg01
?- Partition name is lvol1 by default
,350 MB

2. Make file system and Mount it.

# newfs -F hfs /dev/vg01/rlvol1

?-File system Type is hfs
: high perfomance file system

# mkdir /TEST

?-Mount Point Name is TEST

# mount /dev/vg01/lvol1 /mission1

?+ You should modify /etc/fstab automatic
mount at rebooting
Victor BERRIDGE
Honored Contributor

Re: How do you create a partition in HPUX?

I would like to add that if you have unused free space, there may be a reason.
I suppose all sysadms create on demand the file systems asked but know also that data tend to grow, and keep some reserve as unused disk space, for with LVM vs old partitioning you cand extend your logical volume and so you filesystem using lvextend and extendfs commands.
So my advice is if ther is a need for a new file system, then go ahead, but try to keep some spare, remember that you can only extend within a same vg
Best regards
Victor