Linux Experiment Report (2) - Disk Storage Management
1. Configuration requirements:
- Virtual machine VM15.0 and above
- centos7.0 version
- windows7 or windows10 host
2. The purpose of the experiment
- Understand the basic concepts of LVM
- Learn how to create disk partitions and file systems
- Master the configuration method of disk logical volumes
3. Experimental requirements
- By adding a second 15G serial hard disk, and using all the space to create sdb1 as a logical volume format, write out the detailed partition process.
- Create a volume group named soft_180x (x is your class number), and the PE size of the volume group is 8MiB.
vgcreate soft_1802 /dev/sdb1 -s 8m
- The name of the logical volume is lvm_name (name is full spelling of the name), the volume group it belongs to is soft_180x, and the logical volume consists of 100 PEs.
lvcreate -n lvm_huangjie -l 100 soft_1802
- Format the newly created logical volume as an ext4 file system. When the system starts, the logical volume can be automatically mounted to the /soft_180x/lvm_name directory.
# 初始化为ext4类型
mkfs.ext4 /dev/soft_1802/lvm_huangjie
# 创建/soft_1802/lvm_huangjie挂载目录
mkdir -p /soft_1802/lvm_huangjie
# 查看/dev/soft_1802/lvm_huangjie信息
blkid /dev/soft_1802/lvm_huangjie
# 将上面的信息写入/etc/fstab
vim /etc/fstab #UUID="6c52dfb3-ee75-4e3b-b52a-f7333d44fc5a" /soft_1802/lvm_huangjie ext4 defaults 0 0
- Check the mounted file system.
# 立即生效挂载
mount -a
# 查看挂载信息
df -Th
4. Previous: Linux Experiment Report (1) - File Permissions and Management
Linux experiment report (1) - file permissions and management