Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post/2012-10-24-resizing-virtual-disk/ #36

Open
utterances-bot opened this issue Nov 26, 2023 · 1 comment
Open

post/2012-10-24-resizing-virtual-disk/ #36

utterances-bot opened this issue Nov 26, 2023 · 1 comment

Comments

@utterances-bot
Copy link

Growing a filesystem on a virtual disk :: blog.oddbit.com

Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:
You’re using legacy disk partitions. The process for LVM is similar and I will describe that in another post (it’s generally identical except for an additional pvresize thrown in and lvextend in place of resize2fs).

https://blog.oddbit.com/post/2012-10-24-resizing-virtual-disk/

Copy link

ntzb commented Nov 26, 2023

Hi Lars,
can you say what should be done if the partition is not last, but first?
in my situation, I've already used qemu-img to resize with +5G.

linux@debian:~$ df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       8.9G  5.1G  3.4G  61% /

and in root, from fdisk:

root@debian:~# fdisk /dev/vda
...
Command (m for help): p
Disk /dev/vda: 15 GiB, 16106127360 bytes, 31457280 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1d220feb

Device     Boot    Start      End  Sectors  Size Id Type
/dev/vda1  *        2048 18970623 18968576    9G 83 Linux
/dev/vda2       18972670 20969471  1996802  975M  5 Extended
/dev/vda5       18972672 20969471  1996800  975M 82 Linux swap / Solaris

p.s. took me a while to find the original post, I wonder why you took the github gist down?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants