LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-05-2018, 11:30 AM   #1
katsumoto87
LQ Newbie
 
Registered: Oct 2018
Posts: 1

Rep: Reputation: Disabled
how can i extend a partition knowing that All primary partitions are in use


hi,
i'm newbie
i have a vm with 100G i added ~50Gi
now i need to apply it
the problem is i dont have available partitions

fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 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
Disk identifier: 0x0006f595

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 41940991 20719617 5 Extended
/dev/sda3 41940992 104857599 31458304 8e Linux LVM
/dev/sda4 104857600 209715199 52428800 8e Linux LVM
/dev/sda5 501760 41940991 20719616 8e Linux LVM

Command (m for help): n
All primary partitions are in use
Adding logical partition 6
No free sectors available


any suggestions?
 
Old 10-05-2018, 11:37 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I do not know LVM, but my partitions are as such using both primary and extended dos partitioning.
Code:
Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048   1126399   1124352   549M  7 HPFS/NTFS/exFAT
/dev/sda2         1126400 204802047 203675648  97.1G  7 HPFS/NTFS/exFAT
/dev/sda3       204802048 256002047  51200000  24.4G 83 Linux
/dev/sda4       256004094 488396799 232392706 110.8G  5 Extended
/dev/sda5       256004096 311300095  55296000  26.4G 83 Linux
/dev/sda6       311302144 366598143  55296000  26.4G 83 Linux
/dev/sda7       366600192 421897066  55296875  26.4G 83 Linux
/dev/sda8       421898240 488396799  66498560  31.7G 83 Linux
first 3 are primary, 4th is primary,extended place holder (for a lack of not knowing how it is put) the remaining 4 are extended partitions.

it looks like you used only one primary then went to extended removing 3 more primary you could have used. you are only allowed 4 each.

Last edited by BW-userx; 10-05-2018 at 11:39 AM.
 
Old 10-05-2018, 11:45 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
https://www.startpage.com/do/dsearch...+lvm+partition
 
Old 10-05-2018, 01:07 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by katsumoto87 View Post
Code:
Disk /dev/sda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 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
Disk identifier: 0x0006f595

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758    41940991    20719617    5  Extended
/dev/sda3        41940992   104857599    31458304   8e  Linux LVM
/dev/sda4       104857600   209715199    52428800   8e  Linux LVM
/dev/sda5          501760    41940991    20719616   8e  Linux LVM
You have boxed yourseof in quite effectively. Since your extended partition is sandwiched in between other primary partitions and thus cannot be expanded, the only thing you can do without completely reorganizing the disk is to expand sda4. You can then use pvresize and vgextend to make that space available to the existing volume group, and then either create new LVs there or extend the existing LVs into that space.
 
  


Reply



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
4 primary disk partitions; none spare to extend, what to do jal General 18 01-14-2015 06:58 AM
[SOLVED] How can I change an extended partition with 3 logical partitions to 3 primary bubuntu Linux - General 18 06-03-2010 07:37 AM
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 06:55 PM
could not allocate partitions as primary partition? syph0n Linux - Newbie 3 07-14-2003 08:45 PM
setting up a linux partition and primary/extended partitions joemamma Linux - Newbie 6 02-23-2003 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:52 AM.

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
Open Source Consulting | Domain Registration