LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-14-2014, 09:38 AM   #1
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Rep: Reputation: Disabled
Expanding root partition


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.
 
Old 09-14-2014, 11:17 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,225

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
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.

http://social.technet.microsoft.com/...v-2008-r2.aspx

If that doesn't help you should search online for increasing the size of the virtual drive.
 
1 members found this post helpful.
Old 09-14-2014, 12:11 PM   #3
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
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
 
Old 09-14-2014, 03:59 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,225

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
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.

http://technet.microsoft.com/en-us/l.../dn282284.aspx

Last edited by yancek; 09-14-2014 at 04:00 PM.
 
Old 09-15-2014, 02:23 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,533

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
I don't see why this is a M$oft issue - as far as the guest is concerned, it's a real disk. Run this as root/sudo and post the output
Code:
parted /dev/sda "print free"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] trouble expanding 4+TB GPT partition after expanding hardware RAID-5 volume muad'dib Linux - Enterprise 6 09-26-2009 05:01 PM
Expanding Root Partition and Other Partitions scoobs Linux - Software 2 12-06-2005 02:57 AM
expanding root partition... DaVenom Linux - General 4 09-11-2005 01:19 AM
Expanding root partition? biniar Linux - Newbie 1 04-07-2004 01:59 PM
Expanding a partition echid Linux - General 1 08-12-2002 10:21 AM


All times are GMT -5. The time now is 05:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration