Trying to install an rpm with yum localinstall and I get:

Transaction Check Error:
installing package streamsets-datacollector- 
needs 542MB on the /opt filesystem

Error Summary
Disk Requirements:
  At least 542MB more space needed on the /opt filesystem.

I checked free space with df -h and saw there were only 300MB available. So I did lvextend -L +1G /dev/mapper/rootvg-opt. Reran df -h and the change was reflected accurately. Tried installing once again and got the same error. I tried allocating even more space (3GB total free now, which is way bigger than this package should require) and I'm getting the same error with the same amount of required space missing.

  • Don't you have to run something like resize2fs -p /dev/mapper/rootvg-opt (ext4) or btrfs filesystem resize max /opt (Btrfs) after the lvextend and before df -h – Anthon Aug 9 '16 at 15:06
  • @Anthon OP probably did (or added the -r flag to lvextend), else it wouldn't show in df. But OP definitely needs to accurately report the steps... – derobert Aug 9 '16 at 15:13
  • @derobert Interestingly, I did neither of things and the change showed up in df. However I just ran what @Anthon suggested and it got things working. Thanks! – user2901181 Aug 9 '16 at 15:15
  • well then... @Anthon sounds like you should post an answer. – derobert Aug 9 '16 at 15:22

After extending the logical volume, you still need to extend the filesystem that is on top of it.

For ext4:

resize2fs -p /dev/mapper/rootvg-opt

For Btrfs:

btrfs filesystem resize max /opt

Or you could have originally added the -r option, as @derobert suggested. From the lvextend man page:

-r, --resizefs
      Resize underlying filesystem together with  the  logical  volume
      using fsadm(8).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.