Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My disk (a Hyper-V "*.vhdx" virtual disk) is partitioned as follows:
Code:
Disk /dev/sda: 127 GiB, 136365211648 bytes, 266338304 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: 0x0005a8e2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2 499712 8308735 7809024 3.7G 82 Linux swap / Solaris
/dev/sda3 8308736 266338303 258029568 123G 83 Linux
I now realize that I need to expand /sda3 significantly. How can I do that non-destructively? Note that the physical HDD, onto which the Hyper-V disk is hosted, is a 4-terabyte drive; hence there is (in principle) plenty of space to expand.
You can't expand sda3 as your partitions are already taking up the entire virtual drive. You need to expand the drive itself. I don't use Hyper-V but the link below explains this on version 2.0. Might give you a start.
Thanks Yancek - much appreciated. I have now expanded the host V-disk to 3 Terabytes. See below. Now I am back to my original question: what can I do in order to expand sda3 without bricking my virtual machine? Which of the many archlinux partitioning tools should I use, and what should I exactly do? I seem to understand that there are crucial differences between MBR and GPT, and would not want to mess up things and end up having to reinstall from scratch...
Code:
Disk /dev/sda: 3 TiB, 3221225472000 bytes, 6291456000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0005a8e2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2 499712 8308735 7809024 3.7G 82 Linux swap / Solaris
/dev/sda3 8308736 266338303 258029568 123G 83 Linux
The third option at the site below under "Expand the volume of a virtual hard disk connected to a virtual machine" seems to explain it. It also has the same explanation as the link I posted above to expand the virtual drive. You are usually better off getting answers to questions about microsoft software at their site or windows forums.
I'm not sure how it would work trying to use Linux tools inside the virtual machine not knowing which is your / partition in particular.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.