Sponsored Content
Operating Systems Linux Red Hat Resizing root virtual disk on the CentOS Post 302591843 by sds9985 on Saturday 21st of January 2012 01:03:41 AM
Old 01-21-2012
I think fdisk will show you that the size of the disk has changed, but the size of the partition being used as the pv for LVM hasn't changed. The space you added is just now shown as free space on the disk. I'd use fdisk to create another partition using the space you added. Then pvcreate on the new partition (probably /dev/sda3), add it to the volume group with vgextend, extend the logical volume with lvextend and then resize the filesystem with resize2fs.

Something like this (after creating the new partition with fdisk and assuming you added 10GB):

Code:
 
# pvcreate /dev/sda3
# vgextend rootvg /dev/sda3
# lvextend -L +10G /dev/rootvg/rootlv
# resize2fs -p /dev/rootvg/rootlv

Adjust the size added and the name of the vg and lv to fit your situation...

BTW, we'd usually just add another virtual disk to the guest, pvcreate it, vgextend the volume group onto it, lvextend the lv and resize2fs the filesystem. That way, you're not trying to resize or repartition a live disk.

Also, if you add another virtual disk and are going to use the whole thing as a pv, you don't need to have a partition table or to create a partition - just use the name of the whole disk.

Code:
 
pvcreate /dev/sdb
vgextend rootvg /dev/sdb
... and so on

Cheers!
 

8 More Discussions You Might Find Interesting

1. Solaris

Resizing the Root Filesystem

Is it possible to increase the root filesystem size without reboot ?? (4 Replies)
Discussion started by: gowthamakanthan
4 Replies

2. UNIX for Dummies Questions & Answers

Mail/ftp/web servers, on VIRTUAL!! dedicated server. Also resource usage. Centos 5.

Hi. First of all, would 4 or 5 websites, 1 ftp server (when downloading by someone or a few persons or one, concretize) and one mail server (not many emails, just to sound official and have a nice, spam-free email for myself). Websites with not that many, but some, later more visitors, quite... (0 Replies)
Discussion started by: newn
0 Replies

3. Solaris

Resizing a disk

I'm used to using AIX but a new box running Solaris I need a little help with. The disk are presented from a SAN, the disk needing to change is presented as 148GBs drive which was allocated to a file system as the same. I need to change that without losing any data. I know I can change the disk... (7 Replies)
Discussion started by: ltlawnman
7 Replies

4. Virtualization and Cloud Computing

Installing CentOS 5.5 on Virtual Box

Hi, I have installed VirtualBox, downloaded CentOS 5.5 and created a VirtualMachine where i have installed the 'server' versión of CentOS 5.5 As I installed Virtual Box a new network device appeared '192.16.1.250' in my 'real' machine. I was unable to reach my webserver so i istalled CentOS once... (5 Replies)
Discussion started by: motoko
5 Replies

5. Red Hat

deleted a virtual machine with critical data under CentOS

Hi all, I'm in a pretty messed-up situation, hope you can give me a hand. I deleted by accident a folder containing a VMware server virtual machine, that contains most critical information. The host OS is CentOS 5.5, which I believe by default uses Ext3. I shut down the PC intermediately... (2 Replies)
Discussion started by: starriol
2 Replies

6. Solaris

Hard disk resizing Solaris

Dear All, I have a task of resizing the Solaris Partitions. This server contains SVM. Kindly let me know the steps in resizing the partitions and precautions. Regards Rj (3 Replies)
Discussion started by: jegaraman
3 Replies

7. UNIX for Dummies Questions & Answers

how to go about resizing the virtual disk?

Hi guys , We are running machines in virtual environment. As a part of virtual solution we have a disk created in form of files on host machine. The problem is we are facing space crunch and need to re size the harddisk files of virtual machines. There a catch the virtual machines are... (0 Replies)
Discussion started by: pinga123
0 Replies

8. Solaris

Lost Root Password on VXVM Encapsulated Root Disk

Hi All Hope it's okay to post on this sub-forum, couldn't find a better place I've got a 480R running solaris 8 with veritas volume manager managing all filesystems, including an encapsulated root disk (I believe the root disk is encapsulated as one of the root mirror disks has an entry under... (1 Reply)
Discussion started by: sunnyd76
1 Replies
Tk_GetVRootGeometry(3)					       Tk Library Procedures					    Tk_GetVRootGeometry(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_GetVRootGeometry - Get location and size of virtual root for window SYNOPSIS
#include <tk.h> Tk_GetVRootGeometry(tkwin, xPtr, yPtr, widthPtr, heightPtr) ARGUMENTS
Tk_Window tkwin (in) Token for window whose virtual root is to be queried. int xPtr (out) Points to word in which to store x-offset of virtual root. int yPtr (out) Points to word in which to store y-offset of virtual root. int widthPtr (out) Points to word in which to store width of virtual root. int heightPtr (out) Points to word in which to store height of virtual root. _________________________________________________________________ DESCRIPTION
Tk_GetVRootGeometry returns geometry information about the virtual root window associated with tkwin. The "associated" virtual root is the one in which tkwin's nearest top-level ancestor (or tkwin itself if it is a top-level window) has been reparented by the window manager. This window is identified by a __SWM_ROOT or __WM_ROOT property placed on the top-level window by the window manager. If tkwin is not associated with a virtual root (e.g. because the window manager does not use virtual roots) then *xPtr and *yPtr will be set to 0 and *widthPtr and *heightPtr will be set to the dimensions of the screen containing tkwin. KEYWORDS
geometry, height, location, virtual root, width, window manager Tk 4.0 Tk_GetVRootGeometry(3)
All times are GMT -4. The time now is 03:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy