Linux Command Library
commands
Commands
basic
Basic
tips
Tips

lvcreate

create a logical volume in an existing volume group

- Create a logical volume of 10 gigabytes in the volume group vg1:
lvcreate -L [10G] [vg1]

- Create a 1500 megabyte linear logical volume named mylv in the volume group vg1:
lvcreate -L [1500] -n [mylv] [vg1]

- Create a logical volume called mylv that uses 60% of the total space in volume group vg1:
lvcreate -l [60%VG] -n [mylv] [vg1]

- Create a logical volume called mylv that uses all of the unallocated space in the volume group vg1:
lvcreate -l [100%FREE] -n [mylv] [vg1]

lvcreate [--addtag Tag] [--alloc AllocationPolicy] [-a|--activate [a|e|l]{y|n}] [-A|--autobackup {y|n}] [-C|--contiguous {y|n}] [-d|--debug] [-h|-?|--help] [--noudevsync] [--ignoremonitoring] [--monitor {y|n}] [-i|--stripes Stripes [-I|--stripesize StripeSize]] {[-l|--extents LogicalExtentsNumber[%{VG|PVS|FREE}] | -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]] | -V|--virtualsize VirtualSize[bBsSkKmMgGtTpPeE]} [-M|--persistent {y|n}] [--minor minor] [-m|--mirrors Mirrors [--nosync] [--mirrorlog {disk|core|mirrored} | --corelog] [-R|--regionsize MirrorLogRegionSize]] [-n|--name LogicalVolume{Name|Path}] [-p|--permission {r|rw}] [-r|--readahead {ReadAheadSectors|auto|none}] [-t|--test] [-T|--thin [-c|--chunksize ChunkSize] [--discards {ignore|nopassdown|passdown}] [--poolmetadatasize MetadataSize[bBsSkKmMgG]]] [--thinpool ThinPoolLogicalVolume{Name|Path}] [--type SegmentType] [-v|--verbose] [-Z|--zero {y|n}] VolumeGroup{Name|Path}[/ThinPoolLogicalVolumeName] [PhysicalVolumePath[:PE[-PE]]...]

lvcreate [-l|--extents LogicalExtentsNumber[%{VG|FREE|ORIGIN}] | -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]] [-c|--chunksize ChunkSize] [--noudevsync] [--ignoremonitoring] [--monitor {y|n}] [-n|--name SnapshotLogicalVolume{Name|Path}] -s|--snapshot {[VolumeGroup{Name|Path}/]OriginalLogicalVolumeName -V|--virtualsize VirtualSize[bBsSkKmMgGtTpPeE]}

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 physical volumes or by reducing existing logical volumes of this volume group in size (see lvreduce(8)). If you specify one or more PhysicalVolumes, allocation of physical extents will be restricted to these volumes.
The second form supports the creation of snapshot logical volumes which keep the contents of the original logical volume for backup purposes.

See lvm(8) for common options.
-a
, --activate {y|ay|n|ey|en|ly|ln}

Controls the availability of the Logical Volumes for immediate use after the command finishes running. By default, new Logical Volumes are activated (-ay). If it is possible technically, -an will leave the new Logical Volume inactive. But for example, snapshots can only be created in the active state so -an cannot be used with --snapshot. Normally the --zero n argument has to be supplied too because zeroing (the default behaviour) also requires activation. If autoactivation option is used (-aay), the logical volume is activated only if it matches an item in the activation/auto_activation_volume_list set in lvm.conf. For autoactivated logical volumes, --zero n is always assumed and it can’t be overridden. If clustered locking is enabled, -aey will activate exclusively on one node and -aly will activate only on the local node.

-c, --chunksize ChunkSize

Gives the size of chunk for snapshot and thin pool logical volumes. For snapshots the value must be power of 2 between 4KiB and 512KiB and the default value is 4. For thin pools the value must be between 64KiB and 1048576KiB and the default value starts with 64 and scales up to fit the pool metadata size within 128MB, if the poolmetadata size is not specified. Older dm thin pool target version (<1.4) requires the value to be power of 2. The newer version requires to be the multiple of 64KiB, however discard is not supported for non power of 2 values. Default unit is in kilobytes.

-C, --contiguous {y|n}

Sets or resets the contiguous allocation policy for logical volumes. Default is no contiguous allocation based on a next free principle.

--discards {ignore|nopassdown|passdown}

Set discards behavior. Default is passdown.

-i, --stripes Stripes

Gives the number of stripes. This is equal to the number of physical volumes to scatter the logical volume.

-I, --stripesize StripeSize

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.

-l, --extents LogicalExtentsNumber[%{VG|PVS|FREE|ORIGIN}]

Gives the number of logical extents to allocate for the new logical volume. The number can also be expressed as a percentage of the total space in the Volume Group with the suffix %VG, as a percentage of the remaining free space in the Volume Group with the suffix %FREE, as a percentage of the remaining free space for the specified PhysicalVolume(s) with the suffix %PVS, or (for a snapshot) as a percentage of the total space in the Origin Logical Volume with the suffix %ORIGIN.

-L, --size LogicalVolumeSize[bBsSkKmMgGtTpPeE]

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 terabytes, P for petabytes or E for exabytes is optional.
Default unit is megabytes.

--minor minor

Set the minor number.

-M, --persistent {y|n}

Set to y to make the minor number specified persistent.

-m, --mirrors Mirrors

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.

Specifying the optional argument --nosync will cause the creation of 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.

The optional argument --mirrorlog specifies the type of log to be 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 activated, for example, after every reboot. Using "mirrored" will create a persistent log that is itself mirrored.

The optional argument --corelog is equivalent to --mirrorlog core.

-n, --name LogicalVolume{Name|Path}

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.

--noudevsync

Disable udev synchronisation. The process will not wait for notification from udev. It will continue irrespective of any possible udev processing in the background. You should only use this if udev is not running or has rules that ignore the devices LVM2 creates.

--monitor {y|n}

Start or avoid monitoring a mirrored or snapshot logical volume with dmeventd, if it is installed. If a device used by a monitored mirror reports an I/O error, the failure is handled according to mirror_image_fault_policy and mirror_log_fault_policy set in lvm.conf.

--ignoremonitoring

Make no attempt to interact with dmeventd unless --monitor is specified.

-p, --permission {r|rw}

Set access permissions to read only or read and write.
Default is read and write.

--poolmetadatasize MetadataSize[bBsSkKmMgG]

Set the size of thin pool’s metadata logical volume. Supported value is in range between 2MiB and 16GiB. Default value is (Pool_LV_size / Pool_LV_chunk_size accept.8.gz accessdb.8.gz acpid.8.gz acpi_listen.8.gz add-apt-key.8.gz addgroup.8.gz addpart.8.gz add-shell.8.gz adduser.8.gz agetty.8.gz anacron.8.gz apt.8.gz apt-cache.8.gz apt-cdrom.8.gz apt-clone.8.gz apt-config.8.gz apt-get.8.gz aptitude.8.gz aptitude-curses.8.gz apt-key.8.gz apt-mark.8.gz apt-secure.8.gz apturl.8.gz apturl-gtk.8.gz arp.8.gz arpd.8.gz arping.8.gz aspell-autobuildhash.8.gz atieventsd.8 avahi-autoipd.8.gz avahi-autoipd.action.8.gz avahi-daemon.8.gz badblocks.8.gz bccmd.8.gz biosdecode.8.gz blkid.8.gz blockdev.8.gz bluetoothd.8.gz bridge.8.gz btcflash.8.gz calibrate_ppa.8.gz capsh.8.gz catman.8.gz cfdisk.8.gz chat.8.gz chgpasswd.8.gz chpasswd.8.gz chroot.8.gz cifs.idmap.8.gz cifs.upcall.8.gz clock.8.gz cpgr.8.gz cppw.8.gz cracklib-check.8.gz cracklib-format.8.gz cracklib-packer.8.gz cracklib-unpacker.8.gz crda.8.gz create-cracklib-dict.8.gz cron.8.gz cryptdisks_start.8.gz cryptdisks_stop.8.gz cryptsetup.8.gz cryptsetup-reencrypt.8.gz ctrlaltdel.8.gz ctstat.8.gz cupsaccept.8.gz cupsaddsmb.8.gz cups-browsed.8.gz cups-calibrate.8.gz cupsctl.8.gz cupsd.8.gz cups-deviced.8.gz cupsdisable.8.gz cups-driverd.8.gz cupsenable.8.gz cupsfilter.8.gz cups-genppdupdate.8.gz cups-lpd.8.gz cupsreject.8.gz cytune.8.gz debugfs.8.gz debugreiserfs.8.gz delgroup.8.gz delpart.8.gz deluser.8.gz depmod.8.gz dhclient.8.gz dhclient-script.8.gz dkms.8.gz dmevent_tool.8.gz dmidecode.8.gz dmraid.8.gz dmsetup.8.gz dnsmasq.8.gz dosfsck.8.gz dosfslabel.8.gz dpkg-divert.8.gz dpkg-preconfigure.8.gz dpkg-reconfigure.8.gz dpkg-statoverride.8.gz dumpe2fs.8.gz e2freefrag.8.gz e2fsck.8.gz e2image.8.gz e2label.8.gz e2undo.8.gz e4defrag.8.gz ecryptfsd.8.gz ecryptfs-manager.8.gz ecryptfs-migrate-home.8.gz efibootmgr.8.gz eventlogadm.8.gz faillog.8.gz fatlabel.8.gz fdformat.8.gz fdisk.8.gz filefrag.8.gz findfs.8.gz findmnt.8.gz fsadm.8.gz fsck.8.gz fsck.ext2.8.gz fsck.ext3.8.gz fsck.ext4.8.gz fsck.ext4dev.8.gz fsck.fat.8.gz fsck.jfs.8.gz fsck.minix.8.gz fsck.msdos.8.gz fsck.nfs.8.gz fsck.reiserfs.8.gz fsck.vfat.8.gz fsck.xfs.8.gz fsfreeze.8.gz fstab-decode.8.gz fstrim.8.gz fstrim-all.8.gz gconf-schemas.8.gz getcap.8.gz getkeycodes.8.gz getty.8.gz groupadd.8.gz groupdel.8.gz groupmod.8.gz grpck.8.gz grpconv.8.gz grpunconv.8.gz grub-install.8.gz grub-macbless.8.gz grub-mkconfig.8.gz grub-mkdevicemap.8.gz grub-probe.8.gz grub-reboot.8.gz grub-set-default.8.gz halt.8.gz hciattach.8.gz hciconfig.8.gz hddtemp.8.gz hdparm.8.gz hid2hci.8.gz hwclock.8.gz i386.8.gz iconvconfig.8.gz idmap_rfc2307.8.gz idmapwb.8.gz ifconfig.8.gz ifdown.8.gz ifquery.8.gz ifup.8.gz im-config.8.gz init.8.gz init-checkconf.8.gz initctl2dot.8.gz initctl.8.gz initramfs-tools.8.gz insmod.8.gz insserv.8.gz install-docs.8.gz installkernel.8.gz install-sgmlcatalog.8.gz intro.8.gz invoke-rc.d.8.gz inxi.8.gz ip6tables.8.gz ip6tables-apply.8.gz ip6tables-restore.8.gz ip6tables-save.8.gz ip.8.gz ip-address.8.gz ip-addrlabel.8.gz ip-l2tp.8.gz ip-link.8.gz ip-maddress.8.gz ip-monitor.8.gz ip-mroute.8.gz ip-neighbour.8.gz ip-netconf.8.gz ip-netns.8.gz ip-ntable.8.gz ip-route.8.gz ip-rule.8.gz iptables.8.gz iptables-apply.8.gz iptables-extensions.8.gz iptables-restore.8.gz iptables-save.8.gz ip-tcp_metrics.8.gz ip-token.8.gz ip-tunnel.8.gz ip-xfrm.8.gz isadump.8.gz isaset.8.gz isosize.8.gz ispell-autobuildhash.8.gz iw.8.gz iwconfig.8.gz iwevent.8.gz iwgetid.8.gz iwlist.8.gz iwpriv.8.gz iwspy.8.gz jfs_debugfs.8.gz jfs_fsck.8.gz jfs_fscklog.8.gz jfs_logdump.8.gz jfs_mkfs.8.gz jfs_tune.8.gz kbdrate.8.gz kerneloops.8.gz key.dns_resolver.8.gz killall5.8.gz kpartx.8.gz l2ping.8.gz laptop-detect.8.gz lastlog.8.gz ldattach.8.gz ldconfig.8.gz ld-linux.8.gz ld-linux.so.8.gz ld.so.8.gz lnstat.8.gz loadndisdriver-1.9.8.gz loadndisdriver.8.gz loadunimap.8.gz locale-gen.8.gz logrotate.8.gz logsave.8.gz losetup.8.gz lowntfs-3g.8.gz lpadmin.8.gz lpc.8.gz lpinfo.8.gz lpmove.8.gz lsblk.8.gz lsinitramfs.8.gz lsmod.8.gz lsof.8.gz lspci.8.gz lspcmcia.8.gz lsusb.8.gz luksformat.8.gz lvchange.8.gz lvconvert.8.gz lvcreate.8.gz lvdisplay.8.gz lvextend.8.gz lvm.8.gz lvmchange.8.gz lvmconf.8.gz lvmdiskscan.8.gz lvmdump.8.gz lvmsadc.8.gz lvmsar.8.gz lvreduce.8.gz lvremove.8.gz lvrename.8.gz lvresize.8.gz lvs.8.gz lvscan.8.gz MAKEDEV.8.gz make-ssl-cert.8.gz mandb.8.gz mapscrn.8.gz mdm.8.gz mdmlogin.8.gz mii-tool.8.gz mkdosfs.8.gz mke2fs.8.gz mkfs.8.gz mkfs.bfs.8.gz mkfs.ext2.8.gz mkfs.ext3.8.gz mkfs.ext4.8.gz mkfs.ext4dev.8.gz mkfs.fat.8.gz mkfs.jfs.8.gz mkfs.minix.8.gz mkfs.msdos.8.gz mkfs.ntfs.8.gz mkfs.reiserfs.8.gz mkfs.vfat.8.gz mkfs.xfs.8.gz mkhomedir_helper.8.gz mkinitramfs.8.gz mklost+found.8.gz mk_modmap.8.gz mkntfs.8.gz mkreiserfs.8.gz mksmbpasswd.8.gz mkswap.8.gz mmcli.8.gz ModemManager.8.gz modinfo.8.gz modprobe.8.gz mount.8.gz mountall.8.gz mount.cifs.8.gz mount.ecryptfs.8.gz mount.fuse.8.gz mount.lowntfs-3g.8.gz mount.ntfs-3g.8.gz mount.ntfs.8.gz mount.vboxsf.8.gz mtr.8.gz nameif.8.gz ndiswrapper-1.9.8.gz ndiswrapper.8.gz net.8.gz netstat.8.gz NetworkManager.8.gz newusers.8.gz nfnl_osf.8.gz nmbd.8.gz nologin.8.gz nstat.8.gz ntfs-3g.8.gz ntfs-3g.probe.8.gz ntfs-3g.secaudit.8.gz ntfs-3g.usermap.8.gz ntfscat.8.gz ntfsclone.8.gz ntfscluster.8.gz ntfscmp.8.gz ntfscp.8.gz ntfsfix.8.gz ntfsinfo.8.gz ntfslabel.8.gz ntfsls.8.gz ntfsprogs.8.gz ntfsresize.8.gz ntfsundelete.8.gz ntpdate.8.gz ntpdate-debian.8.gz ownership.8.gz pam_access.8.gz pam-auth-update.8.gz pam_ck_connector.8.gz pam_debug.8.gz pam_deny.8.gz pam_echo.8.gz pam_ecryptfs.8.gz pam_env.8.gz pam_exec.8.gz pam_faildelay.8.gz pam_filter.8.gz pam_ftp.8.gz pam_getenv.8.gz pam_group.8.gz pam_issue.8.gz pam_keyinit.8.gz pam_lastlog.8.gz pam_limits.8.gz pam_listfile.8.gz pam_localuser.8.gz pam_loginuid.8.gz pam_mail.8.gz pam_mkhomedir.8.gz pam_motd.8.gz pam_namespace.8.gz pam_nologin.8.gz pam_permit.8.gz pam_pwhistory.8.gz pam_rhosts.8.gz pam_rootok.8.gz pam_securetty.8.gz pam_selinux.8.gz pam_sepermit.8.gz pam_shells.8.gz pam_succeed_if.8.gz pam_systemd.8.gz pam_tally2.8.gz pam_tally.8.gz pam_time.8.gz pam_timestamp.8.gz pam_timestamp_check.8.gz pam_tty_audit.8.gz pam_umask.8.gz pam_unix.8.gz pam_userdb.8.gz pam_warn.8.gz pam_wheel.8.gz pam_xauth.8.gz paperconfig.8.gz parted.8.gz partprobe.8.gz partx.8.gz pccardctl.8.gz pcimodules.8.gz pdbedit.8.gz pidof.8.gz ping6.8.gz ping.8.gz pivot_root.8.gz pklocalauthority.8.gz plipconfig.8.gz pm-action.8.gz pm-hibernate.8.gz pm-powersave.8.gz pm-suspend.8.gz pm-suspend-hybrid.8.gz polkit.8.gz polkitd.8.gz poweroff.8.gz pppconfig.8.gz pppd.8.gz pppd-radattr.8.gz pppd-radius.8.gz pppdump.8.gz pppoe.8.gz pppoeconf.8.gz pppoe-connect.8.gz pppoe-discovery.8.gz pppoe-relay.8.gz pppoe-server.8.gz pppoe-setup.8.gz pppoe-sniff.8.gz pppoe-start.8.gz pppoe-status.8.gz pppoe-stop.8.gz pppstats.8.gz pptp.8.gz pptpsetup.8.gz pvchange.8.gz pvck.8.gz pvcreate.8.gz pvdisplay.8.gz pvmove.8.gz pvremove.8.gz pvresize.8.gz pvs.8.gz pvscan.8.gz pwck.8.gz pwconv.8.gz pwunconv.8.gz radeontool.8.gz rarp.8.gz raw.8.gz rdate.8.gz reboot.8.gz regdbdump.8.gz reiserfsck.8.gz reiserfstune.8.gz reject.8.gz reload.8.gz remove-default-ispell.8.gz remove-default-wordlist.8.gz remove-shell.8.gz request-key.8.gz resize2fs.8.gz resizecons.8.gz resizepart.8.gz resize_reiserfs.8.gz resolvconf.8.gz restart.8.gz rfkill.8.gz rmmod.8.gz rmt.8.gz rmt-tar.8.gz route.8.gz routef.8.gz routel.8.gz rpl8.8.gz rsyslogd.8.gz rtacct.8.gz rtcwake.8.gz rtkitctl.8.gz rtmon.8.gz rtstat.8.gz runlevel.8.gz run-parts.8.gz sa1.8.gz sa2.8.gz sadc.8.gz safe_finger.8.gz samba.8.gz samba-regedit.8.gz samba-tool.8.gz saned.8.gz savelog.8.gz select-default-ispell.8.gz select-default-wordlist.8.gz sensors-detect.8.gz service.8.gz setarch.8.gz setcap.8.gz setfont.8.gz setkeycodes.8.gz setlogcons.8.gz setpci.8.gz setvesablank.8.gz setvtrgb.8.gz sfdisk.8.gz sftp-server.8.gz shadowconfig.8.gz showconsolefont.8.gz shutdown.8.gz slattach.8.gz sln.8.gz smbd.8.gz smbpasswd.8.gz smbspool.8.gz smbta-util.8.gz ss.8.gz sshd.8.gz ssh-keysign.8.gz ssh-pkcs11-helper.8.gz start.8.gz startpar.8.gz start-stop-daemon.8.gz status.8.gz stop.8.gz sudo.8.gz sudoedit.8.gz sudo_plugin.8.gz sudoreplay.8.gz sudo_root.8.gz sulogin.8.gz swaplabel.8.gz swapoff.8.gz swapon.8.gz switch_root.8.gz synaptic.8.gz sync.8.gz sync-available.8.gz sysctl.8.gz systemd-hostnamed.8.gz systemd-hostnamed.service.8.gz systemd-localed.8.gz systemd-localed.service.8.gz systemd-logind.8.gz systemd-logind.service.8.gz systemd-timedated.8.gz systemd-timedated.service.8.gz systemd-udevd.8.gz systemd-udevd-control.socket.8.gz systemd-udevd-kernel.socket.8.gz systemd-udevd.service.8.gz tc.8.gz tc-bfifo.8.gz tc-cbq.8.gz tc-cbq-details.8.gz tc-choke.8.gz tc-codel.8.gz tc-drr.8.gz tc-ematch.8.gz tc-fq_codel.8.gz tc-hfsc.8.gz tc-htb.8.gz tc-netem.8.gz tcpd.8.gz tcpdchk.8.gz tcpdmatch.8.gz tcpdump.8.gz tc-pfifo.8.gz tc-pfifo_fast.8.gz tc-prio.8.gz tc-red.8.gz tc-sfb.8.gz tc-sfq.8.gz tc-stab.8.gz tc-tbf.8.gz tdbbackup.8.gz tdbbackup.tdbtools.8.gz tdbdump.8.gz tdbrestore.8.gz tdbtool.8.gz telinit.8.gz torchat.8.gz tracepath6.8.gz tracepath.8.gz traceroute6.8.gz traceroute6.iputils.8.gz try-from.8.gz tune2fs.8.gz tunelp.8.gz tzselect.8.gz udevadm.8.gz udevd.8.gz udisks.8.gz udisksd.8.gz udisks-daemon.8.gz ufw.8.gz ufw-framework.8.gz umount.8.gz umount.ecryptfs.8.gz unattended-upgrade.8.gz unix_chkpwd.8.gz unix_update.8.gz update-alternatives.8.gz update-apt-xapian-index.8.gz update-binfmts.8.gz update-ca-certificates.8.gz update-catalog.8.gz update-cracklib.8.gz updatedb.8.gz update-default-aspell.8.gz update-default-ispell.8.gz update-default-wordlist.8.gz update-dictcommon-aspell.8.gz update-dictcommon-hunspell.8.gz update-fonts-alias.8.gz update-fonts-dir.8.gz update-fonts-scale.8.gz update-gconf-defaults.8.gz update-grub2.8.gz update-grub.8.gz update-icon-caches.8.gz update-icon-caches.gtk2.8.gz update-inetd.8.gz update-info-dir.8.gz update-initramfs.8.gz update-java-alternatives.8.gz update-mime.8.gz update-passwd.8.gz update-pciids.8.gz update-python-modules.8.gz update-rc.d.8.gz update-usbids.8.gz update-xmlcatalog.8.gz upowerd.8.gz upstart-dbus-bridge.8.gz upstart-event-bridge.8.gz upstart-file-bridge.8.gz upstart-local-bridge.8.gz upstart-socket-bridge.8.gz upstart-udev-bridge.8.gz ureadahead.8.gz useradd.8.gz userdel.8.gz usermod.8.gz uuidd.8.gz VBoxControl.8.gz VBoxService.8.gz vcstime.8.gz veritysetup.8.gz vgcfgbackup.8.gz vgcfgrestore.8.gz vgchange.8.gz vgck.8.gz vgconvert.8.gz vgcreate.8.gz vgdisplay.8.gz vgexport.8.gz vgextend.8.gz vgimport.8.gz vgimportclone.8.gz vgmerge.8.gz vgmknodes.8.gz vgreduce.8.gz vgremove.8.gz vgrename.8.gz vgs.8.gz vgscan.8.gz vgsplit.8.gz vigr.8.gz vipw.8.gz visudo.8.gz vmstat.8.gz vpddecode.8.gz wipefs.8.gz wpa_action.8.gz wpa_background.8.gz wpa_cli.8.gz wpa_passphrase.8.gz wpa_supplicant.8.gz x86_64.8.gz xfs_admin.8.gz xfs_bmap.8.gz xfs_check.8.gz xfs_copy.8.gz xfs_db.8.gz xfs_estimate.8.gz xfs_freeze.8.gz xfs_fsr.8.gz xfs_growfs.8.gz xfs_info.8.gz xfs_io.8.gz xfs_logprint.8.gz xfs_mdrestore.8.gz xfs_metadump.8.gz xfs_mkfile.8.gz xfs_ncheck.8.gz xfs_quota.8.gz xfs_repair.8.gz xfs_rtcp.8.gz xtables-multi.8.gz zdump.8.gz zic.8.gz 64b). Default unit is megabytes.

-r, --readahead {ReadAheadSectors|auto|none}

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 specifying zero.

-R, --regionsize MirrorLogRegionSize

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.

-s, --snapshot OriginalLogicalVolume{Name|Path}

Create a snapshot logical volume (or snapshot) for an existing, so called original logical volume (or origin). Snapshots provide a ’frozen 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. Thin snapshot is created when the origin is a thin volume and the size is not specified. Thin snapshot shares same blocks within the thin pool volume. The snapshot with the specified size 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 lvextend(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.

-T, --thin, --thinpool ThinPoolLogicalVolume{Name|Path}

Creates thin pool or thin logical volume or both. Specifying the optional argument --size will cause the creation of the thin pool logical volume. Specifying the optional argument --virtualsize will cause the creation of the thin logical volume from given thin pool volume. Specifying both arguments will cause the creation of both thin pool and thin volume using this pool. Requires device mapper kernel driver for thin provisioning from kernel 3.2 or newer.

--type SegmentType

Create a logical volume that uses the specified segment type (e.g. "raid5", "mirror", "snapshot", "thin", "thin-pool"). Many segment types have a commandline switch alias that will enable their use (-s is an alias for --type snapshot). However, this argument must be used when no existing commandline switch alias is available for the desired type, as is the case with error, zero, raid1, raid4, raid5 or raid6.

-V, --virtualsize VirtualSize[bBsSkKmMgGtTpPeE]

Create a sparse device of the given size (in MB by default) using a snapshot or thinly provisioned device when thin pool is specified. Anything written to the device will be returned when reading from it. Reading from other areas of the device will return blocks of zeros. Virtual snapshot 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.

-Z, --zero {y|n}

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.

Warning: trying to mount an unzeroed logical volume can cause the system to hang.

Creates 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

Creates a mirror logical volume with 2 sides with a useable size of 500 MiB. This operation would require 3 devices (or option --alloc anywhere) - two for the mirror devices and one for the disk log:

lvcreate -m1 -L 500M vg00

Creates a mirror logical 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

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 snapshot 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

Creates a sparse device named /dev/vg1/sparse of size 1TiB with space for just under 100MiB of actual data on it:

lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1

Creates a linear logical volume "vg00/lvol1" using physical extents /dev/sda:0-7 and /dev/sdb:0-7 for allocation of extents:

lvcreate -L 64M -n lvol1 vg00 /dev/sda:0-7 /dev/sdb:0-7

Creates a 5GiB RAID5 logical volume "vg00/my_lv", with 3 stripes (plus a parity drive for a total of 4 devices) and a stripesize of 64KiB:

lvcreate --type raid5 -L 5G -i 3 -I 64 -n my_lv vg00

Creates 100MiB pool logical volume for thin provisioning build with 2 stripes 64KiB and chunk size 128KiB together with 1TiB thin provisioned logical volume "vg00/thin_lv":

lvcreate -i 2 -I 64 -c 256 -L100M -T vg00/pool -V 1T --name thin_lv

lvm(8), vgcreate(8), lvchange(8), lvremove(8), lvrename(8) lvextend(8), lvreduce(8), lvdisplay(8), lvscan(8)

play store download app store download
Imprint
Sonnenallee 29, 12047 Berlin, Germany
e-mail: sschubert89@gmail.com

Privacy policy
Successfully copied