1830931 Members
2346 Online
110017 Solutions
New Discussion

Create a logical volume?

 
Peston
Occasional Advisor

Create a logical volume?

Thank you in advance to all experts,

My company bought a C1800 HP workstation and have two hardisk. The first harddisk is 9GB. That is now problem for that. Now, I want to add another hardisk about 36GB and want to do "partition" in HPUX is known as create a logical volume in 10GB disk space for a logical volume.

So, 36GB will become 10GB, 10GB, 16GB.

How do I start, please help?

Thank you every much to all,
Peston.
11 REPLIES 11
harry d brown jr
Honored Contributor

Re: Create a logical volume?

Michael Tully explained this in your other thread:

>>pvcreate /dev/rdsk/cxtxdx (substitute your
disk)

>>mkdir /dev/vg01 (assuming you don't have one)

>>mknod /dev/vg01/group c 64 0x010000

>>vgcreate -p 128 /dev/vg01 /dev/dsk/cxtxdx

>>lvcreate -n xxxx (use name you wish)

>>lvextend -L 1024 /dev/vg01/xxxx
(substitute the size to what you like, this is
in Mb)

to mount it etc


>>mkdir /mountpoint

>>newfs -F vxfs /dev/vg01/rxxxx

>>mount /dev/vg01/xxxx /mountpoint

Edit your /etc/fstab file so that the filesystem
gets mounted next time you reboot.

Live Free or Die
Karvendhan M
Frequent Advisor

Re: Create a logical volume?

Check the output if # ioscan -fnCdisk .

If all your disks are identified, run sam
and create logical volumes as you like.

~ Karvendhan M.
Michael Tully
Honored Contributor

Re: Create a logical volume?

Hi,

yes have a look at your previous posting for
the answer. All you need to do is do an
'lvcreate -n xxxx /dev/vg01' for each volume
you wish to create and a
'lvextend -L 10240 /dev/vg01/xxxx'
(for a 10gb logical volume)
'lvextend -L 16384 /dev/vg01/xxxx'
(for a 16Gb logical volume)

generate the filesystems using 'newfs' and
mount them.

HTH
-Michael
Anyone for a Mutiny ?
Printaporn_1
Esteemed Contributor

Re: Create a logical volume?

If new harddisk was seen from ioscan
easily using sam , goto disk and file system
-> Volume group
you can extend existing VG or create new VG using new disk.
then create or extend logical volume using Logical volume menu.
enjoy any little thing in my life
Peston
Occasional Advisor

Re: Create a logical volume?

Hi,Thanks all. Yap, Micheal

What does this mean 'xxxx' as you given here
lvcreate -n xxxx /dev/vg01?

How is difference pvcreate and lvcreate?

I really hit the pressure when this my first time hand-on experince to do a creat logical volume?

If I done wrongly, anyway to bring back normal?

Thanks a lot.
Peston.
Michael Tully
Honored Contributor

Re: Create a logical volume?

Hi,

The 'xxxx' part of the line was a name. You
can use any name you wish. I personally use
names relevant to what the lgical volume is
for. The 'pvcreate' command tells the disk
that it is to be used as an LVM disk. The
'lvcreate' command is used to name a
logical volume that will live on the disk.
The main difference is that you can have up
to 255 logical volumes in a volume group or
if there is one disk 255 logical partitions
on the one disk.

If you make a mistake is fairly easy to get
it back and start again. Hope that this
explains things.

-Michael
Anyone for a Mutiny ?
Thierry Poels_1
Honored Contributor

Re: Create a logical volume?

Hi,

do you initially really need the 10GB, 10GB & 16GB ??
It might be a good idea to start with smaller sizes, and leave some disk space unallocated. Later, when needed, you can increase the size of these logical volumes.

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Darrell Allen
Honored Contributor

Re: Create a logical volume?

Thierry makes a good suggestion: only create the logical volumes you need now at the size you need. With LVM you don't have to allocate all the disk space when you set up the system. You can easily allocate more logical volumes (and filesystems on thoses LVs) on the fly. You can also increase the size of LVs later. If you have online JFS you can expand your current logical volumes with them up and running.

Of course, you can go ahead and allocate all the disk if you like. Just remember you won't have any free space to add to current LVs later or to add new LVs.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
melvyn burnard
Honored Contributor

Re: Create a logical volume?

I would suggest you start to read some of the documentation available at http://docs.hp.com to get up to speed with what you ar eattempting to do.
The I would recommend contacting an HP Education Centre to get onto the HP-UX Sys Admin course. This will help you to feel a lot more comfortable with the tasks you will be doing.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Bill Hassell
Honored Contributor

Re: Create a logical volume?

And as a last comment for someone starting in HP-UX with a common task, the program called sam will do this quite well. Start sam, go into the disks/filesystems area, create a new volume group for the 36 Gb disk, then you can partition the new volume from the menus. sam will even ask you about permanent mounting and will modify fstab for you.


Bill Hassell, sysadmin
Sanjay_6
Honored Contributor

Re: Create a logical volume?