How do I reduce the root partition in RHEL 7?

First thing: reducing the size of any volume is risky, and you need to make absolutely sure you have enough free space. Resizing the root volume is doubly so, so make sure!

Second, although you can do this online in RHEL 7, I’d still do this while in single user mode if at all possible.

Presuming you took the defaults and have an XFS- and LVM-based root volume (if not… let me know. It is doable but a bit more complicated)

First, resize the root volume:

$ lvextend -L -<X> <root volume device> -r

Where <X> is the amount of space you want to remove; like 100M or 1G to specify it in Mibs or Gibs

Giới thiệu honest 237 bài viết
Mình lập blog này với mục đích lưu lại + chia sẻ các các kiến thức mình đã biết hoặc đang tìm hiểu. Cơ bản giúp ích cho mình :) Nhưng hy vọng sẽ mang lại sự khởi đầu thuận lợi cho người mới bắt đầu!