In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use the lvcreate command in linux, the article is very detailed, has a certain reference value, interested friends must read it!
The lvcreate command is used to create logical volumes for LVM. Logical volumes are created on top of volume groups. The device file corresponding to the logical volume is saved in the volume group directory. For example, if you create a logical volume "lvol0" on the volume group "vg1000", the device file corresponding to this logical volume is "/ dev/vg1000/lvol0".
Examples of lvcreate command usage
Create a 15G logical volume in a volume group named vg_newlvm:
[root@centos7] # lvcreate-L 15G vg_newlvm
Create a logical volume of size 2500MB in the volume group named vgnewlvm and name it centos7newvol, thus creating the block device / dev/vgnewlvm/centos7newvol:
[root@centos7] # lvcreate-L 2500-n centos7_newvol vg_newlvm
You can use the argument-l of the lvcreate command to specify the size of the logical volume extension. You can also use this parameter to extend logical volumes as a percentage of the size of the volume group. The following command creates a 50% logical volume vgnewlvm of the centos7newvol volume group:
[root@centos7] # lvcreate-l 50%VG-n centos7_newvol vg_newlvm
Create a logical volume using all the space left in the volume group
[root@centos7] # lvcreate-- name centos7newvol-l 100%FREE vgnewlvm
For more help, use the lvcreate command-help option to see:
[root@centos7 ~] # lvcreate-- helplvcreate: Create a logical volume (create logical volume) lvcreate [- A |-- autobackup {y | n}] (automatic backup) [- a |-- activate [a | e | l] {y | n}] [--addtag Tag] (add tag) [--alloc AllocationPolicy] (allocation policy) [--cachemode CacheMode] (Cache mode) [- C |-- contiguous {y | n} ] [- d |-- debug] [- h |-- help] [--ignoremonitoring] (ignore monitoring) [--monitor {y | n}] (monitoring) [- I |-- stripes Stripes [- I |-- stripesize StripeSize]] [- k |-- setactivationskip {y | n}] [- K |-- ignoreactivationskip] {- l |-extents LogicalExtentsNumber [% {VG | PVS | FREE}] | (logical extensions)-L |-- size LogicalVolumeSize [bBsSkKmMgGtTpPeE]} (logical volume size) [- M |-- persistent {y | n}] [--major major] [--minor minor] [- m |-- mirrors Mirrors [--nosync] [{--mirrorlog {disk | core | mirrored} |-- corelog}]] (mirror) [- n |-- name LogicalVolumeName] (logical volume name) [--noudevsync] [- p |-- permission {r | rw}] [--[raid] minrecoveryrate Rate] [--[raid] maxrecoveryrate Rate] [- r |-- readahead ReadAheadSectors | auto | none] (read head sector) [- R |-- regionsize MirrorLogRegionSize] (mirror logical area size) [- T |-- thin [- c |-- chunksize ChunkSize] (block size) [--discards {ignore | nopassdown | passdown}] [--poolmetadatasize MetadataSize [bBsSkKmMgG]] [--poolmetadataspare {y | n}] [--thinpool ThinPoolLogicalVolume {Name | Path}] (thin pool logical volume) [- t |-- test] [--type VolumeType] (volume type) [- v |-- verbose] [- W |-- wipesignatures {y | n}] [- Z |-- zero {y | n}] [--version] VolumeGroupName [PhysicalVolumePath...] The above is all the contents of this article entitled "how to use lvcreate commands in linux". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.