From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Reduce existing logical volumes

Reduce existing logical volumes

From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Start my 1-month free trial

Reduce existing logical volumes

- [Instructor] A lot of functionality has been added to the lvresize command, including the ability to unmount and remount the volume as well as resize the file system. We're going to walk through the manual process first as old versions may not support these features. At the end of this video, I'll show you the simpler and more automated way of using the newer features of lvresize. We should still have our previous logical volume mounted as /dev/vgdata/lvdata. Let's verify this with df and then space -h, and we can see that it's mounted. Although it's a good idea to always unmount a file system when resizing it, we can leave it mounted when we increase the size. However, when we decrease the size, we have no choice but to unmount the volume. Let's unmount our logical volume now. Type in sudo space umount space /dev/vgdata/lvdata and hit enter. Type in your password as prompted. Verify that it's unmounted by typing in df again. It should be gone. Now let's run a file system check…

Contents