Demonstration of the production process of lvm software under linux-linux operation and maintenance

The previous article introduced lvm, and today I will demonstrate the process of making lvm here. The production process of lvm has the following steps: Disk partition Use partitions to make pv Create vg with pv Split lv from vg Format lv and mount it to the directory for use Next, let’s complete the above process. Partition First, let’s look at the partition of the disk. # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 40G 0 disk ├─sda1 8:1 0 2M 0 part ├─sda2 8:2 0 1G 0 part /boot ├─sda3 8:3 0 1G 0 part [SWAP] ├─sda4 8:4 0 10G 0 part / └─sda5 8:5 0 100M 0 part sdb 8:16 0 1G 0 disk sdc 8:32 0 1G 0 disk sdd 8:48 0 1G 0 disk sde 8:64 0 1G 0 disk As you can see, there are 5 disks on my host, except for the sda ​​disk, the other disks have not been partitioned yet, and the sda ​​disk still has remaining space. Now, partition the other 4 disks as well. Use fdisk or gdisk tools for partitioning, and the specific process is omitted here. The information after partitioning is as follows: #…

How to expand the partition capacity under linux-linux operation and maintenance

In daily work, we often encounter the problem of insufficient remaining capacity of a certain partition, so we need to know how to expand the partition under the Linux server. For partition expansion, there are two cases here LVM partition expansion Expansion of non-LVM partition Expansion of LVM partition Generally, we recommend using LVM, which facilitates the elastic scaling of partitions. Regarding the introduction of LVM, physical volumes, logical groups, logical volumes, etc. will not be detailed here. You can read my other two articles about LVM. Scenario: The /www directory is our website-related directory. The partition mounted on this directory uses LVM. Originally, this directory has a space of 1G, but with the operation of the system, the remaining space is only Less than 100M left. Now the partition needs to be expanded. Preparation work, realize the scene # pvcreate /dev/sdb1 # vgcreate vgwww /dev/sdb1 # lvcreate -l 255 vgwww # mkfs.ext4 /dev/vgwww/lvol0 # mount /dev/vgwww/lvol0 /www # dd if=/dev/zero of=/www/bigfile bs=1M count=900 # df -h … /dev/mapper/vgwww-lvol0 988M 903M 19M 98% /www Partition expansion First, we need to see if there is any remaining space in vgwww, If not, you need to add pv in vgwww first. #…

What is ssh and how does it encrypt information-linux operation and maintenance

In the early days, the remote connection server used plaintext transmission software, such as telnet and RSH, and later they were all replaced by the ssh protocol. The SSH service can provide information encryption and then transmit the data, which greatly improves the security. SSH has two main functions: Ability to connect to remote hosts and manage host resources Able to transfer files, similar to ftp service SSH encryption Technology SSH uses asymmetric encryption technology. Readers who want to know more about symmetric encryption and asymmetric encryption, please Google. Asymmetric encryption is mainly accomplished through the public key and private key. The public key encrypts the information sent, and after receiving the information, the private key is used to decrypt the information. Public key (Public key): The act of encrypting the information sent to the host of the other party, so your host public key Can be given to another host that wants to communicate. Private key (Private key): When the remote host sends the information encrypted with the public key to the current host, the current host uses its own private key to decrypt the information . Remember, your private key must not be known to other hosts. The…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索