LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Increasing my home volume's size didn't increase more free space (https://www.linuxquestions.org/questions/linux-newbie-8/increasing-my-home-volumes-size-didnt-increase-more-free-space-4175599382/)

Falco2016 02-09-2017 01:02 PM

Increasing my home volume's size didn't increase more free space
 
I have a 4TB physical disk that has 2TB partitioned that is LUKS encrypted. I created a new partition using the parted command and mkpart. I used the unpartitioned 2TB space and created /dev/sda2. I created physical volume using pvcreate /dev/sda2 command. I extended the existing VolGrp0 using vgextend command [vgextend VolGrp0 /dev/sda2]. Finally, I increased the volume size of /home using the lvextend /VolGrp0/home /dev/sda2 command. The lvdisplay command now shows the volume as being 2.0TiB. But "df -h" still shows home volume as 100% full. The original df -h display showed home as 180GB. How come the home volume did not increase in size using df? When I try to copy files to the volume it says there are no more space, but system-config-lvm shows home as 2TB. Please help.

r3sistance 02-09-2017 02:44 PM

you need to expand the filing system itself, what are you using EXT4? ZFS? etc, with EXT4 you could use resize2fs for example.

rknichols 02-09-2017 02:50 PM

You didn't resize the filesystem. You run into the same problem if you enlarge a partition without adjusting the filesystem structure to make use of the space. Fortunately, enlarging the filesystem can still be done.
Code:

fsadm resize /dev/VolGrp0/home
Most filesystems will allow you to do that while mounted. You could have avoided the extra step by including the "--resizefs" option in your vgextend command.

FYI, when going in the other direction (shrinking), it is imperative that the filesystem either be shrunk first or as part of the lvreduce or lvresize operation. Omitting that leads to a corrupted filesystem, which might or might not be recoverable depending on what else you did before you realized your error.

Falco2016 02-13-2017 09:12 AM

Thank you
 
Thanks everyone. I will try resize the filesystem.

Falco2016 02-13-2017 10:48 AM

Thank you for your solution. My issue was resolved by your code.

r3sistance 02-13-2017 01:43 PM

If that has fixed it then you should mark this as solved and click rknichols's response as helpful :).


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