Goal
Add a disk to a full volume group, grow an XFS and an ext4 volume while they are in use, shrink the ext4 volume, and take one disk out of the VG.
Before you start
- Finish lab 15.1. Add a second empty disk of 5 GiB (here
/dev/vdd). Work as root.
Tasks
Tick a task when it is done. Only your browser remembers it.
- Add the whole disk
/dev/vddto the volume groupvgfiles. - Grow
lvfilesby 1 GiB while it stays mounted.df -h /filesmust show the new size. - Grow
lvdocsto a total size of 5 GiB, also while mounted. - Shrink
lvdocsto 3 GiB without losing its files. - Move all data away from
/dev/vddand remove the disk from the VG (if the VG has enough free space; if not, shrink first or skip this task and explain why).
Check your work
Hints
Show the hints
pvcreate+vgextend.lvextend -r -L +1G,lvextend -r -L 5G.lvreduce -r -L 3G(ext4 only; it unmounts and checks for you, or asks).pvmove,vgreduce,pvremove.
Solution
Show the solution
- Extend the VG.
- Grow lvfiles with its XFS.
- Grow lvdocs to 5 GiB.
lvextend -r -L 5G /dev/vgfiles/lvdocs - Shrink lvdocs (ext4) to 3 GiB.
- Free /dev/vdd.
My notes
No notes yet.