How to enlarge this partition? Announcing the arrival of Valued Associate #679: Cesar Manara ...

If a contract sometimes uses the wrong name, is it still valid?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Is it fair for a professor to grade us on the possession of past papers?

String `!23` is replaced with `docker` in command line

What would be the ideal power source for a cybernetic eye?

Identifying polygons that intersect with another layer using QGIS?

When do you get frequent flier miles - when you buy, or when you fly?

Resolving to minmaj7

At the end of Thor: Ragnarok why don't the Asgardians turn and head for the Bifrost as per their original plan?

How to answer "Have you ever been terminated?"

How to bypass password on Windows XP account?

Seeking colloquialism for “just because”

Using audio cues to encourage good posture

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

What does this icon in iOS Stardew Valley mean?

Why did the Falcon Heavy center core fall off the ASDS OCISLY barge?

How to find out what spells would be useless to a blind NPC spellcaster?

Output the ŋarâþ crîþ alphabet song without using (m)any letters

Why aren't air breathing engines used as small first stages

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

Do I really need recursive chmod to restrict access to a folder?

What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?

List *all* the tuples!

Extract all GPU name, model and GPU ram



How to enlarge this partition?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionManually cloning a Live USB Arch distro to a VMware virtual diskLVM - failed to install bootloaderHow to mount sdb directly or using LVM partitions on sda?Expanding root partition CentOS 6 With using fdiskXen domU not resizing diskHow to extend logical & extended partition with fdiskExtend partition using LVMOptimal LVM Setup to Keep Adding Space to Single MountpointI have a dedicated with 2 SSDs, how to I group them to behave as 1?How to calculate partition Start End Sector?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Inside vmware ESXI I have a centos virtual machine, and I resized the virtual disk from around 30 GB to 120 GB using vmware "edit" vm menu.



Then I booted using a gparted bootable ISO and resized the partition from 30GB to maximum (120 GB)



But now when I boot I still see the main partition (/root) as around 25 GB.
From what I can tell (below code) the disk is seen as ~120GB but not the partitions ?



What commands to run in order to safely expand the partition ?
I think that is /root that needs to be expanded.



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 26G 1.6G 25G 6% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.9M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 145M 870M 15% /boot
tmpfs 783M 0 783M 0% /run/user/0


[root@localhost ~]# fdisk -l

Disk /dev/sda: 128.8 GB, 128849018880 bytes, 251658240 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 label type: dos
Disk identifier: 0x000d5212

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 251658239 124779520 8e Linux LVM

Disk /dev/mapper/centos-root: 27.9 GB, 27913093120 bytes, 54517760 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 /dev/mapper/centos-swap: 3221 MB, 3221225472 bytes, 6291456 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


EDIT:



[root@localhost ~]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs 2499226d-4c93-4ef1-b4ab-1055f8bab7cd /boot
└─sda2 LVM2_member 49Sk0d-ClAm-FGza-9HrJ-hYGP-V1Zn-UlrgaO
├─centos-root xfs f78ccb25-5dcc-49fc-81b8-5c33e6b5e9ef /
└─centos-swap swap 100d2a33-ab8d-4dd8-8e6c-19d51ad53a40 [SWAP]
sr0

[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a-- <119.00g 90.00g


EDIT 2:



[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <119.00 GiB
PE Size 4.00 MiB
Total PE 30463
Alloc PE / Size 7423 / <29.00 GiB
Free PE / Size 23040 / 90.00 GiB
VG UUID dpAjcO-xazq-6sJZ-PA23-N0a0-Zcz3-iRVloi



[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID ZuJyt6-YDaV-1kw7-Zjzl-4gPX-vkzH-dfmV7y
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:02 -0400
LV Status available
# open 2
LV Size 3.00 GiB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID KkcOnV-OQvj-lpmc-5Eiz-2hfd-6mcV-30zWvW
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:03 -0400
LV Status available
# open 1
LV Size <26.00 GiB
Current LE 6655
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0









share|improve this question




















  • 1





    You have a logical volumes which you need to extend. Add the output of lsblk -f as well as pvs and vgdisplay and lvdisplay to your question.

    – Nasir Riley
    3 hours ago













  • I added lsblk -f and pvs

    – adrianTNT
    3 hours ago











  • Also add vgdisplay and lvdisplay. Do you want to extend to all of the free space that you added?

    – Nasir Riley
    3 hours ago













  • Added vgdisplay and lvdisplay. Yes, I want to expand to that full space (~120 GB)

    – adrianTNT
    3 hours ago




















0















Inside vmware ESXI I have a centos virtual machine, and I resized the virtual disk from around 30 GB to 120 GB using vmware "edit" vm menu.



Then I booted using a gparted bootable ISO and resized the partition from 30GB to maximum (120 GB)



But now when I boot I still see the main partition (/root) as around 25 GB.
From what I can tell (below code) the disk is seen as ~120GB but not the partitions ?



What commands to run in order to safely expand the partition ?
I think that is /root that needs to be expanded.



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 26G 1.6G 25G 6% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.9M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 145M 870M 15% /boot
tmpfs 783M 0 783M 0% /run/user/0


[root@localhost ~]# fdisk -l

Disk /dev/sda: 128.8 GB, 128849018880 bytes, 251658240 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 label type: dos
Disk identifier: 0x000d5212

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 251658239 124779520 8e Linux LVM

Disk /dev/mapper/centos-root: 27.9 GB, 27913093120 bytes, 54517760 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 /dev/mapper/centos-swap: 3221 MB, 3221225472 bytes, 6291456 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


EDIT:



[root@localhost ~]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs 2499226d-4c93-4ef1-b4ab-1055f8bab7cd /boot
└─sda2 LVM2_member 49Sk0d-ClAm-FGza-9HrJ-hYGP-V1Zn-UlrgaO
├─centos-root xfs f78ccb25-5dcc-49fc-81b8-5c33e6b5e9ef /
└─centos-swap swap 100d2a33-ab8d-4dd8-8e6c-19d51ad53a40 [SWAP]
sr0

[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a-- <119.00g 90.00g


EDIT 2:



[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <119.00 GiB
PE Size 4.00 MiB
Total PE 30463
Alloc PE / Size 7423 / <29.00 GiB
Free PE / Size 23040 / 90.00 GiB
VG UUID dpAjcO-xazq-6sJZ-PA23-N0a0-Zcz3-iRVloi



[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID ZuJyt6-YDaV-1kw7-Zjzl-4gPX-vkzH-dfmV7y
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:02 -0400
LV Status available
# open 2
LV Size 3.00 GiB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID KkcOnV-OQvj-lpmc-5Eiz-2hfd-6mcV-30zWvW
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:03 -0400
LV Status available
# open 1
LV Size <26.00 GiB
Current LE 6655
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0









share|improve this question




















  • 1





    You have a logical volumes which you need to extend. Add the output of lsblk -f as well as pvs and vgdisplay and lvdisplay to your question.

    – Nasir Riley
    3 hours ago













  • I added lsblk -f and pvs

    – adrianTNT
    3 hours ago











  • Also add vgdisplay and lvdisplay. Do you want to extend to all of the free space that you added?

    – Nasir Riley
    3 hours ago













  • Added vgdisplay and lvdisplay. Yes, I want to expand to that full space (~120 GB)

    – adrianTNT
    3 hours ago
















0












0








0








Inside vmware ESXI I have a centos virtual machine, and I resized the virtual disk from around 30 GB to 120 GB using vmware "edit" vm menu.



Then I booted using a gparted bootable ISO and resized the partition from 30GB to maximum (120 GB)



But now when I boot I still see the main partition (/root) as around 25 GB.
From what I can tell (below code) the disk is seen as ~120GB but not the partitions ?



What commands to run in order to safely expand the partition ?
I think that is /root that needs to be expanded.



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 26G 1.6G 25G 6% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.9M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 145M 870M 15% /boot
tmpfs 783M 0 783M 0% /run/user/0


[root@localhost ~]# fdisk -l

Disk /dev/sda: 128.8 GB, 128849018880 bytes, 251658240 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 label type: dos
Disk identifier: 0x000d5212

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 251658239 124779520 8e Linux LVM

Disk /dev/mapper/centos-root: 27.9 GB, 27913093120 bytes, 54517760 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 /dev/mapper/centos-swap: 3221 MB, 3221225472 bytes, 6291456 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


EDIT:



[root@localhost ~]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs 2499226d-4c93-4ef1-b4ab-1055f8bab7cd /boot
└─sda2 LVM2_member 49Sk0d-ClAm-FGza-9HrJ-hYGP-V1Zn-UlrgaO
├─centos-root xfs f78ccb25-5dcc-49fc-81b8-5c33e6b5e9ef /
└─centos-swap swap 100d2a33-ab8d-4dd8-8e6c-19d51ad53a40 [SWAP]
sr0

[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a-- <119.00g 90.00g


EDIT 2:



[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <119.00 GiB
PE Size 4.00 MiB
Total PE 30463
Alloc PE / Size 7423 / <29.00 GiB
Free PE / Size 23040 / 90.00 GiB
VG UUID dpAjcO-xazq-6sJZ-PA23-N0a0-Zcz3-iRVloi



[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID ZuJyt6-YDaV-1kw7-Zjzl-4gPX-vkzH-dfmV7y
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:02 -0400
LV Status available
# open 2
LV Size 3.00 GiB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID KkcOnV-OQvj-lpmc-5Eiz-2hfd-6mcV-30zWvW
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:03 -0400
LV Status available
# open 1
LV Size <26.00 GiB
Current LE 6655
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0









share|improve this question
















Inside vmware ESXI I have a centos virtual machine, and I resized the virtual disk from around 30 GB to 120 GB using vmware "edit" vm menu.



Then I booted using a gparted bootable ISO and resized the partition from 30GB to maximum (120 GB)



But now when I boot I still see the main partition (/root) as around 25 GB.
From what I can tell (below code) the disk is seen as ~120GB but not the partitions ?



What commands to run in order to safely expand the partition ?
I think that is /root that needs to be expanded.



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 26G 1.6G 25G 6% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.9M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda1 1014M 145M 870M 15% /boot
tmpfs 783M 0 783M 0% /run/user/0


[root@localhost ~]# fdisk -l

Disk /dev/sda: 128.8 GB, 128849018880 bytes, 251658240 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 label type: dos
Disk identifier: 0x000d5212

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 251658239 124779520 8e Linux LVM

Disk /dev/mapper/centos-root: 27.9 GB, 27913093120 bytes, 54517760 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 /dev/mapper/centos-swap: 3221 MB, 3221225472 bytes, 6291456 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


EDIT:



[root@localhost ~]# lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 xfs 2499226d-4c93-4ef1-b4ab-1055f8bab7cd /boot
└─sda2 LVM2_member 49Sk0d-ClAm-FGza-9HrJ-hYGP-V1Zn-UlrgaO
├─centos-root xfs f78ccb25-5dcc-49fc-81b8-5c33e6b5e9ef /
└─centos-swap swap 100d2a33-ab8d-4dd8-8e6c-19d51ad53a40 [SWAP]
sr0

[root@localhost ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a-- <119.00g 90.00g


EDIT 2:



[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <119.00 GiB
PE Size 4.00 MiB
Total PE 30463
Alloc PE / Size 7423 / <29.00 GiB
Free PE / Size 23040 / 90.00 GiB
VG UUID dpAjcO-xazq-6sJZ-PA23-N0a0-Zcz3-iRVloi



[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV UUID ZuJyt6-YDaV-1kw7-Zjzl-4gPX-vkzH-dfmV7y
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:02 -0400
LV Status available
# open 2
LV Size 3.00 GiB
Current LE 768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV UUID KkcOnV-OQvj-lpmc-5Eiz-2hfd-6mcV-30zWvW
LV Write Access read/write
LV Creation host, time localhost, 2019-04-01 19:44:03 -0400
LV Status available
# open 1
LV Size <26.00 GiB
Current LE 6655
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0






filesystems partition lvm disk fdisk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago







adrianTNT

















asked 5 hours ago









adrianTNTadrianTNT

20328




20328








  • 1





    You have a logical volumes which you need to extend. Add the output of lsblk -f as well as pvs and vgdisplay and lvdisplay to your question.

    – Nasir Riley
    3 hours ago













  • I added lsblk -f and pvs

    – adrianTNT
    3 hours ago











  • Also add vgdisplay and lvdisplay. Do you want to extend to all of the free space that you added?

    – Nasir Riley
    3 hours ago













  • Added vgdisplay and lvdisplay. Yes, I want to expand to that full space (~120 GB)

    – adrianTNT
    3 hours ago
















  • 1





    You have a logical volumes which you need to extend. Add the output of lsblk -f as well as pvs and vgdisplay and lvdisplay to your question.

    – Nasir Riley
    3 hours ago













  • I added lsblk -f and pvs

    – adrianTNT
    3 hours ago











  • Also add vgdisplay and lvdisplay. Do you want to extend to all of the free space that you added?

    – Nasir Riley
    3 hours ago













  • Added vgdisplay and lvdisplay. Yes, I want to expand to that full space (~120 GB)

    – adrianTNT
    3 hours ago










1




1





You have a logical volumes which you need to extend. Add the output of lsblk -f as well as pvs and vgdisplay and lvdisplay to your question.

– Nasir Riley
3 hours ago







You have a logical volumes which you need to extend. Add the output of lsblk -f as well as pvs and vgdisplay and lvdisplay to your question.

– Nasir Riley
3 hours ago















I added lsblk -f and pvs

– adrianTNT
3 hours ago





I added lsblk -f and pvs

– adrianTNT
3 hours ago













Also add vgdisplay and lvdisplay. Do you want to extend to all of the free space that you added?

– Nasir Riley
3 hours ago







Also add vgdisplay and lvdisplay. Do you want to extend to all of the free space that you added?

– Nasir Riley
3 hours ago















Added vgdisplay and lvdisplay. Yes, I want to expand to that full space (~120 GB)

– adrianTNT
3 hours ago







Added vgdisplay and lvdisplay. Yes, I want to expand to that full space (~120 GB)

– adrianTNT
3 hours ago












1 Answer
1






active

oldest

votes


















0














First, create a new partition on /dev/sda3



fdisk /dev/sda3



n for new partition.



p for primary partition.



Press Enter to select the defaults for the next three steps.



w to write the changes to the disk.



You will now see a new partition with fdisk -l called /dev/sda3. You may need to run partprobe or reboot to update the partition table.



To create a new physical volume:



pvcreate /dev/sda3


To add it to your extending volume group:



vgextend /dev/sda3


To expand your root logical volume:



lvextend -l +100%FREE /dev/centos/root


To sync the new space:



xfs_growfs /dev/centos/root


Run df -h to see the new size with the extra space and lvdisplay | sed -n '/root/,$p to see the increased size of the root logical volume itself.






share|improve this answer
























    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%2f512879%2fhow-to-enlarge-this-partition%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









    0














    First, create a new partition on /dev/sda3



    fdisk /dev/sda3



    n for new partition.



    p for primary partition.



    Press Enter to select the defaults for the next three steps.



    w to write the changes to the disk.



    You will now see a new partition with fdisk -l called /dev/sda3. You may need to run partprobe or reboot to update the partition table.



    To create a new physical volume:



    pvcreate /dev/sda3


    To add it to your extending volume group:



    vgextend /dev/sda3


    To expand your root logical volume:



    lvextend -l +100%FREE /dev/centos/root


    To sync the new space:



    xfs_growfs /dev/centos/root


    Run df -h to see the new size with the extra space and lvdisplay | sed -n '/root/,$p to see the increased size of the root logical volume itself.






    share|improve this answer




























      0














      First, create a new partition on /dev/sda3



      fdisk /dev/sda3



      n for new partition.



      p for primary partition.



      Press Enter to select the defaults for the next three steps.



      w to write the changes to the disk.



      You will now see a new partition with fdisk -l called /dev/sda3. You may need to run partprobe or reboot to update the partition table.



      To create a new physical volume:



      pvcreate /dev/sda3


      To add it to your extending volume group:



      vgextend /dev/sda3


      To expand your root logical volume:



      lvextend -l +100%FREE /dev/centos/root


      To sync the new space:



      xfs_growfs /dev/centos/root


      Run df -h to see the new size with the extra space and lvdisplay | sed -n '/root/,$p to see the increased size of the root logical volume itself.






      share|improve this answer


























        0












        0








        0







        First, create a new partition on /dev/sda3



        fdisk /dev/sda3



        n for new partition.



        p for primary partition.



        Press Enter to select the defaults for the next three steps.



        w to write the changes to the disk.



        You will now see a new partition with fdisk -l called /dev/sda3. You may need to run partprobe or reboot to update the partition table.



        To create a new physical volume:



        pvcreate /dev/sda3


        To add it to your extending volume group:



        vgextend /dev/sda3


        To expand your root logical volume:



        lvextend -l +100%FREE /dev/centos/root


        To sync the new space:



        xfs_growfs /dev/centos/root


        Run df -h to see the new size with the extra space and lvdisplay | sed -n '/root/,$p to see the increased size of the root logical volume itself.






        share|improve this answer













        First, create a new partition on /dev/sda3



        fdisk /dev/sda3



        n for new partition.



        p for primary partition.



        Press Enter to select the defaults for the next three steps.



        w to write the changes to the disk.



        You will now see a new partition with fdisk -l called /dev/sda3. You may need to run partprobe or reboot to update the partition table.



        To create a new physical volume:



        pvcreate /dev/sda3


        To add it to your extending volume group:



        vgextend /dev/sda3


        To expand your root logical volume:



        lvextend -l +100%FREE /dev/centos/root


        To sync the new space:



        xfs_growfs /dev/centos/root


        Run df -h to see the new size with the extra space and lvdisplay | sed -n '/root/,$p to see the increased size of the root logical volume itself.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 3 hours ago









        Nasir RileyNasir Riley

        3,0722410




        3,0722410






























            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%2f512879%2fhow-to-enlarge-this-partition%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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...