Hi all! I've got a VM at work running C6 on HyperV (no, its not my fault, that's what the company uses. I'd rather gag myself than own one of th ose things.) I ran out of disk space in the VM, so the admin enlarged the virtual disk. but now I realize I don't know how to enlarge the partition and its filesystem. I'll be googling, but in case I miss it, it'd be great if someone could point me in the right direction. thanks! Fred -- ------------------------------------------------------------------------------- Under no circumstances will I ever purchase anything offered to me as the result of an unsolicited e-mail message. Nor will I forward chain letters, petitions, mass mailings, or virus warnings to large numbers of others. This is my contribution to the survival of the online community. --Roger Ebert, December, 1996 ----------------------------- The Boulder Pledge -----------------------------
Hi Fred, That would depend on what the underlying device is using. Do you know if you are using LVM or not? Type `lvdisplay` at the console to display any logical volumes. If you are using LVM, you should see one named something like 'VolGroup00_lv-root' If this is the case, something like this should help, but I have listed out the steps below for the TL;DR version: https://wiki.centos.org/TipsAndTricks/ExpandLV *pvcreate /dev/xvdb* (xvdb is the Xen version, you may see sdb or some other combination.) *vgextend VolGroup00 /dev/xvdb* (Where VolGroup00 is the Volume Group you found before) *lvextend -l +100%FREE /dev/VolGroup00/lv-root* (Or where ever the LVM device is created. lvdisplay will show you this.) Then simply: *resize2fs /dev/VolGroup00/lv-root* to expand the filesystem on the new block device. Hope that helps. Cheers, Ian On 19 May 2016 at 05:33, Fred Smith <fredex at fcshome.stoneham.ma.us> wrote:> Hi all! > > I've got a VM at work running C6 on HyperV (no, its not my fault, > that's what the company uses. I'd rather gag myself than own one > of th ose things.) > > I ran out of disk space in the VM, so the admin enlarged the virtual disk. > but now I realize I don't know how to enlarge the partition and its > filesystem. > > I'll be googling, but in case I miss it, it'd be great if someone could > point me in the right direction. > > thanks! > > Fred > > -- > > ------------------------------------------------------------------------------- > Under no circumstances will I ever purchase anything offered to me as > the result of an unsolicited e-mail message. Nor will I forward chain > letters, petitions, mass mailings, or virus warnings to large numbers > of others. This is my contribution to the survival of the online > community. > --Roger Ebert, December, 1996 > ----------------------------- The Boulder Pledge > ----------------------------- > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >-- Please consider the impact on the environment before you print this email The information contained in this e-mail and any attachments are strictly private and confidential. This e-mail should only be read by the intended addressee. If you are not the intended addressee, you are strictly prohibited from using, reproducing, disclosing, or distributing the information contained herein and any attached files and/or documents. Unless stated otherwise, this email represents only the views of the sender and not the views of Herron Todd White. Before opening or using any files and/or attachments, we recommend you run your own virus protection, as although we will not knowingly transmit a virus, Herron Todd White accepts no liability for virus transmission. Liability limited by a scheme approved under Professional Standards Legislation. The scheme does not apply within Tasmania.
On 19/05/16 05:33, Fred Smith wrote:> I'll be googling, but in case I miss it, it'd be great if someone could > point me in the right direction. > > thanks! > > Fred >You'll need to use an external tool (such as gparted) to extend the partition to use up the new extent, then follow what Ian Brown suggested. Had the admin simply added a new drive, then you'd follow what Ian Brown recommended without having the need to use an external tool. My $0.02, ak.
On Thu, May 19, 2016 at 09:23:16AM +1000, Anthony K wrote:> On 19/05/16 05:33, Fred Smith wrote: > >I'll be googling, but in case I miss it, it'd be great if someone could > >point me in the right direction. > > > >thanks! > > > >Fred > > > You'll need to use an external tool (such as gparted) to extend the > partition to use up the new extent, then follow what Ian Brown > suggested.I've used gparted live cd a number of times, but don't think I knew that it handled lvm2 also. Since it does, if I resize the lvm, wouldn't the contained filesystem be automatically resized too? (as it has been when I've resized physical partitions containing NTFS and EXT2/3/4 filesystems.)> > Had the admin simply added a new drive, then you'd follow what Ian > Brown recommended without having the need to use an external tool.yeah, in hindsight (which is always 20-20) it would have been easier. A problem I have is that I have no admin access to the HyperV server, at all, AFAIK I cannot even boot up a live CD in that VM without getting admin help. I'd certainly want to do this resizing when the system in that VM is not running on the LVM I'm resizing, so I'll have to see if I can get the admin to boot up the gparted live cd for me. thanks to both you and Ian! Fred -- ---- Fred Smith -- fredex at fcshome.stoneham.ma.us ----------------------------- But God demonstrates his own love for us in this: While we were still sinners, Christ died for us. ------------------------------- Romans 5:8 (niv) ------------------------------
Can you get buy with using lvm features, i.e., just add the chunk to the volume you want. Use cfdisk to create a new partition (sudo cfdisk /dev/sda) Select the unused space, create new partition and then select write, then quit. reboot for changes to take. Go in to lvm, then finally use resize2fs and your extra space will now be used in the system. $ sudo lvm lvm> pvcreate /dev/sda4 Physical volume "/dev/sda4" successfully created lvm> pvs PV VG Fmt Attr PSize PFree /dev/sda2 vg_c6 lvm2 a-- 60.43g 0 /dev/sda3 vg_c6 lvm2 a-- 17.20g 0 /dev/sda4 lvm2 --- 19.53g 19.53g lvm> vgextend vg_c6 /dev/sda4 Volume group "vg_c6" successfully extended lvm> lvextend -l +100%FREE /dev/vg_c6/lv_home Size of logical volume vg_c6/lv_home changed from 22.06 GiB (5648 extents) to 41.59 GiB (10647 extents). Logical volume lv_home successfully resized lvm> quit Exiting. $ sudo resize2fs /dev/vg_c6/lv_home resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/vg_c6/lv_home is mounted on /home; on-line resizing required old desc_blocks = 1, new_desc_blocks = 3 Performing an on-line resize of /dev/vg_c6/lv_home to 10902528 (4k) blocks. The filesystem on /dev/vg_c6/lv_home is now 10902528 blocks long. ------------- -wes On Wed, May 18, 2016 at 1:33 PM, Fred Smith <fredex at fcshome.stoneham.ma.us> wrote:> Hi all! > > I've got a VM at work running C6 on HyperV (no, its not my fault, > that's what the company uses. I'd rather gag myself than own one > of th ose things.) > > I ran out of disk space in the VM, so the admin enlarged the virtual disk. > but now I realize I don't know how to enlarge the partition and its > filesystem. > > I'll be googling, but in case I miss it, it'd be great if someone could > point me in the right direction. > > thanks! > > Fred > > -- > > ------------------------------------------------------------------------------- > Under no circumstances will I ever purchase anything offered to me as > the result of an unsolicited e-mail message. Nor will I forward chain > letters, petitions, mass mailings, or virus warnings to large numbers > of others. This is my contribution to the survival of the online > community. > --Roger Ebert, December, 1996 > ----------------------------- The Boulder Pledge > ----------------------------- > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >