Unable to reduce the size of volume group?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unable to reduce the size of volume group?
# 8  
Old 01-04-2012
Hi pinga123,

first of all, have you a backup of yuor data? Are you doing this on test or production system?
Remember to take all possible precautions to prevent data loss BEFORE doing anything. Take into account the possibility of having a downtime of the system you're working with.

Check man pages for command pvresize; it shoul allow you to resize the PV with the option '--setphysicalvolumesize size'.

Look also at the 'RESTRICTIONS' section of the man pages.

You can use the -t and -v flags to see what the output of the command would be without actually doing any change.

see ya
fra
# 9  
Old 01-04-2012
Yes i m doing it on test env.

Will keep you updated.
# 10  
Old 01-04-2012
I recall there may be a vgmodify command but at the time I was using it, it was "at your own risk" unsupported still in developpment at HP and only very few non HP people (like me, perhaps methyl) knew and had access.
I know its included in hpux 11.31 ( sorry I have no, so no man to read...) but was it ported to linux?
# 11  
Old 01-04-2012
I did this.
Code:
# pvresize --setphysicalvolumesize 150G /dev/xvdb5
  WARNING: /dev/xvdb5: Overriding real size. You could lose data.
  Physical volume "/dev/xvdb5" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized

and able to update lvdisplay and vgdisplay now they both show 150gb .

Code:
# vgdisplay
  --- Volume group ---
  VG Name               vg00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  8
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               150.00 GB
  PE Size               4.00 MB
  Total PE              38399
  Alloc PE / Size       25625 / 100.10 GB
  Free  PE / Size       12774 / 49.90 GB
  VG UUID               NL5ws1-uaxQ-Wmtm-75GZ-WnQX-S7Vd-XeHJuS

Code:
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/xvdb5
  VG Name               vg00
  PV Size               150.00 GB / not usable 3.81 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              38399
  Free PE               12799
  Allocated PE          25600
  PV UUID               D7Cn29-bDLg-u153-LXEf-Jrel-y255-RCjEb6

But there is still problem in fdisk output cylinder size is not in sync????

Code:
Disk /dev/xvdb: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1               1       26108   209712478+   5  Extended
/dev/xvdb5               1       26108   209712447   8e  Linux LVM

---------- Post updated at 05:06 AM ---------- Previous update was at 05:05 AM ----------

Quote:
Originally Posted by vbe
I recall there may be a vgmodify command but at the time I was using it, it was "at your own risk" unsupported still in developpment at HP and only very few non HP people (like me, perhaps methyl) knew and had access.
I know its included in hpux 11.31 ( sorry I have no, so no man to read...) but was it ported to linux?
Code:
# vgmodify
-bash: vgmodify: command not found

Smilie
# 12  
Old 01-04-2012
May you please show the output of:
Code:
pvs --units s
parted /dev/xvdb unit s print

# 13  
Old 01-04-2012
Code:
# pvs --units s
  PV         VG   Fmt  Attr PSize      PFree
  /dev/xvdb5 vg00 lvm2 a-   314564608S 104849408S


# parted /dev/xvdb unit s print
Error: Can't have a partition outside the disk!
Information: Don't forget to update /etc/fstab, if necessary.

# 14  
Old 01-04-2012
Sorry, I meant
Code:
parted /dev/xvdb1 unit s print
parted /dev/xvdb5 unit s print

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Shrink ext4 filesystem and reduce the size of a Logical Volume in Linux

Hello guys, I would like to ask you kindly if you don't know some quick and safe method how to shrink ext4 filesystem and reduce the size of a Logical Volume in Linux, please? Thank you very much. (2 Replies)
Discussion started by: los_bandidos
2 Replies

2. AIX

Restvg does not assign the correct PP size to volume group

hello, i am running an AIX6.1 machine and i am trying to restore a volume group that i backed up using mkvgdata command from another server. although i checked file .data and i make sure that PP size for this volume group is 128, when i run restvg command to restore it, it fails because it... (2 Replies)
Discussion started by: omonoiatis9
2 Replies

3. AIX

/usr/sbin/extendvg: Unable to extend volume group

Dear Expret, Help me about my issue, I trying add new disk to volume Group but error: step add new disk to volume group. 1. ~Change a Volume Group Add a Physical Volume to a Volume Group Remove a Physical Volume from a Volume Group Reorganize a Volume Group... (6 Replies)
Discussion started by: williamen
6 Replies

4. AIX

Unable to extend volume group(VG)

Would some help me on this below I am trying to extend file system on AIX and however unable to extend the file system. 0516-306 extendvg: Unable to find physical volume 20 in the Device Configuration Database. 0516-321 extendvg: Physical volume u01-lv is not configured. 0516-792... (15 Replies)
Discussion started by: murali969
15 Replies

5. HP-UX

Increase Size of a Volume Group

Hi I have hp-ux 10.20 I have have my operating system VG of 7 GB in a 36Gb disk. So I have like 29GB of unused disk space. There is any way to increase my VG size, or to add another VG in the same disk so I can use all the disk space? Another question, what is the maximun size that a VG can ... (10 Replies)
Discussion started by: pmoren
10 Replies

6. UNIX for Dummies Questions & Answers

Unable to deactivate a Volume Group

We want to deactivate a VG but failed, because one of the LVs created there is busy. When we are trying to unmount the LV, it is telling "not mounted" and if I execute mount command it will be informing us "already mounted". dmsetup info is indicating "Open Count = 1". Please help me, how we... (5 Replies)
Discussion started by: atanubanerji
5 Replies

7. AIX

Volume Group - PP Size

Hi Friends- We know that the Max PP size in a Normal VG and Big VG is 1 GB and in case of scalable VG it is 128 G. My Questions: 1) What is the min PP size allowed for Normal VG, Big VG and Scalable VG? 2) Why is the max PP Size in Normal and Big VG is 1 G and 128 G in... (1 Reply)
Discussion started by: deshaipet
1 Replies

8. AIX

Volume Group Size

Hello, Can somebody please help. I'm able to view volume groups by using the command "lsvg", how can I view what space is available to that particular volume group Many Thanks (3 Replies)
Discussion started by: ugxd14
3 Replies

9. Solaris

How to reduce the size of a logical volume in solaris 9

Hi, I have the following problem. I just have a new machine with mirroring. The logical volume for /opt is dimensionned to 75 GB which is to much. I want a volume of 10 GB. How can I reduce the size ? I tried to reduce the size of the slice from 75 GB to 10 GB, but the size of the logical volume... (6 Replies)
Discussion started by: aribault
6 Replies

10. UNIX for Advanced & Expert Users

How to check size of Volume Group

Did anyone knows how to check size/usage of a Volume Group in AIX 4.3.3? (4 Replies)
Discussion started by: s_aamir
4 Replies
Login or Register to Ask a Question