extended root partition debian

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















I user to RedHat and Centos. I need to add storage to root partition, and I just don't understand what is happening.



My df -h:



guy@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 395M 424K 395M 1% /run
/dev/mapper/ubuntu--vg-root 23G 18G 4.1G 81% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 70M 154M 32% /boot


MY cfdisk:



 Disk Drive: /dev/sda
Size: 26843545600 bytes, 26.8 GB
Heads: 255 Sectors per Track: 63 Cylinders: 3263

Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
Primary Free Space 1.05 *
sda1 Boot Primary ext2 254.81 *
Pri/Log Free Space 1.05 *
sda5 NC Logical LVM2_member 26585.60 *
Pri/Log Free Space 1.05 *


and my fdisk -> p



Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders, total 52428800 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
Disk identifier: 0x00092c8e

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 52426751 25962497 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 501760 52426751 25962496 8e Linux LVM


I know that there is no much free space now, buy yesterday I tried to extend to 60GB. There was space to extend, but I failed.



I need to extend the root partition:



/dev/mapper/ubuntu--vg-root


from cfdisk it looks like its /dev/sda5
But if fdisk it looks like sda5 and sda2 overlaps.



I don't have physical access to the vm - so GParted is out of the question.
What I don't understand it why there is an overlaps between sda2 and sda5?



When I tried to remove sda2 it removed sda5 as well. And the reboot failed.
When I removed only sda5 I couldn't start on the same block as it was in fdisk p.



What I want to know:
What is the difference between extendet and linux LVM volumes?
Why do they overlaps?
And is there a way for me to extend the root partition?










share|improve this question



















  • 2





    The partitions don't overlap, the LVM partition (sda5) is on top of the extended partition (sda2), that's why they are both deleted if you try to delete one. Can you show output of vgs? It should show you how much free space your volume group has. How exactly do you get the 60 GB? Your sda disk only has a size of 26.8 GB. If you get more disk space you can add another physical volume and extend your volume group, then grow your root LVM.

    – eblock
    Feb 6 at 9:34











  • I know. There was 60 GB yesterday. I saved all the disk as a copy, and after ruining it, I moved back to the backup. That is not the problem.

    – matisa
    Feb 6 at 11:42















0















I user to RedHat and Centos. I need to add storage to root partition, and I just don't understand what is happening.



My df -h:



guy@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 395M 424K 395M 1% /run
/dev/mapper/ubuntu--vg-root 23G 18G 4.1G 81% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 70M 154M 32% /boot


MY cfdisk:



 Disk Drive: /dev/sda
Size: 26843545600 bytes, 26.8 GB
Heads: 255 Sectors per Track: 63 Cylinders: 3263

Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
Primary Free Space 1.05 *
sda1 Boot Primary ext2 254.81 *
Pri/Log Free Space 1.05 *
sda5 NC Logical LVM2_member 26585.60 *
Pri/Log Free Space 1.05 *


and my fdisk -> p



Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders, total 52428800 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
Disk identifier: 0x00092c8e

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 52426751 25962497 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 501760 52426751 25962496 8e Linux LVM


I know that there is no much free space now, buy yesterday I tried to extend to 60GB. There was space to extend, but I failed.



I need to extend the root partition:



/dev/mapper/ubuntu--vg-root


from cfdisk it looks like its /dev/sda5
But if fdisk it looks like sda5 and sda2 overlaps.



I don't have physical access to the vm - so GParted is out of the question.
What I don't understand it why there is an overlaps between sda2 and sda5?



When I tried to remove sda2 it removed sda5 as well. And the reboot failed.
When I removed only sda5 I couldn't start on the same block as it was in fdisk p.



What I want to know:
What is the difference between extendet and linux LVM volumes?
Why do they overlaps?
And is there a way for me to extend the root partition?










share|improve this question



















  • 2





    The partitions don't overlap, the LVM partition (sda5) is on top of the extended partition (sda2), that's why they are both deleted if you try to delete one. Can you show output of vgs? It should show you how much free space your volume group has. How exactly do you get the 60 GB? Your sda disk only has a size of 26.8 GB. If you get more disk space you can add another physical volume and extend your volume group, then grow your root LVM.

    – eblock
    Feb 6 at 9:34











  • I know. There was 60 GB yesterday. I saved all the disk as a copy, and after ruining it, I moved back to the backup. That is not the problem.

    – matisa
    Feb 6 at 11:42













0












0








0


1






I user to RedHat and Centos. I need to add storage to root partition, and I just don't understand what is happening.



My df -h:



guy@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 395M 424K 395M 1% /run
/dev/mapper/ubuntu--vg-root 23G 18G 4.1G 81% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 70M 154M 32% /boot


MY cfdisk:



 Disk Drive: /dev/sda
Size: 26843545600 bytes, 26.8 GB
Heads: 255 Sectors per Track: 63 Cylinders: 3263

Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
Primary Free Space 1.05 *
sda1 Boot Primary ext2 254.81 *
Pri/Log Free Space 1.05 *
sda5 NC Logical LVM2_member 26585.60 *
Pri/Log Free Space 1.05 *


and my fdisk -> p



Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders, total 52428800 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
Disk identifier: 0x00092c8e

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 52426751 25962497 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 501760 52426751 25962496 8e Linux LVM


I know that there is no much free space now, buy yesterday I tried to extend to 60GB. There was space to extend, but I failed.



I need to extend the root partition:



/dev/mapper/ubuntu--vg-root


from cfdisk it looks like its /dev/sda5
But if fdisk it looks like sda5 and sda2 overlaps.



I don't have physical access to the vm - so GParted is out of the question.
What I don't understand it why there is an overlaps between sda2 and sda5?



When I tried to remove sda2 it removed sda5 as well. And the reboot failed.
When I removed only sda5 I couldn't start on the same block as it was in fdisk p.



What I want to know:
What is the difference between extendet and linux LVM volumes?
Why do they overlaps?
And is there a way for me to extend the root partition?










share|improve this question
















I user to RedHat and Centos. I need to add storage to root partition, and I just don't understand what is happening.



My df -h:



guy@ubuntu:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 395M 424K 395M 1% /run
/dev/mapper/ubuntu--vg-root 23G 18G 4.1G 81% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda1 236M 70M 154M 32% /boot


MY cfdisk:



 Disk Drive: /dev/sda
Size: 26843545600 bytes, 26.8 GB
Heads: 255 Sectors per Track: 63 Cylinders: 3263

Name Flags Part Type FS Type [Label] Size (MB)
----------------------------------------------------------------------------
Primary Free Space 1.05 *
sda1 Boot Primary ext2 254.81 *
Pri/Log Free Space 1.05 *
sda5 NC Logical LVM2_member 26585.60 *
Pri/Log Free Space 1.05 *


and my fdisk -> p



Disk /dev/sda: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders, total 52428800 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
Disk identifier: 0x00092c8e

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 52426751 25962497 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 501760 52426751 25962496 8e Linux LVM


I know that there is no much free space now, buy yesterday I tried to extend to 60GB. There was space to extend, but I failed.



I need to extend the root partition:



/dev/mapper/ubuntu--vg-root


from cfdisk it looks like its /dev/sda5
But if fdisk it looks like sda5 and sda2 overlaps.



I don't have physical access to the vm - so GParted is out of the question.
What I don't understand it why there is an overlaps between sda2 and sda5?



When I tried to remove sda2 it removed sda5 as well. And the reboot failed.
When I removed only sda5 I couldn't start on the same block as it was in fdisk p.



What I want to know:
What is the difference between extendet and linux LVM volumes?
Why do they overlaps?
And is there a way for me to extend the root partition?







debian ubuntu lvm






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 6 at 10:11









Rui F Ribeiro

40.7k1479137




40.7k1479137










asked Feb 6 at 9:10









matisamatisa

479




479







  • 2





    The partitions don't overlap, the LVM partition (sda5) is on top of the extended partition (sda2), that's why they are both deleted if you try to delete one. Can you show output of vgs? It should show you how much free space your volume group has. How exactly do you get the 60 GB? Your sda disk only has a size of 26.8 GB. If you get more disk space you can add another physical volume and extend your volume group, then grow your root LVM.

    – eblock
    Feb 6 at 9:34











  • I know. There was 60 GB yesterday. I saved all the disk as a copy, and after ruining it, I moved back to the backup. That is not the problem.

    – matisa
    Feb 6 at 11:42












  • 2





    The partitions don't overlap, the LVM partition (sda5) is on top of the extended partition (sda2), that's why they are both deleted if you try to delete one. Can you show output of vgs? It should show you how much free space your volume group has. How exactly do you get the 60 GB? Your sda disk only has a size of 26.8 GB. If you get more disk space you can add another physical volume and extend your volume group, then grow your root LVM.

    – eblock
    Feb 6 at 9:34











  • I know. There was 60 GB yesterday. I saved all the disk as a copy, and after ruining it, I moved back to the backup. That is not the problem.

    – matisa
    Feb 6 at 11:42







2




2





The partitions don't overlap, the LVM partition (sda5) is on top of the extended partition (sda2), that's why they are both deleted if you try to delete one. Can you show output of vgs? It should show you how much free space your volume group has. How exactly do you get the 60 GB? Your sda disk only has a size of 26.8 GB. If you get more disk space you can add another physical volume and extend your volume group, then grow your root LVM.

– eblock
Feb 6 at 9:34





The partitions don't overlap, the LVM partition (sda5) is on top of the extended partition (sda2), that's why they are both deleted if you try to delete one. Can you show output of vgs? It should show you how much free space your volume group has. How exactly do you get the 60 GB? Your sda disk only has a size of 26.8 GB. If you get more disk space you can add another physical volume and extend your volume group, then grow your root LVM.

– eblock
Feb 6 at 9:34













I know. There was 60 GB yesterday. I saved all the disk as a copy, and after ruining it, I moved back to the backup. That is not the problem.

– matisa
Feb 6 at 11:42





I know. There was 60 GB yesterday. I saved all the disk as a copy, and after ruining it, I moved back to the backup. That is not the problem.

– matisa
Feb 6 at 11:42










1 Answer
1






active

oldest

votes


















1














Why the overlap



In the early days of the PC, it was though that 4 partitions was enough for anyone.
Later we realised that we were wrong, so we added extended partitions, an extended partition contains another partition table, and some partitions. In Linux partitions 1→4 are the original partitions (named physical partitions, though they are no more physical than any other), and 5 onward are for the so called logical partitions, that sit inside one of the extended partitions (on of the physical partitions).



How to extend.



You may need to run from another OS (live), because editing a running file-system will not end well.



An alternative



Create a new partition with the free space.
Copy some directories to the new partition, and create symbolic links from the /root to the new partition.



E.g.



Mount new partition onto /big-partition, then



mv -T /home /big-partition/home
ln -s -T /big-partition/home /home


You can do this for other directories, as well. Use kdirstat, or other tool to find big directories, only move those that are not critical to OS operation.






share|improve this answer























  • But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

    – matisa
    Feb 6 at 11:46










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498996%2fextended-root-partition-debian%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Why the overlap



In the early days of the PC, it was though that 4 partitions was enough for anyone.
Later we realised that we were wrong, so we added extended partitions, an extended partition contains another partition table, and some partitions. In Linux partitions 1→4 are the original partitions (named physical partitions, though they are no more physical than any other), and 5 onward are for the so called logical partitions, that sit inside one of the extended partitions (on of the physical partitions).



How to extend.



You may need to run from another OS (live), because editing a running file-system will not end well.



An alternative



Create a new partition with the free space.
Copy some directories to the new partition, and create symbolic links from the /root to the new partition.



E.g.



Mount new partition onto /big-partition, then



mv -T /home /big-partition/home
ln -s -T /big-partition/home /home


You can do this for other directories, as well. Use kdirstat, or other tool to find big directories, only move those that are not critical to OS operation.






share|improve this answer























  • But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

    – matisa
    Feb 6 at 11:46















1














Why the overlap



In the early days of the PC, it was though that 4 partitions was enough for anyone.
Later we realised that we were wrong, so we added extended partitions, an extended partition contains another partition table, and some partitions. In Linux partitions 1→4 are the original partitions (named physical partitions, though they are no more physical than any other), and 5 onward are for the so called logical partitions, that sit inside one of the extended partitions (on of the physical partitions).



How to extend.



You may need to run from another OS (live), because editing a running file-system will not end well.



An alternative



Create a new partition with the free space.
Copy some directories to the new partition, and create symbolic links from the /root to the new partition.



E.g.



Mount new partition onto /big-partition, then



mv -T /home /big-partition/home
ln -s -T /big-partition/home /home


You can do this for other directories, as well. Use kdirstat, or other tool to find big directories, only move those that are not critical to OS operation.






share|improve this answer























  • But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

    – matisa
    Feb 6 at 11:46













1












1








1







Why the overlap



In the early days of the PC, it was though that 4 partitions was enough for anyone.
Later we realised that we were wrong, so we added extended partitions, an extended partition contains another partition table, and some partitions. In Linux partitions 1→4 are the original partitions (named physical partitions, though they are no more physical than any other), and 5 onward are for the so called logical partitions, that sit inside one of the extended partitions (on of the physical partitions).



How to extend.



You may need to run from another OS (live), because editing a running file-system will not end well.



An alternative



Create a new partition with the free space.
Copy some directories to the new partition, and create symbolic links from the /root to the new partition.



E.g.



Mount new partition onto /big-partition, then



mv -T /home /big-partition/home
ln -s -T /big-partition/home /home


You can do this for other directories, as well. Use kdirstat, or other tool to find big directories, only move those that are not critical to OS operation.






share|improve this answer













Why the overlap



In the early days of the PC, it was though that 4 partitions was enough for anyone.
Later we realised that we were wrong, so we added extended partitions, an extended partition contains another partition table, and some partitions. In Linux partitions 1→4 are the original partitions (named physical partitions, though they are no more physical than any other), and 5 onward are for the so called logical partitions, that sit inside one of the extended partitions (on of the physical partitions).



How to extend.



You may need to run from another OS (live), because editing a running file-system will not end well.



An alternative



Create a new partition with the free space.
Copy some directories to the new partition, and create symbolic links from the /root to the new partition.



E.g.



Mount new partition onto /big-partition, then



mv -T /home /big-partition/home
ln -s -T /big-partition/home /home


You can do this for other directories, as well. Use kdirstat, or other tool to find big directories, only move those that are not critical to OS operation.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 6 at 10:29









ctrl-alt-delorctrl-alt-delor

11.8k42159




11.8k42159












  • But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

    – matisa
    Feb 6 at 11:46

















  • But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

    – matisa
    Feb 6 at 11:46
















But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

– matisa
Feb 6 at 11:46





But I need to extend the root partition. And if that is the case about the extend. Don't I need to extend the extend first before adding or enlarging the logical partition?

– matisa
Feb 6 at 11:46

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498996%2fextended-root-partition-debian%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay