-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b821f2c
commit 2892aed
Showing
6 changed files
with
275 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,42 @@ | ||
## lvm架构 | ||
|
||
![](lvm.png) | ||
![](lvm.png) | ||
|
||
### 创建lvm | ||
|
||
1. 创建pv | ||
|
||
```shell | ||
pvcreate /dev/sdb | ||
``` | ||
|
||
2. 创建vg | ||
|
||
```shell | ||
vgcreate data-volume /dev/sdb | ||
``` | ||
|
||
3. 创建lv(逻辑卷) | ||
|
||
```shell | ||
lvcreate -n data-lv -l 100%free data-volume | ||
``` | ||
|
||
4. 格式化lv | ||
|
||
```shell | ||
mkfs.ext4 /dev/data-volume/data-lv | ||
``` | ||
|
||
5. 挂载使用 | ||
|
||
```shell | ||
mkdir /data | ||
mount /dev/data-volume/data-lv | ||
``` | ||
|
||
6. 设置自动挂载 | ||
|
||
```shell | ||
echo "/dev/data-volume/data-lv /data ext4 defaults 0 0" >> /etc/fstab | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.