May 23, 2021 That's what Linux should learn
In the previous experiment, the volume group consisted of two hard disk devices. U sers are not aware of the underlying architecture and layout of the device when using the storage device, let than how many hard drives the underlying is composed of, as long as there are sufficient resources in the volume group, you can always expand the capacity of the logical volume. Be sure to remember to uninstall the device and mount the connection before you extend it.
Step root@linuxprobe 1: Expand the logical volume vo from the last experiment to 290MB.
root@linuxprobe lvextend -L 290M /dev/storage/vo rounding size to boundary between physical extents: 292.00 MiB Extending logic volume volume to 292.00 MiB Logic volume successful resed Step 2: Check the integrity of the hard drive and reset the capacity of the hard drive.
[root@linuxprobe ~]# e2fsck -f /dev/storage/vo e2fsck 1.42.9 (28-Dec-2013) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/storage/vo: 11/38000 files (0.0% non-contiguous), 10453/151552 blocks [root@linuxprobe ~]# resize2fs / dev/storage/vo resize2fs 1.42.9 (28-Dec-2013) Resizing the filesystem on /dev/storage/vo to 299008 (1k) blocks. T he filesystem on /dev/storage/vo is now 299008 blocks long. Step 3: Reload the hard drive device and check the mount status.
[root@linuxprobe ~]# mount -a [root@linuxprobe ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 18G 3.0G 15G 17% / devtmpfs 985M 0 985M 0% /dev tmpfs 994M 80K 994M 1% /dev/shm tmpfs 994M 8.8M 986M 1% /run tmpfs 994M 0 994M 0% /sys/fs/cgroup /dev/sr0 3.5G 3.5G 0 100% /media/cdrom /dev/sda1 497M 119M 379M 24% /boot /dev/mapper/storage-vo 279M 2.1M 259M 1% /linuxprobe