The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Moving a Logical Volume from one Volume Group to Another krisw AIX 2 07-14-2008 04:48 AM
LVM - Extending Logical Volume within Volume Group ghimanshu UNIX for Advanced & Expert Users 3 07-26-2007 04:39 AM
Hard disks in solaris sprellari SUN Solaris 2 07-27-2006 04:18 PM
The difference between SCSI & IDE Hard disks. abidmalik UNIX for Dummies Questions & Answers 3 12-05-2002 02:21 PM
External Lacie USB hard disks electrode101 Filesystems, Disks and Memory 4 04-04-2002 01:02 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-13-2007
Registered User
 

Join Date: Jun 2007
Posts: 2
How Can I Create A Volume Group With Two Hard Disks On Hp-ux C-3750

Hello All,

I Am A New Member To This Group.

I Want To Know How Can We Create Single Volume Group Using 2 Hard Disks.
As We Require More Data To Be Stored We Need To Add A Hard Disk,but I Have A Doubt Whether We Can Increase The Size Of A Logical Volume Mounted On A Volume Group By Adding A Hard Disk.

If It Is Possible Please Let Me Know. If you have any new suggestions,i would be happy to take them.

Hoping to get reply ..

thank you
Reply With Quote
Forum Sponsor
  #2  
Old 06-13-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
Quote:
Originally Posted by bala_mes
I Want To Know How Can We Create Single Volume Group Using 2 Hard Disks.
Creating a new volume group using two hard disks:
Code:
mkdir /dev/newvg
mknod /dev/newvg/group c 64 0xXX0000
vgcreate newvg /dev/dsk/cXtXdX /dev/dsk/cYtYdY
The XX in the mknod are hex numbers and the combination has to be unique for the system.

Quote:
Originally Posted by bala_mes
As We Require More Data To Be Stored We Need To Add A Hard Disk,but I Have A Doubt Whether We Can Increase The Size Of A Logical Volume Mounted On A Volume Group By Adding A Hard Disk.
Code:
vgextend /dev/newvg /dev/dsk/cZtZdZ
lvextend -L new_size_in_MB /dev/newvg/lvolname
This will add a new disk in the volume group and extend an existing volume named lvolname. You must then unmount the filesystem and then extend it using extendfs. If you have the license, you can use the fsadm command to extend the filesystem online.
Is this what you wanted?
Reply With Quote
  #3  
Old 06-13-2007
Registered User
 

Join Date: Jun 2007
Posts: 2
Can we update the existing Volume Group by adding a hard disk to the already existing

hello

Thanks for your quick reply.

i already have a hard disk which can hold a max of 146 gb .We are planning to add one more hard disk of 146 gb.

now we need to increase the size of a Logical Volume by increasing the space on the Volume Group.

Can you please tell me if i can update the existing Volume Group or do i need to create a new volume group for this ?

If so please let me know the procedure ...

Thanks in advance.
Reply With Quote
  #4  
Old 06-13-2007
Registered User
 

Join Date: Jun 2007
Posts: 2
Hi,

Here no need to create a new volume group.we can update the exsting VG as following steps.

1.we need to create a new physical volume with new HD.
2.need to extend the VG with new PV
3.Then extend the LV with required size
4.after that extend the file system.
Reply With Quote
  #5  
Old 06-13-2007
Registered User
 

Join Date: Dec 2006
Location: Maryland
Posts: 144
I assume you have LVM. In that case,

pvcreate /dev/rdsk/cXtXdX # cXtXdX is the unused disk.
vgextend /dev/<vgname> /dev/dsk/cXtXdX
lvextend -L <size> /dev/<vgname>/<lvol_name>

if [ you have Online JFS ]
then
fsadm .... # check the syntax
else
umount /mountpoint
extendfs /dev/<vgname>/r<lvol_name>
mount /mountpoint
fi

Pheww......
Reply With Quote
  #6  
Old 07-07-2007
Registered User
 

Join Date: Apr 2007
Posts: 7
How to Increase the Size of a Logical Volume by Adding a New Disk

1. The disk can be recoginised by running an ioscan on you system.
ioscan -funC disk
Diskinfo will tell you the type and size.
2. Create a physical volume on the new disk:
/etc/pvcreate <raw_disk_device>
3. Add the disk to the appropriate volume group:
/etc/vgextend <volume_group><block_disk_device>
4. Find the total number to the filesystem that is to be increased:
/bin/bdf -l | grep <filesystem> | awk '{print $1}'
5. Obtain the logical volume of the filesystem that is to be increased:
/bin/bdf -l | grep <filesystem> | awk '{print $1}'
6. Unmount the filesystem so that you can adjust it:
/etc/umount <filesystem>
7. Add the new disk to the filesystem:
/etc/lvextend -l <physical_extents><block_volume_device><block_disk_device>
(the number of physical extents is obtained from step #2)
8. Extend the filesystem on the logical volume to cover the new disk:
/usr/sbin/extendfs <raw_logical_volume>
9. Mount the filesystem:
/etc/mount <filesystem>
10. Verify the new size of the filesystem:
/bin/bdf -l | grep <filesystem> | awk '{print $2}'

Example: A new 9GB disk with SCSI ID 6 is added to hpserv3 (existing disk is SCSI
ID5), and the /home partition will be extended to use the entire disk

hpserv3# pvcreate /dev/rdsk/c0t6d0. If disk has been used before you will encounter
an error message add the -f
Physical volume "/dev/dsk/cot6d0" has been successfully created.
hpserv3# vgextend /dev/vg00 /dev/dsk/c0t6d0
Volume group "/dev/vg00" has been successfully extended.
hpserv3# pvdisplay /dev/dsk/c0t6d0 | grep "Total PE" | awk '{print $3}'
2071
hpserv3# bdf -l | grep /home | awk '{print $1}'
/dev/vg00/lvol5
hpserv3# umount /home. If an error message is encountered with device is busy.
Common out the entry in /etc/fstab then reboot.
hpserv3# lvextend -l 2071 /dev/vg00/lvol5 /dev/dsk/c0t6d0
Logical volume "/dev/vg00/lvol5" has been successfully extended
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
hpserv3# extendfs /dev/vg00/rlvol5
Max number of sectors extendible is 7864320
Extend file system /dev/vg00/rlvol5 to have 7864320 sectors more.
Warning: 560 sector(s) in last cylinder unallocated
Extended super-block backups (for fsck -b#) at:
1028648, 1038672, 1048696, 1058720, 1068744, 1078768, 1088792, 1098816, 1108840
(K)
8816008, 8826032, 8836056, 8846080, 8856104, 8866128, 8876152, 8886176,
hpserv3# mount /home
hpserv3# bdf -l | grep /home | awk '{print $2}'
8695841
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0