1

How can I deactivate and shrink the Logical volume mounted as /tmp safely ?

lvm> lvreduce --size 30GB /dev/vg_server4/LogVolTmp
WARNING: Reducing active and open logical volume to 30.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce LogVolTmp? [y/n]:

thanks

1 Answers1

1

As it was already mentioned, you will most likely need to umount the FS.

When unmounting the FS, you will likely want to switch to singleuser mode to safely unmount the /tmp. (Run telinit 1, /sbin/init 1 or systemctl isolate runlevel1.target depending on distro age/brand.)

When resizing adding -r (--resizefs) switch to lvreduce/lvextend/lvresize will take care of resizing the FS and LV in the right order. Caveat: it does not handle LUKS encrypted volumes yet.

Martian
  • 884