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/ ...
随机推荐
- CMAK找不到相关编译器的问题
本机安装了vs2019,在编译vulkansdk所带的samples时,遇到 错误提示: CMake Error at CMakeLists.txt: (project): Generator Vis ...
- qbzt day7上午
由于优盘咕咕咕了,所以这篇就咕咕咕了 以后还会补上的 qwq
- CentOS7 日常操作
A 安装netstat1.首先配置好本机的yum源: yum repolist all2.利用netstat命令,却提示:-bash: netstat: command not found3.执行yu ...
- Openstack_通用模块_Oslo_vmware 创建/删除 vCenter 虚拟机
目录 目录 oslovmware Connect to vCenter Server Create VirtualMachine for vCenter 常用的虚拟机配置项 删除虚拟机 oslo.vm ...
- Delphi XE2 之 FireMonkey 入门(21) - 和 FMX 相关的类(表)
TObject TPersistent TComponent IInterface,IInterfaceComponentReference TBasicAction TControl ...
- jQuery测试错题解析
1. JavaScript中实现回车切换效果是利用了event对象的( )属性. A.Tab B.keyCode C.KeyCode D.KeyDown 解析:实现回车切换效果是keyCode属性.故 ...
- KETTLE——(一)资源库
对KETTLE有了大概的了解,pdi-ce-6.0.1.0-386也下载完成了. 1.解压pdi-ce-6.0.1.0-386.zip文件,双击运行Spoon.bat(KETTLE是Java开发的,运 ...
- vue猜数字游戏
<!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...
- python3爬虫之urllib初探
urllib主要包含request(请求模块).error(异常处理模块).parse(工具模块).robotparser(识别网站的robots.txt文件,是否允许爬取). request(请求模 ...
- log4net 配置文件配置方法
转自:http://www.dozer.cc/2013/06/log4net-config-file-order/ 最近把项目中所有的日志都改成了 log4net ,同事也蠢蠢欲动,用起了 log4n ...