Re: resizing qemu image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 7/21/21 4:50 PM, Robert Moskowitz wrote:
Looks the next step is:

lvextend -r -l +100%FREE /dev/vga2/root

that is /dev/vda2/root

and did not work:

ah...

]# lvextend -r -l +100%FREE /dev/fedora/root
  Size of logical volume fedora/root changed from 8.47 GiB (2168 extents) to 18.51 GiB (4738 extents).
  Logical volume root successfully resized
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/mapper/fedora-root is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mapper/fedora-root is now 4851712 (4k) blocks long.

and that worked.  Will reboot before doing anything else.


?

this is from:

https://computingforgeeks.com/extending-root-filesystem-using-lvm-linux/



On 7/21/21 4:39 PM, Robert Moskowitz wrote:


On 7/21/21 4:28 PM, Jamie Fargen wrote:

Is it possible for you to keep the backup for now?

If so run the following commands:
1) Keep the backup
# mv /var/lib/libvirt/images/fedora21.qcow2  /var/lib/libvirt/images/fedora21.qcow2.orig
2) Copy the resized qcow2 from thumb drive to /var/lib/libvirt/images/fedora21.qcow2
3) Boot up the VM and provide the following output:
# fdisk -l
# pvdisplay
  --- Physical volume ---
  PV Name               /dev/vda2
  VG Name               fedora
  PV Size               19.51 GiB / not usable 2.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              4994
  Free PE               2570
  Allocated PE          2424
  PV UUID               YmdEGp-gb7o-Gqm4-qfUG-Emi1-92hX-uoXKd8


# lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora/swap
  LV Name                swap
  VG Name                fedora
  LV UUID                wcCMpc-LjV4-ahaQ-dLnZ-rIfx-5MBS-yGrGPT
  LV Write Access        read/write
  LV Creation host, time localhost, 2014-12-31 10:29:38 -0500
  LV Status              available
  # open                 2
  LV Size                1.00 GiB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
  
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                k5Iqpt-dGBC-V4jJ-2UPn-sG2w-dwc5-npzUHl
  LV Write Access        read/write
  LV Creation host, time localhost, 2014-12-31 10:29:41 -0500
  LV Status              available
  # open                 1
  LV Size                8.47 GiB
  Current LE             2168
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

# vgdisplay

  --- Volume group ---
  VG Name               fedora
  System ID            
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               19.51 GiB
  PE Size               4.00 MiB
  Total PE              4994
  Alloc PE / Size       2424 / 9.47 GiB
  Free  PE / Size       2570 / 10.04 GiB
  VG UUID               SEGNhI-DBMm-dnsm-fFRT-ZfPA-0403-EKmNJG



Once this info is provided we can advise on how to expand the filesystem.

gparted increased the partition size of vga2, but now I need to grow the root in it.  It has been too many years since I use to do this stuff.  :(


Regards,
-Jamie

On Wed, Jul 21, 2021 at 4:10 PM Peter Boy <pboy@xxxxxxxxxxxxx> wrote:


> Am 21.07.2021 um 21:46 schrieb Robert Moskowitz <rgm@xxxxxxxxxxxxxxx>:
>
>>> But now the instructions I am finding seem to offer different approachs, and might not be for running on Fedora.  What is the 'best' approach forward?
>> To what instructions do you refer?
>
> How do I actually increase the partitions within the image?
>

You have (re)start the virtual machine and increase and reorganise your storage from inside the virtual machine the same way as your would do it with a physical machine.

The details depend on the current structure of your (virtual) disk. How did you originally create your VMs disk image?

Usually you may have:
Partition 1: biosboot or efi
Partition 2: Linux file system /boot
Partition 3:
   either (a) a filesystem containing all your data
   or (b) a LVM VG, containing a logical volume with a file system for root.

What is your storage structure?

You may find some Fedora specific  into at:

https://docs.fedoraproject.org/en-US/fedora-server/virtualization-vmcloud/


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux