Virtual Box shows virtual size as 59.7 GB but actual size is 6.84 GB. Need to expand the root to use full...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0
















This question already has an answer here:




  • CentOS 7 Linux resize filesystem after partition resize

    1 answer




I was trying to install software into a CentOS Linux. It shows that I don't have enough space. When I do df -h I get the following result



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 6.7G 6.7G 0 100% /
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 8.7M 1.4G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/sda1 497M 157M 341M 32% /boot
tmpfs 282M 0 282M 0% /run/user/0


Then I checked the Virtual Box settings it shows that Virtual size is 59.7 GB but the actual size is 6.84 GB



How do I increase the size to 59.7 GB?










share|improve this question















marked as duplicate by Deltik, Ramhound, BenjiWiebe, Burgi, music2myear Mar 18 at 18:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 1





    probably you've partitioned the disk incorrectly. The hard disk size is 59.7GB but the root partition is only 6.7GB, the remaining is just blank space. Run fdisk -l to see

    – phuclv
    Mar 6 at 15:57











  • Yes, you are right. How do I increase the root partition to 59.7GB? when I run fdisk -l I get this @phuclv Disk /dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 16777215 7875584 8e Linux LVM

    – truthtriumphs
    Mar 6 at 16:11




















0
















This question already has an answer here:




  • CentOS 7 Linux resize filesystem after partition resize

    1 answer




I was trying to install software into a CentOS Linux. It shows that I don't have enough space. When I do df -h I get the following result



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 6.7G 6.7G 0 100% /
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 8.7M 1.4G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/sda1 497M 157M 341M 32% /boot
tmpfs 282M 0 282M 0% /run/user/0


Then I checked the Virtual Box settings it shows that Virtual size is 59.7 GB but the actual size is 6.84 GB



How do I increase the size to 59.7 GB?










share|improve this question















marked as duplicate by Deltik, Ramhound, BenjiWiebe, Burgi, music2myear Mar 18 at 18:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 1





    probably you've partitioned the disk incorrectly. The hard disk size is 59.7GB but the root partition is only 6.7GB, the remaining is just blank space. Run fdisk -l to see

    – phuclv
    Mar 6 at 15:57











  • Yes, you are right. How do I increase the root partition to 59.7GB? when I run fdisk -l I get this @phuclv Disk /dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 16777215 7875584 8e Linux LVM

    – truthtriumphs
    Mar 6 at 16:11
















0












0








0









This question already has an answer here:




  • CentOS 7 Linux resize filesystem after partition resize

    1 answer




I was trying to install software into a CentOS Linux. It shows that I don't have enough space. When I do df -h I get the following result



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 6.7G 6.7G 0 100% /
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 8.7M 1.4G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/sda1 497M 157M 341M 32% /boot
tmpfs 282M 0 282M 0% /run/user/0


Then I checked the Virtual Box settings it shows that Virtual size is 59.7 GB but the actual size is 6.84 GB



How do I increase the size to 59.7 GB?










share|improve this question

















This question already has an answer here:




  • CentOS 7 Linux resize filesystem after partition resize

    1 answer




I was trying to install software into a CentOS Linux. It shows that I don't have enough space. When I do df -h I get the following result



[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 6.7G 6.7G 0 100% /
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 8.7M 1.4G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/sda1 497M 157M 341M 32% /boot
tmpfs 282M 0 282M 0% /run/user/0


Then I checked the Virtual Box settings it shows that Virtual size is 59.7 GB but the actual size is 6.84 GB



How do I increase the size to 59.7 GB?





This question already has an answer here:




  • CentOS 7 Linux resize filesystem after partition resize

    1 answer








linux hard-drive virtualbox partitioning virtual-machine






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 5:45







truthtriumphs

















asked Mar 6 at 15:44









truthtriumphstruthtriumphs

13




13




marked as duplicate by Deltik, Ramhound, BenjiWiebe, Burgi, music2myear Mar 18 at 18:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Deltik, Ramhound, BenjiWiebe, Burgi, music2myear Mar 18 at 18:59


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1





    probably you've partitioned the disk incorrectly. The hard disk size is 59.7GB but the root partition is only 6.7GB, the remaining is just blank space. Run fdisk -l to see

    – phuclv
    Mar 6 at 15:57











  • Yes, you are right. How do I increase the root partition to 59.7GB? when I run fdisk -l I get this @phuclv Disk /dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 16777215 7875584 8e Linux LVM

    – truthtriumphs
    Mar 6 at 16:11
















  • 1





    probably you've partitioned the disk incorrectly. The hard disk size is 59.7GB but the root partition is only 6.7GB, the remaining is just blank space. Run fdisk -l to see

    – phuclv
    Mar 6 at 15:57











  • Yes, you are right. How do I increase the root partition to 59.7GB? when I run fdisk -l I get this @phuclv Disk /dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 16777215 7875584 8e Linux LVM

    – truthtriumphs
    Mar 6 at 16:11










1




1





probably you've partitioned the disk incorrectly. The hard disk size is 59.7GB but the root partition is only 6.7GB, the remaining is just blank space. Run fdisk -l to see

– phuclv
Mar 6 at 15:57





probably you've partitioned the disk incorrectly. The hard disk size is 59.7GB but the root partition is only 6.7GB, the remaining is just blank space. Run fdisk -l to see

– phuclv
Mar 6 at 15:57













Yes, you are right. How do I increase the root partition to 59.7GB? when I run fdisk -l I get this @phuclv Disk /dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 16777215 7875584 8e Linux LVM

– truthtriumphs
Mar 6 at 16:11







Yes, you are right. How do I increase the root partition to 59.7GB? when I run fdisk -l I get this @phuclv Disk /dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 16777215 7875584 8e Linux LVM

– truthtriumphs
Mar 6 at 16:11












1 Answer
1






active

oldest

votes


















0














From your comment /dev/sda2 is around ~8GB (since it looks like fdisk uses 1KiB sector, but I'm not sure about that)



/dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 16777215 7875584 8e Linux LVM


Just run gparted to resize /dev/sda2 to the end of the hard drive, and then resize your LVM partition. For more information about resize LVM partition read How can I resize an LVM partition? (i.e: physical volume)






share|improve this answer
























  • thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

    – truthtriumphs
    Mar 7 at 5:35











  • Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

    – truthtriumphs
    Mar 7 at 5:40













  • @truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

    – phuclv
    Mar 7 at 6:09











  • Thanks!! I missed that step. I am trying to resize it

    – truthtriumphs
    Mar 7 at 6:11











  • @phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

    – truthtriumphs
    Mar 7 at 6:17




















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














From your comment /dev/sda2 is around ~8GB (since it looks like fdisk uses 1KiB sector, but I'm not sure about that)



/dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 16777215 7875584 8e Linux LVM


Just run gparted to resize /dev/sda2 to the end of the hard drive, and then resize your LVM partition. For more information about resize LVM partition read How can I resize an LVM partition? (i.e: physical volume)






share|improve this answer
























  • thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

    – truthtriumphs
    Mar 7 at 5:35











  • Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

    – truthtriumphs
    Mar 7 at 5:40













  • @truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

    – phuclv
    Mar 7 at 6:09











  • Thanks!! I missed that step. I am trying to resize it

    – truthtriumphs
    Mar 7 at 6:11











  • @phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

    – truthtriumphs
    Mar 7 at 6:17


















0














From your comment /dev/sda2 is around ~8GB (since it looks like fdisk uses 1KiB sector, but I'm not sure about that)



/dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 16777215 7875584 8e Linux LVM


Just run gparted to resize /dev/sda2 to the end of the hard drive, and then resize your LVM partition. For more information about resize LVM partition read How can I resize an LVM partition? (i.e: physical volume)






share|improve this answer
























  • thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

    – truthtriumphs
    Mar 7 at 5:35











  • Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

    – truthtriumphs
    Mar 7 at 5:40













  • @truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

    – phuclv
    Mar 7 at 6:09











  • Thanks!! I missed that step. I am trying to resize it

    – truthtriumphs
    Mar 7 at 6:11











  • @phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

    – truthtriumphs
    Mar 7 at 6:17
















0












0








0







From your comment /dev/sda2 is around ~8GB (since it looks like fdisk uses 1KiB sector, but I'm not sure about that)



/dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 16777215 7875584 8e Linux LVM


Just run gparted to resize /dev/sda2 to the end of the hard drive, and then resize your LVM partition. For more information about resize LVM partition read How can I resize an LVM partition? (i.e: physical volume)






share|improve this answer













From your comment /dev/sda2 is around ~8GB (since it looks like fdisk uses 1KiB sector, but I'm not sure about that)



/dev/sda: 64.0 GB, 63962087424 bytes, 124925952 sectors

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 16777215 7875584 8e Linux LVM


Just run gparted to resize /dev/sda2 to the end of the hard drive, and then resize your LVM partition. For more information about resize LVM partition read How can I resize an LVM partition? (i.e: physical volume)







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 6 at 16:23









phuclvphuclv

10.7k64297




10.7k64297













  • thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

    – truthtriumphs
    Mar 7 at 5:35











  • Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

    – truthtriumphs
    Mar 7 at 5:40













  • @truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

    – phuclv
    Mar 7 at 6:09











  • Thanks!! I missed that step. I am trying to resize it

    – truthtriumphs
    Mar 7 at 6:11











  • @phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

    – truthtriumphs
    Mar 7 at 6:17





















  • thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

    – truthtriumphs
    Mar 7 at 5:35











  • Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

    – truthtriumphs
    Mar 7 at 5:40













  • @truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

    – phuclv
    Mar 7 at 6:09











  • Thanks!! I missed that step. I am trying to resize it

    – truthtriumphs
    Mar 7 at 6:11











  • @phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

    – truthtriumphs
    Mar 7 at 6:17



















thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

– truthtriumphs
Mar 7 at 5:35





thanks for the comment. I need to expand it 60 GB, the article that you linked shows "How to shrink" Is there a way to expand?

– truthtriumphs
Mar 7 at 5:35













Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

– truthtriumphs
Mar 7 at 5:40







Hi @phuclv, I did run the following, it does seem to have given another 8% free. Here is what I did [root@localhost ~]# lvextend -l 100%VG /dev/mapper/centos-root Size of logical volume centos/root changed from 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents). Logical volume root successfully resized. Here is the result [root@localhost ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/centos-root 6.7G 5.5G 1.3G 82% / Still wondering how do get to use the 60 GB, which is not showing in any of the disk usage?

– truthtriumphs
Mar 7 at 5:40















@truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

– phuclv
Mar 7 at 6:09





@truthtriumphs did you resize /dev/sda2 as I said? Because 6.67 GiB (1707 extents) to 6.71 GiB (1717 extents) looks like the partition is still the same size, so LVM can't resize it any bigger than that

– phuclv
Mar 7 at 6:09













Thanks!! I missed that step. I am trying to resize it

– truthtriumphs
Mar 7 at 6:11





Thanks!! I missed that step. I am trying to resize it

– truthtriumphs
Mar 7 at 6:11













@phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

– truthtriumphs
Mar 7 at 6:17







@phclv I don't see a /dev/sda2 patition. Here is the result of df -h command /dev/mapper/centos-root 6.7G 5.6G 1.2G 83% / devtmpfs 1.4G 0 1.4G 0% /dev tmpfs 1.4G 0 1.4G 0% /dev/shm tmpfs 1.4G 8.7M 1.4G 1% /run tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup /dev/sda1 497M 157M 341M 32% /boot tmpfs 282M 0 282M 0% /run/user/0 Kindly forgive me I am just learning how Linux does partitions

– truthtriumphs
Mar 7 at 6:17





Popular posts from this blog

Probability when a professor distributes a quiz and homework assignment to a class of n students.

Aardman Animations

Are they similar matrix