According to the company's needs, to build a file server, we first thought of Samba, and then decided to use lvm to facilitate the expansion of the disk space occupied by each department. The process is as follows: www.2cto.com
1. Create a linux partition
2. Create a physical volume Pvcreate is the command for the system to create a physical volume./dev/sdb1,/dev/sdc1./dev/sdd1 are the physical partitions just created, it is now converted to the partition of the physical volume. You can see a lot of information through pvdisplay, the name of the physical volume, and the size of the physical volume. Vgcreate is the command for the system to create a volume group. vg_samba is a name for this volume group, www.2cto.com
The following/dev/sdb1/dev/sdc1/dev/sdd1 physical volumes need to be converted into volume groups. Lvcreate is the command for the system to create a logical volume-L specify the partition size www.2cto.com-n specify the partition name mkfs. you can also create an ext4 formatted disk as a mkfs-t disk lvm. You can also update the volume group extension and lv logical volume extension and deletion as required.