Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the steps in the process of making lvm software under linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the steps of the production process of lvm software under linux. It is very detailed and has a certain reference value. Friends who are interested must read it!

The previous article introduced lvm, and today I'm here to demonstrate the process of making lvm. The production process of lvm has the following steps:

Disk partition

Making pv with Partition

Establishing vg with pv

Split lv from vg

Format lv and mount it to a directory for use

Next, let's complete the above process.

Zoning

First, let's take a look at the partition of the disk.

# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 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 are not partitioned yet. In addition, the sda disk also has remaining space. Now, partition the other four disks. Partitions use fdisk or gdisk tools, so the process is omitted here. After dividing the area, the information is as follows:

# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 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 └─ sdb1 8:17 0 1023M 0 part sdc 8 : 32 0 1G 0 disk └─ sdc1 8:33 0 1023M 0 part sdd 8:48 0 1G 0 disk └─ sdd1 8:49 0 1023M 0 part sde 8:64 0 1G 0 disk └─ sde1 8:65 0 1023M 0 part

Make pv

First, we need to install the software lvm2.

Yum install lvm2

There are several commands related to pv:

Pvscan views pv on the system

Pvdisplay lists the usage of pv

Making pv by pvcreate

Pvremove deletes the pv, even if a partition has no pv attribute

Now let's use partitions to make pv.

Usage: pvcreate partition.

# pvcreate / dev/sdb1 / dev/sdc1 Physical volume "/ dev/sdb1" successfully created. Physical volume "/ dev/sdc1" successfully created.# thus made two pv

Let's view all the pv on the system through pvscan

# pvscan PV / dev/sdc1 lvm2 [1023.00 MiB] PV / dev/sdb1 lvm2 [1023.00 MiB] Total: 2 [

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report