0

how could I resize my logical volumes in Oracle Linux?

I have the following partition table:

Dateisystem         Größe Benutzt Verf. Verw% Eingehängt auf
devtmpfs             2,8G       0  2,8G    0% /dev
tmpfs                2,8G       0  2,8G    0% /dev/shm
tmpfs                2,8G     33M  2,8G    2% /run
tmpfs                2,8G       0  2,8G    0% /sys/fs/cgroup
/dev/mapper/ol-root   50G     41G  9,8G   81% /
/dev/sda1           1014M    215M  800M   22% /boot
/dev/mapper/ol-home  194G     22G  172G   12% /home
tmpfs                571M       0  571M    0% /run/user/0

I want to "move" 100G from /home to /

Thanks in advance.

  • 1
    assuming you're using lvm: You can see what's the status of your vol groups with `vgs`, if there's any space to allocate there you can do it with `lvextend` and `resize2fs`. – Petter H Apr 05 '17 at 13:25
  • there is no space left, first thing i wanna do is to resize _/home_ to a size of 50G. Then i want to resize _/_ to maximum available. – Philipp Schneider Apr 05 '17 at 13:30

1 Answers1

2

I do not believe you could directly shrink /home without risking loss of data.

I'd suggest moving /home data to another device, deleting original /home partition, expanding root (/), then recreate a new /home partition, then finally restore data to new /home. (in that order)

This may be stale old-school thought as i am not an LVM expert.

For obvious reasons, backup the entire machine first.