Sponsored Content
Operating Systems HP-UX How Can I Create A Volume Group With Two Hard Disks On Hp-ux C-3750 Post 302125829 by bugsandbunny on Saturday 7th of July 2007 10:25:01 PM
Old 07-07-2007
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
Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

LVM - Extending Logical Volume within Volume Group

Hello, I have logical volume group of 50GB, in which I have 2 logical volumes, LogVol01 and LogVol02, both are of 10GB. If I extend LogVol01 further by 10GB, then it keeps the extended copy after logical volume 2. I want to know where it keeps this information Regards Himanshu (3 Replies)
Discussion started by: ghimanshu
3 Replies

2. AIX

Moving a Logical Volume from one Volume Group to Another

Does anyone have any simple methods for moving a current logical volume from one volume group to another? I do not wish to move the data from one physical volume to another. Basically, I want to "relink" the logical volume to exist in a different volume group. Any ideas? (2 Replies)
Discussion started by: krisw
2 Replies

3. AIX

Logical volume name conflict in two volume group

Hello, I am a french computer technician, and i speak English just a little. On Aix 5.3, I encounter a name conflict logical volume on two volume group. The first volume lvnode01 is OK in rootvg and mounted. It is also consistent in the ODM root # lsvg -l rootvg |grep lvnode01 ... (10 Replies)
Discussion started by: dantares
10 Replies

4. Red Hat

Check disks not in a volume group?

Hello, How can I obtain a lists of disks with their size (anytype: SAN LUNs, internal disks, etc.) attached to the system and not being extended inside a volume group? The purpose of this list is to be part of a function of a script that I'm doing in order to resize filesystems and in the... (6 Replies)
Discussion started by: asanchez
6 Replies

5. AIX

Create new Volume Group

Good afternoon all, I'll probably confuse everyone as I'm a Windows guy dealing with AIX 6.1 and can't quite figure out how to do something. I have a P520 server running 2 LPARs and we have an IVM (not HMC).Within the IVM under Virtual Storage Management, when I check the Physical Volumes, I have... (4 Replies)
Discussion started by: Spellbound
4 Replies

6. UNIX for Dummies Questions & Answers

Confusion Regarding Physical Volume,Volume Group,Logical Volume,Physical partition

Hi, I am new to unix. I am working on Red Hat Linux and side by side on AIX also. After reading the concepts of Storage, I am now really confused regarding the terminologies 1)Physical Volume 2)Volume Group 3)Logical Volume 4)Physical Partition Please help me to understand these concepts. (6 Replies)
Discussion started by: kashifsd17
6 Replies

7. Shell Programming and Scripting

Need to create an for loop for adding an disk in veritas volume group.

Hi Experts I need an script to add an disk in to the veritas volume manager disk group. For example: # cd /tmp # view disk c6t5d2 c6t2d1 c6t3d7 c6t11d2 c7t11d2 c6t11d6 Normally we add the disk like this: # vxdg -g freedg freedisk01=c6t5d2 # vxdg -g freedg freedisk02=c6t2d1 #... (3 Replies)
Discussion started by: indrajit_preet
3 Replies

8. Red Hat

Create volume using LVM over 2 physical disks

I wanted to know how we can combine volumes over 2 physical drives. # fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 ... (16 Replies)
Discussion started by: ikn3
16 Replies

9. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

10. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 Replies
VGEXTEND(8)						      System Manager's Manual						       VGEXTEND(8)

NAME
vgextend - add physical volumes to a volume group SYNOPSIS
vgextend [-A|--autobackup y|n] [-d|--debug] [-h|-?|--help] [--restoremissing] [-f|--force] [-t|--test] [-v|--verbose] [ PHYSICAL DEVICE OPTIONS ] VolumeGroupName PhysicalDevicePath [PhysicalDevicePath...] DESCRIPTION
vgextend allows you to add one or more initialized physical volumes ( see pvcreate(8) ) to an existing volume group to extend it in size. Moreover, it allows you to re-add a physical volume that has gone missing previously, due to a transient device failure, without re-ini- tialising it. Use vgextend --restoremissing to that effect. If PhysicalDevicePath was not previously configured for LVM with pvcreate (8), the device will be initialized with the same default values used with pvcreate. If non-default pvcreate values are are desired, they may be given on the commandline with the same options as pvcre- ate. See PHYSICAL DEVICE OPTIONS for available options. Note that the restore-related options such as --restorefile, --uuid, and --physi- calvolumesize are not available. If a restore operation is needed, use pvcreate (8) and vgcfgrestore (8). OPTIONS
See lvm for common options. PHYSICAL DEVICE OPTIONS
The following options are available for initializing physical devices in the volume group. These options are further described in the pvcreate man page. -f, --force -y, --yes -Z, --zero y|n --labelsector sector --metadatasize size [--metadataignorey|n] --pvmetadatacopies copies --dataalignment alignment --dataalignmentoffset alignment_offset Examples "vgextend vg00 /dev/sda4 /dev/sdn1" tries to extend the existing volume group "vg00" by the new physical volumes (see pvcreate(8) ) "/dev/sdn1" and /dev/sda4". SEE ALSO
lvm(8), vgcreate(8), vgreduce(8), pvcreate(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) VGEXTEND(8)
All times are GMT -4. The time now is 09:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy