man LVCREATE
lvcreate - create a logical volume in an existing volume group
lvcreate-在现有卷组中创建逻辑卷
lvcreate [--addtag Tag] [--alloc AllocationPolicy] [-A|--autobackup y|n]
[-C|--contiguous y|n] [-d|--debug] [-h|-?|--help] [-i|--stripes Stripes
[-I|--stripesize StripeSize]] {-l|--extents LogicalExtentsNum-
ber[%{VG|PVS|FREE}] |
-L|--size LogicalVolumeSize[kKmMgGtT]} [-M|--persistent y|n] [--minor
minor] [-m|--mirrors Mirrors [--nosync] [--mirrorlog {disk|core}]
[--corelog] [-R|--regionsize MirrorLogRegionSize]] [-n|--name LogicalVolume-
Name] [-p|--permission r|rw] [-r|--readahead ReadAheadSectors|auto|none]
[-t|--test] [-v|--verbose] [-Z|--zero y|n] VolumeGroupName [PhysicalVol-
umePath...]
-L|--size LogicalVolumeSize[kKmMgGtT]} [-c|--chunksize ChunkSize] -n|--name
SnapshotLogicalVolumeName {{-s|--snapshot} OriginalLogicalVolumePath |
[-s|--snapshot] VolumeGroupName --virtualsize VirtualSize}
lvcreate creates a new logical volume in a volume group ( see vgcreate(8),
vgchange(8) ) by allocating logical extents from the free physical extent
pool of that volume group. If there are not enough free physical extents
then the volume group can be extended ( see vgextend(8) ) with other physi-
cal volumes or by reducing existing logical volumes of this volume group in
size ( see lvreduce(8) ).
The second form supports the creation of snapshot logical volumes which keep
the contents of the original logical volume for backup purposes.
lvcreate通过从卷组的空闲物理扩展池分配逻辑扩展数据块,在卷组中创建新的逻辑卷
(请参阅vgcreate(8)、vgchange(8))。如果没有足够的可用物理区然后,
可以将卷组与其他物理卷一起扩展(请参阅vgextend(8)),
或者通过减小此卷组的现有逻辑卷的大小(请参阅lvreduce(8))。
第二种形式支持创建快照逻辑卷,以保留原始逻辑卷的内容以备备份。
OPTIONS/选项
See lvm for common options./常见选项见LVM。
Power of 2 chunk size for the snapshot logical volume between 4k and
512k.
4K和512K之间快照逻辑卷的2块大小的幂。
Sets or resets the contiguous allocation policy for logical volumes.
Default is no contiguous allocation based on a next free principle.
设置或重置逻辑卷的连续分配策略。默认情况下,没有基于下一个自由原则的连续分配。
Gives the number of stripes. This is equal to the number of physical
volumes to scatter the logical volume.
给出条纹数。这等于要分散逻辑卷的物理卷数。
Gives the number of kilobytes for the granularity of the stripes.
StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format. For
metadata in LVM2 format, the stripe size may be a larger power of 2
but must not exceed the physical extent size.
给出条带粒度的千字节数。对于LVM1格式的元数据,条带大小必须为2^n(n=2到9)。
对于LVM2格式的元数据,条带大小可以是2的较大幂,但不能超过物理数据块大小。
Gives the number of logical extents to allocate for the new logical
volume. This can also be expressed as a percentage of the total
space in the Volume Group with the suffix %VG, of the remaining free
space in the Volume Group with the suffix %FREE, or of the remaining
free space for the specified PhysicalVolume(s) with the suffix %PVS,
提供要为新逻辑卷分配的逻辑扩展数据块数。
这也可以表示为后缀为%vg的卷组中的总空间、
后缀为%free的卷组中的剩余可用空间或后缀为%pvs的指定物理卷的剩余可用空间的百分比,
Gives the size to allocate for the new logical volume. A size suffix
of K for kilobytes, M for megabytes, G for gigabytes, T for ter-
abytes, P for petabytes or E for exabytes is optional.
Default unit is megabytes.
提供为新逻辑卷分配的大小。千字节的大小后缀为K,兆字节的大小后缀为M,
千兆字节的大小后缀为G,兆字节的大小后缀为T,千兆字节的大小后缀为P,
兆字节的大小后缀为E,兆字节的大小后缀为E。默认单位为兆字节。
Set the minor number./设置次要号码。
Set to y to make the minor number specified persistent.
设置为y,使指定的次要数字持久化。
Creates a mirrored logical volume with Mirrors copies. For example,
specifying "-m 1" would result in a mirror with two-sides; that is, a
linear volume plus one copy.
the mirror to skip the initial resynchronization. Any data written
afterwards will be mirrored, but the original contents will not be
copied. This is useful for skipping a potentially long and resource
intensive initial sync of an empty device.
used. The default is disk, which is persistent and requires a small
amount of storage space, usually on a separate device from the data
being mirrored. Using core means the mirror is regenerated by copying
the data from the first device again each time the device is acti-
vated, for example, after every reboot.
使用镜像副本创建镜像逻辑卷。例如,指定“-m 1”将导致具有两面的镜像,
即线性卷加上一个副本。指定可选参数--nosync将导致创建镜像跳过初始重新同步。
之后写入的任何数据都将被镜像,但不会复制原始内容。
这对于跳过空设备的可能很长且资源密集的初始同步很有用。
可选参数--mirrorlog指定要使用的日志类型。默认值是磁盘,它是持久性的,
需要少量的存储空间,通常位于与要镜像的数据不同的设备上。
使用core意味着每次激活设备时(例如,每次重新启动后),
都会通过从第一个设备再次复制数据来重新生成镜像。
可选参数--corelog等价于--mirrorlog core。
The name for the new logical volume.
Without this option a default names of "lvol#" will be generated
where # is the LVM internal number of the logical volume.
新逻辑卷的名称。如果没有此选项,将生成默认名称“lvol”,其中是逻辑卷的lvm内部编号。
Set access permissions to read only or read and write.
Default is read and write.
将访问权限设置为只读或读写。
默认为读写。
Set read ahead sector count of this logical volume. For volume
groups with metadata in lvm1 format, this must be a value between 2
and 120. The default value is "auto" which allows the kernel to
choose a suitable value automatically. "None" is equivalent to spec-
ifying zero.
设置此逻辑卷的预读扇区计数。对于元数据为lvm1格式的卷组,此值必须介于2和120之间。
默认值是“auto”,它允许内核自动选择合适的值。“无”等于指定零。
A mirror is divided into regions of this size (in MB), and the mirror
log uses this granularity to track which regions are in sync.
镜像被划分成这个大小的区域(以MB为单位),镜像日志使用这个粒度来跟踪哪些区域是同步的。
Create a snapshot logical volume (or snapshot) for an existing, so
called original logical volume (or origin). Snapshots provide a
?.rozen image?. of the contents of the origin while the origin can
still be updated. They enable consistent backups and online recovery
of removed/overwritten data/files. The snapshot does not need the
same amount of storage the origin has. In a typical scenario, 15-20%
might be enough. In case the snapshot runs out of storage, use lvex-
tend(8) to grow it. Shrinking a snapshot is supported by lvreduce(8)
as well. Run lvdisplay(8) on the snapshot in order to check how much
data is allocated to it. Note that a small amount of the space you
allocate to the snapshot is used to track the locations of the chunks
of data, so you should allocate slightly more space than you actually
need and monitor the rate at which the snapshot data is growing so
you can avoid running out of space.
为现有逻辑卷(或快照)创建快照逻辑卷(或快照),即所谓的原始逻辑卷(或源)。
快照提供了?罗森形象?.源的内容,但源仍可以更新。
它们支持对已删除/覆盖的数据/文件进行一致备份和在线恢复。快照不需要与源站具有相同的存储量。
在典型情况下,15-20%可能就足够了。如果快照耗尽存储空间,
请使用lvextend(8)使其增长。lvreduce(8)也支持收缩快照。
在快照上运行lvdisplay(8),以检查分配给它的数据量。请注意,分配给快照的少量空间用于跟踪数据块的位置,
因此您应该分配比实际需要的空间稍多的空间,并监视快照数据增长的速度,这样可以避免空间不足。
Create a sparse device of the given size (in MB by default) using a
snapshot. Anything written to the device will be returned when read-
ing from it. Reading from other areas of the device will return
blocks of zeros. It is implemented by creating a hidden virtual
device of the requested size using the zero target. A suffix of
_vorigin is used for this device.
使用快照创建给定大小(默认为MB)的稀疏设备。
任何写入设备的内容在读取时都会返回。
从设备的其他区域读取将返回零块。
它是通过使用零目标创建请求大小的隐藏虚拟设备来实现的。
此设备的后缀为vorigin。
Controls zeroing of the first KB of data in the new logical volume.
Default is yes.
Volume will not be zeroed if read only flag is set.
Snapshot volumes are zeroed always.
控制新逻辑卷中前KB数据的归零。
默认值为是。
如果设置了只读标志,卷将不会归零。
快照卷始终归零。
system to hang.
警告:尝试装入未归零的逻辑卷可能导致系统挂起。
"lvcreate -i 3 -I 8 -L 100M vg00" tries to create a striped logical volume
with 3 stripes, a stripesize of 8KB and a size of 100MB in the volume group
named vg00. The logical volume name will be chosen by lvcreate.
“lvcreate-i 3-i 8-l 100m vg00”尝试在名为vg00的卷组中创建一个具有3个条带、
一个8kb的条带大小和100MB大小的条带逻辑卷。逻辑卷名将由lvcreate选择。
sides with a useable size of 500 MiB. This operation would require 3
devices - two for the mirror devices and one for the disk log.
“lvcreate-m1-l 500m vg00”尝试创建一个镜像逻辑卷,其两侧的可用大小为500mib。
此操作需要3个设备-两个用于镜像设备,一个用于磁盘日志。
"lvcreate -m1 --mirrorlog core -L 500M vg00" tries to create a mirror logi-
cal volume with 2 sides with a useable size of 500 MiB. This operation
would require 2 devices - the log is "in-memory".
“lvcreate-m1--mirrorlog core-l 500m vg00”尝试创建一个两面都有500 mib大小的镜像逻辑卷。
此操作需要2个设备-日志在内存中。
creates a snapshot logical volume named /dev/vg00/snap which has access to
the contents of the original logical volume named /dev/vg00/lvol1 at snap-
shot logical volume creation time. If the original logical volume contains a
file system, you can mount the snapshot logical volume on an arbitrary
directory in order to access the contents of the filesystem to run a backup
while the original filesystem continues to get updated.
“lvcreate--size 100M--snapshot--name snap/dev/vg00/lvol1”创建名为/dev/vg00/snap的快照逻辑卷,
在快照逻辑卷创建时可以访问名为/dev/vg00/lvol1的原始逻辑卷的内容。
如果原始逻辑卷包含文件系统,则可以将快照逻辑卷装载到任意目录上,
以便在原始文件系统继续更新时访问文件系统的内容以运行备份。
creates a sparse device named /dev/vg1/sparse of size 1TB with space for
just under 100MB of actual data on it.
“LVCreate-Virtalorigize 1T-size 1000 m-snapshot-name sparse VG1”创建一个
Sparse device named/dev/VG1/sparse of size 1TB with space for just under 100mb of actual data on it.
lvm(8), vgcreate(8), lvremove(8), lvrename(8) lvextend(8), lvreduce(8),
lvdisplay(8), lvscan(8)
man LVCREATE的更多相关文章
- Linux磁盘管理:lvcreate 常用命令
查看当前LV及PV信息: [root@rusky ~]# hostnamectl Static hostname: localhost.localdomain Transient hostname: ...
- LVM pvcreate,vgcreate,lvcreate,mkfs
首先介绍LVM的几个概念: 1. 物理卷Physical volume (PV):可以在上面建立卷组的媒介,可以是硬盘分区,也可以是硬盘本身或者回环文件(loopback file).物理卷包 ...
- lvcreate命令
lvcreate Command Examples on Linux : 1. The following command creates a logical volume 15 gigabytes ...
- pvcreate vgcreate lvcreate 扩容
centos6 服务器磁盘扩容 1.创建物理卷 /dev/sdb #pvcreate /dev/sdb 参数:/dev/sdb 设备名 2.创建卷组 vg_02 #vgcreate vg_02 / ...
- linux下 lvm 磁盘扩容
打算给系统装一个oracle,发现磁盘空间不足.在安装系统的时候我选择的是自动分区,系统就会自动以LVM的方式分区.为了保证系统后期的可用性,建议所有新系统安装都采用LVM,之后生产上的设备我也打算这 ...
- LVM基本介绍与常用命令
一.LVM介绍LVM是 Logical Volume Manager(逻辑卷管理)的简写,它是Linux环境下对磁盘分区进行管理的一种机制LVM - 优点:LVM通常用于装备大量磁盘的系统,但它同样适 ...
- Linux平台oracle 11g单实例 + ASM存储 安装部署 快速参考
操作环境:Citrix虚拟化环境中申请一个Linux6.4主机(模板)目标:创建单机11g + ASM存储 数据库 1. 主机准备 2. 创建ORACLE 用户和组成员 3. 创建以下目录并赋予对应权 ...
- archlinux安裝手记(Win10+Arch、GPT+UEFI、lvm)
准备工具和设置制作启动盘连接网络硬盘分区规划分区LVM方案创建文件系统分区挂载激活lvm2钩子基础安装和配置配置镜像源基础系统安装fstab进入系统initramfs引导程序网络搭建使用环境用户管理用 ...
- LVM逻辑卷管理命令
显示分区信息: [root@localhost /]# fdisk -l PV:物理硬盘格式化为物理卷(PV): [root@localhost /]# pvcreate /dev/sdb /dev/ ...
随机推荐
- mysql 无法存储表情字符 java.sql.SQLException: Incorrect string value: '\xF0\x9F\x90\xBE",...' for column 'XXXX' at row 1
1.变更字段类型 ALTER TABLE api_log MODIFY COLUMN remark longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_uni ...
- 013-elasticsearch5.4.3【五】-搜索API【二】term术语查询-termQuery、rangeQuery、existsQuery、prefixQuery、wildcardQuery、regexpQuery、fuzzyQuery
一.概述 虽然全文查询将在执行之前分析查询字符串,但Term级查询将根据存储在倒排索引中的确切术语进行操作. 这些查询通常用于结构化数据,如keyword.数字,日期和枚举,而不是全文字段.或者,它们 ...
- Linux命令整理 - 通用版
通用版 - 系统架构 /dev 设备文件夹 null 有去无回 mouse /sbin 系统管理必备程序 cfdisk.dhcpcd.dump.e2fsck.fdisk.halt.ifconfig.i ...
- Java 位运算符和移位运算符
一,运算的位运算符: & ~ | ^ 主要是对二进制的位计算 : & : 两个操作数中位都为1 结果才为1 其他结果为0 forExample: 128 ...
- 前端 CSS的选择器 高级选择器
高级选择器分为: 后代选择器 儿子选择器 并集选择器 交集选择器 后代选择器 使用空格表示后代选择器.父元素的后代(包括儿子,孙子,重孙子) 后代选择器 在CSS中使用非常频繁 因为HTML元素可以嵌 ...
- 记录将CentOS7linux系统python升级到3后yum安装是报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ SyntaxError: invalid syntax问题解决
前两天将CentOS7里的python版本升级到了3.5.2 今天想装个解压软件,在执行yum install -y XXX 的时候报错 然后按照提示打开这个文件 vi /usr/bin/yum yu ...
- CodeForces 877E DFS序+线段树
CodeForces 877E DFS序+线段树 题意 就是树上有n个点,然后每个点都有一盏灯,给出初始的状态,1表示亮,0表示不亮,然后有两种操作,第一种是get x,表示你需要输出x的子树和x本身 ...
- mysql-介绍、下载安装以及软件基本管理
一.mysql介绍 mysql是一个关系型数据库管理系统,它是一个基于socket编写的C/S架构的软件. 客户端软件: mysql自带:如mysql命令,mysqldump命令等. python模块 ...
- 简单实现一个textarea自适应高度
textarea自适应的实现方法很多,原理其实比较简单:监听textarea的input或者键盘事件,获取元素的scrollHeight,重置textarea元素的高度. 预览地址:textarea ...
- 【Vue】通过自定义指令回顾 v-内置指令
Vue.js 的各种指令(Directives)更加方便我们去数据驱动 DOM,例如 v-bind.v-on.v-model.v-if.v-for.v-once 等内置指令,这些指令的职责就是当表达式 ...