I need to decrease /dev/mapper/ol-home (now 3/42GB used) and increase /dev/mapper/ol-root (45/50GB used)
- 1What did you try so far?Romeo Ninov– Romeo Ninov2024-10-29 16:06:02 +00:00Commented Oct 29, 2024 at 16:06
- Very strange problem. Most likely you don't want to do that. Instead you identify what consumes that much space on the root volume and create a dedicated volume for that data. 50 GiB is already an awful lot for a Linux root filesystem; it would never fill up to that on a properly managed system.Nikita Kipriyanov– Nikita Kipriyanov2024-10-30 06:45:28 +00:00Commented Oct 30, 2024 at 6:45
1 Answer
IIRC Oracle Linux is using XFS as it's default Filesystem (that can be checked with something like lsblk -f
).
XFS can not be shrunk down, neither online nor offline.
For XFS the only option is to dump and restore the entire Filesystem.
The general process for other Filesystems would however be to boot a live CD (so root can be unmounted) and then lvm resize -r -L <new size>
your logical volume.
The -r
flag tells LVM to resize the Filesystem before touching any block devices, not including that will probably corrupt your FS.