linux LVM 磁盘管理 基本用法举例

简介:

操作系统版本 suse linux 11

创建物理卷PV

clip_image001

给磁盘新建分区

clip_image002

大小1000M

clip_image003

将分区调整为8e linux LVM

clip_image004

W写入保存

clip_image005

将分区转换为PV

clip_image006

查看现有PV信息

创建卷组

clip_image007

创建卷组

clip_image008

查看卷组

 

创建逻辑卷LV

clip_image009

使用LV 创建文件系统

clip_image010

clip_image011

加入文件系统成功!!

 

扩展LV

clip_image018

无变化

clip_image019

resize文件系统

clip_image020

已添加

clip_image021

扩展VG

创建PV

hp5-2:~ # fdisk /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x5c2e7bc3.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

The number of cylinders for this disk is set to 1566.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-1566, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-1566, default 1566):

Using default value 1566

Command (m for help): m

Command action

a toggle a bootable flag

b edit bsd disklabel

c toggle the dos compatibility flag

d delete a partition

l list known partition types

m print this menu

n add a new partition

o create a new empty DOS partition table

p print the partition table

q quit without saving changes

s create a new empty Sun disklabel

t change a partition's system id

u change display/entry units

v verify the partition table

w write table to disk and exit

x extra functionality (experts only)

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): 8e

Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

ehp5-2:~ #

clip_image022

扩展成功。

现在我们就可以灵活使用磁盘和文件系统了,添加删除都可以


本文转自ICT时空dbasdk的博客,原文链接:linux LVM 磁盘管理 基本用法举例 ,如需转载请自行联系原博主。

相关文章
|
12月前
|
存储 监控 Linux
Linux: 检测磁盘坏块 你得会吧!
Linux: 检测磁盘坏块 你得会吧!
824 19
Linux: 检测磁盘坏块 你得会吧!
|
9月前
|
监控 Linux 应用服务中间件
linux查看日志文件tail -f用法
在 Linux 中,查看和监控日志文件是系统管理员和开发者常用的操作之一。tail 命令就是用来查看文件内容的,它默认显示文件的最后部分。tail -f 是 tail 命令的一个非常有用的选项,用于实时查看和跟踪日志文件的更新,尤其是在监控运行中的服务时非常有用。
1106 0
|
11月前
|
Linux
在线对Linux进行磁盘扩容的技术指南。
综上所述,Linux磁盘扩容的过程,重要的不仅是技术,更是对每一步骤的深刻理解和投入的爱心。只要手握正确的工具,我们不仅能满足"孩子"的成长需求,还能享受其中的乐趣和成就。
712 10
|
12月前
|
监控 固态存储 Linux
如何判断Linux磁盘是SSD还是HDD?
总的来说,判断磁盘是SSD还是HDD并不复杂,只需要使用正确的命令和方法,就可以轻松得到结果。希望这些信息对你有所帮助,如果你还有其他问题,欢迎随时提问。
1493 15
|
Shell Linux
【linux】Shell脚本中basename和dirname的详细用法教程
本文详细介绍了Linux Shell脚本中 `basename`和 `dirname`命令的用法,包括去除路径信息、去除后缀、批量处理文件名和路径等。同时,通过文件备份和日志文件分离的实践应用,展示了这两个命令在实际脚本中的应用场景。希望本文能帮助您更好地理解和应用 `basename`和 `dirname`命令,提高Shell脚本编写的效率和灵活性。
1237 32
|
Linux
Linux系统ext4磁盘扩容实践指南
这个过程就像是给你的房子建一个新的储物间。你需要先找到空地(创建新的分区),然后建造储物间(格式化为ext4文件系统),最后将储物间添加到你的房子中(将新的分区添加到文件系统中)。完成这些步骤后,你就有了一个更大的储物空间。
1349 10
|
Ubuntu Linux 网络安全
Linux磁盘挂接教程
Linux磁盘挂接教程
331 14
|
安全 网络协议 Linux
本文详细介绍了 Linux 系统中 ping 命令的使用方法和技巧,涵盖基本用法、高级用法、实际应用案例及注意事项。
本文详细介绍了 Linux 系统中 ping 命令的使用方法和技巧,涵盖基本用法、高级用法、实际应用案例及注意事项。通过掌握 ping 命令,读者可以轻松测试网络连通性、诊断网络问题并提升网络管理能力。
1412 3
|
Ubuntu Linux
Linux的基础用法
Linux的基础用法
156 6
|
Unix Linux 对象存储
Linux 磁盘管理
Linux 磁盘管理
203 1
下一篇
开通oss服务