1. [root@ftp:/root]
  2. > fdisk -l
  3.  
  4. Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
  5. Units = sectors of 1 * 512 = 512 bytes
  6. Sector size (logical/physical): 512 bytes / 512 bytes
  7. I/O size (minimum/optimal): 512 bytes / 512 bytes
  8. Disk label type: dos
  9. Disk identifier: 0x000c50af
  10.  
  11. Device Boot Start End Blocks Id System
  12. /dev/sda1 * 2048 2099199 1048576 83 Linux
  13. /dev/sda2 2099200 104857599 51379200 8e Linux LVM
  14.  
  15. Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
  16. Units = sectors of 1 * 512 = 512 bytes
  17. Sector size (logical/physical): 512 bytes / 512 bytes
  18. I/O size (minimum/optimal): 512 bytes / 512 bytes
  19. Disk label type: dos
  20. Disk identifier: 0x714b81a4
  21.  
  22. Device Boot Start End Blocks Id System
  23. /dev/sdb1 2048 20971519 10484736 5 Extended
  24. /dev/sdb5 4096 3909631 1952768 83 Linux
  25.  
  26. Disk /dev/sdc: 10.7 GB, 10737418240 bytes, 20971520 sectors
  27. Units = sectors of 1 * 512 = 512 bytes
  28. Sector size (logical/physical): 512 bytes / 512 bytes
  29. I/O size (minimum/optimal): 512 bytes / 512 bytes
  30.  
  31. Disk /dev/mapper/rootvg-root: 61.2 GB, 61194895360 bytes, 119521280 sector
  32. Units = sectors of 1 * 512 = 512 bytes
  33. Sector size (logical/physical): 512 bytes / 512 bytes
  34. I/O size (minimum/optimal): 512 bytes / 512 bytes
  35.  
  36. Disk /dev/mapper/rootvg-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
  37. Units = sectors of 1 * 512 = 512 bytes
  38. Sector size (logical/physical): 512 bytes / 512 bytes
  39. I/O size (minimum/optimal): 512 bytes / 512 bytes
  40.  
  41. [root@ftp:/root]
  42. > pvscan
  43. File descriptor 3 (pipe:[4198548]) leaked on pvscan invocation. Parent PID
  44. PV /dev/sda2 VG rootvg lvm2 [<49.00 GiB / 0 free]
  45. PV /dev/sdc VG rootvg lvm2 [<10.00 GiB / 0 free]
  46. Total: 2 [58.99 GiB] / in use: 2 [58.99 GiB] / in no VG: 0 [0 ]
  47.  
  48. [root@ftp:/root]
  49. > pvdisplay
  50. File descriptor 3 (pipe:[4198548]) leaked on pvdisplay invocation. Parent
  51. --- Physical volume ---
  52. PV Name /dev/sda2
  53. VG Name rootvg
  54. PV Size <49.00 GiB / not usable 3.00 MiB
  55. Allocatable yes (but full)
  56. PE Size 4.00 MiB
  57. Total PE 12543
  58. Free PE 0
  59. Allocated PE 12543
  60. PV UUID dXiNdh-ePAR-VhiU-PPOy-seF2-eezg-AYAwx5
  61.  
  62. --- Physical volume ---
  63. PV Name /dev/sdc
  64. VG Name rootvg
  65. PV Size 10.00 GiB / not usable 4.00 MiB
  66. Allocatable yes (but full)
  67. PE Size 4.00 MiB
  68. Total PE 2559
  69. Free PE 0
  70. Allocated PE 2559
  71. PV UUID YkDJG5-2JJp-DX2c-mGpS-QMn7-796E-VrA1i6
  72.  
  73. [root@ftp:/root]
  74. > pvdisplay /dev/sda2
  75. File descriptor 3 (pipe:[4198548]) leaked on pvdisplay invocation. Parent
  76. --- Physical volume ---
  77. PV Name /dev/sda2
  78. VG Name rootvg
  79. PV Size <49.00 GiB / not usable 3.00 MiB
  80. Allocatable yes (but full)
  81. PE Size 4.00 MiB
  82. Total PE 12543
  83. Free PE 0
  84. Allocated PE 12543
  85. PV UUID dXiNdh-ePAR-VhiU-PPOy-seF2-eezg-AYAwx5
  86.  
  87. [root@ftp:/root]
  88. > vgscan
  89. File descriptor 3 (pipe:[4198548]) leaked on vgscan invocation. Parent PID
  90. Reading volume groups from cache.
  91. Found volume group "rootvg" using metadata type lvm2
  92.  
  93. [root@ftp:/root]
  94. > vgs
  95. File descriptor 3 (pipe:[4198548]) leaked on vgs invocation. Parent PID 11
  96. VG #PV #LV #SN Attr VSize VFree
  97. rootvg 2 2 0 wz--n- 58.99g 0
  98.  
  99. [root@ftp:/root]
  100. > vgdisplay
  101. File descriptor 3 (pipe:[4198548]) leaked on vgdisplay invocation. Parent
  102. --- Volume group ---
  103. VG Name rootvg
  104. System ID
  105. Format lvm2
  106. Metadata Areas 2
  107. Metadata Sequence No 6
  108. VG Access read/write
  109. VG Status resizable
  110. MAX LV 0
  111. Cur LV 2
  112. Open LV 2
  113. Max PV 0
  114. Cur PV 2
  115. Act PV 2
  116. VG Size 58.99 GiB
  117. PE Size 4.00 MiB
  118. Total PE 15102
  119. Alloc PE / Size 15102 / 58.99 GiB
  120. Free PE / Size 0 / 0
  121. VG UUID jYMaK1-7oqd-rFon-EI6M-daY2-oLIX-KVuXIO
  122.  
  123. [root@ftp:/root]
  124. > vgdisplay rootvg
  125. File descriptor 3 (pipe:[4198548]) leaked on vgdisplay invocation. Parent
  126. --- Volume group ---
  127. VG Name rootvg
  128. System ID
  129. Format lvm2
  130. Metadata Areas 2
  131. Metadata Sequence No 6
  132. VG Access read/write
  133. VG Status resizable
  134. MAX LV 0
  135. Cur LV 2
  136. Open LV 2
  137. Max PV 0
  138. Cur PV 2
  139. Act PV 2
  140. VG Size 58.99 GiB
  141. PE Size 4.00 MiB
  142. Total PE 15102
  143. Alloc PE / Size 15102 / 58.99 GiB
  144. Free PE / Size 0 / 0
  145. VG UUID jYMaK1-7oqd-rFon-EI6M-daY2-oLIX-KVuXIO
  146.  
  147. [root@ftp:/root]
  148. > lvscan
  149. File descriptor 3 (pipe:[4198548]) leaked on lvscan invocation. Parent PID
  150. ACTIVE '/dev/rootvg/swap' [2.00 GiB] inherit
  151. ACTIVE '/dev/rootvg/root' [56.99 GiB] inherit
  152.  
  153. [root@ftp:/root]
  154. > lvs
  155. File descriptor 3 (pipe:[4198548]) leaked on lvs invocation. Parent PID 11
  156. LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Syn
  157. root rootvg -wi-ao---- 56.99g
  158. swap rootvg -wi-ao---- 2.00g
  159.  
  160. [root@ftp:/root]
  161. > lvdisplay
  162. File descriptor 3 (pipe:[4198548]) leaked on lvdisplay invocation. Parent
  163. --- Logical volume ---
  164. LV Path /dev/rootvg/swap
  165. LV Name swap
  166. VG Name rootvg
  167. LV UUID WySyzT-x2br-xtfU-Grbg-GjAj-KorV-m8yZvo
  168. LV Write Access read/write
  169. LV Creation host, time MiWiFi-R3L-srv, 2018-02-28 09:37:10 +0800
  170. LV Status available
  171. # open 2
  172. LV Size 2.00 GiB
  173. Current LE 512
  174. Segments 1
  175. Allocation inherit
  176. Read ahead sectors auto
  177. - currently set to 8192
  178. Block device 253:1
  179.  
  180. --- Logical volume ---
  181. LV Path /dev/rootvg/root
  182. LV Name root
  183. VG Name rootvg
  184. LV UUID t71Wnu-l8eu-LZbw-GKew-jKTS-GxdF-d7XL5F
  185. LV Write Access read/write
  186. LV Creation host, time MiWiFi-R3L-srv, 2018-02-28 09:37:11 +0800
  187. LV Status available
  188. # open 1
  189. LV Size 56.99 GiB
  190. Current LE 14590
  191. Segments 2
  192. Allocation inherit
  193. Read ahead sectors auto
  194. - currently set to 8192
  195. Block device 253:0
  196.  
  197. [root@ftp:/root]
  198. > lvdisplay /dev/rootvg/root
  199. File descriptor 3 (pipe:[4198548]) leaked on lvdisplay invocation. Parent
  200. --- Logical volume ---
  201. LV Path /dev/rootvg/root
  202. LV Name root
  203. VG Name rootvg
  204. LV UUID t71Wnu-l8eu-LZbw-GKew-jKTS-GxdF-d7XL5F
  205. LV Write Access read/write
  206. LV Creation host, time MiWiFi-R3L-srv, 2018-02-28 09:37:11 +0800
  207. LV Status available
  208. # open 1
  209. LV Size 56.99 GiB
  210. Current LE 14590
  211. Segments 2
  212. Allocation inherit
  213. Read ahead sectors auto
  214. - currently set to 8192
  215. Block device 253:0
  216.  
  217. [root@ftp:/root]
  218. > df -TH
  219. Filesystem Type Size Used Avail Use% M
  220. /dev/mapper/centos_miwifi--r3l--srv-root xfs 51G 4.4G 47G 9% /
  221. devtmpfs devtmpfs 4.1G 0 4.1G 0% /
  222. tmpfs tmpfs 4.1G 29k 4.1G 1% /
  223. tmpfs tmpfs 4.1G 26M 4.1G 1% /
  224. tmpfs tmpfs 4.1G 0 4.1G 0% /
  225. /dev/sda1 xfs 1.1G 150M 914M 15% /
  226. //192.168.31.20/share cifs 7.8T 4.1T 3.8T 53% /
  227. tmpfs tmpfs 819M 0 819M 0% /
  228.  
  229. [root@ftp:/root]
  230. > man lvcreate
  231. LVCREATE(8) System Manager's Manual LVCREATE(8)
  232.  
  233. NAME
  234. lvcreate - Create a logical volume
  235.  
  236. SYNOPSIS
  237. lvcreate option_args position_args
  238. [ option_args ]
  239. [ position_args ]
  240.  
  241. -a|--activate y|n|ay
  242. --addtag Tag
  243. --alloc contiguous|cling|cling_by_tags|normal|any‐
  244. where|inherit
  245. -A|--autobackup y|n
  246. -H|--cache
  247. --cachemetadataformat auto|1|2
  248. --cachemode writethrough|writeback|passthrough
  249. --cachepolicy String
  250. --cachepool LV
  251. --cachesettings String
  252. -c|--chunksize Size[k|UNIT]
  253. --commandprofile String
  254. --config String
  255. -C|--contiguous y|n
  256. -d|--debug
  257. --discards passdown|nopassdown|ignore
  258. --driverloaded y|n
  259. --errorwhenfull y|n
  260. -l|--extents Number[PERCENT]
  261. -h|--help
  262. -K|--ignoreactivationskip
  263. --ignoremonitoring
  264. --longhelp
  265. -j|--major Number
  266. --[raid]maxrecoveryrate Size[k|UNIT]
  267. --metadataprofile String
  268. --minor Number
  269. --[raid]minrecoveryrate Size[k|UNIT]
  270. --mirrorlog core|disk
  271. -m|--mirrors Number
  272. --monitor y|n
  273. -n|--name String
  274. --nosync
  275. --noudevsync
  276. -p|--permission rw|r
  277. -M|--persistent y|n
  278. --poolmetadatasize Size[m|UNIT]
  279. --poolmetadataspare y|n
  280. --profile String
  281. -q|--quiet
  282. -r|--readahead auto|none|Number
  283. -R|--regionsize Size[m|UNIT]
  284. --reportformat basic|json
  285. -k|--setactivationskip y|n
  286. -L|--size Size[m|UNIT]
  287. -s|--snapshot
  288. -i|--stripes Number
  289. -I|--stripesize Size[k|UNIT]
  290. -t|--test
  291. -T|--thin
  292. --thinpool LV
  293. --type linear|striped|snapshot|mir‐
  294. ror|raid|thin|cache|thin-pool|cache-pool
  295. -v|--verbose
  296. --version
  297. -V|--virtualsize Size[m|UNIT]
  298. -W|--wipesignatures y|n
  299. -y|--yes
  300. -Z|--zero y|n
  301.  
  302. DESCRIPTION
  303. lvcreate creates a new LV in a VG. For standard LVs, this
  304. requires allocating logical extents from the VG's free physical
  305. extents. If there is not enough free space, the VG can be
  306. extended with other PVs (vgextend(8)), or existing LVs can be
  307. reduced or removed (lvremove(8), lvreduce(8).)
  308.  
  309. To control which PVs a new LV will use, specify one or more PVs
  310. as position args at the end of the command line. lvcreate will
  311. allocate physical extents only from the specified PVs.
  312.  
  313. lvcreate can also create snapshots of existing LVs, e.g. for
  314. backup purposes. The data in a new snapshot LV represents the
  315. content of the original LV from the time the snapshot was cre
  316. ated.
  317.  
  318. RAID LVs can be created by specifying an LV type when creating
  319. the LV (see lvmraid(7)). Different RAID levels require different
  320. numbers of unique PVs be available in the VG for allocation.
  321.  
  322. Thin pools (for thin provisioning) and cache pools (for caching)
  323. are represented by special LVs with types thin-pool and
  324. cache-pool (see lvmthin(7) and lvmcache(7)). The pool LVs are
  325. not usable as standard block devices, but the LV names act as
  326. references to the pools.
  327.  
  328. Thin LVs are thinly provisioned from a thin pool, and are cre
  329. ated with a virtual size rather than a physical size. A cache LV
  330. is the combination of a standard LV with a cache pool, used to
  331. cache active portions of the LV to improve performance.
  332.  
  333. Usage notes
  334. In the usage section below, --size Size can be replaced with
  335. --extents Number. See descriptions in the options section.
  336.  
  337. In the usage section below, --name is omitted from the required
  338. options, even though it is typically used. When the name is not
  339. specified, a new LV name is generated with the "lvol" prefix and
  340. a unique numeric suffix.
  341.  
  342. USAGE
  343. Create a linear LV.
  344.  
  345. lvcreate -L|--size Size[m|UNIT] VG
  346. [ -l|--extents Number[PERCENT] ]
  347. [ --type linear ]
  348. [ COMMON_OPTIONS ]
  349. [ PV ... ]
  350. -
  351.  
  352. Create a striped LV (infers --type striped).
  353.  
  354. lvcreate -i|--stripes Number -L|--size Size[m|UNIT] VG
  355. [ -l|--extents Number[PERCENT] ]
  356. [ -I|--stripesize Size[k|UNIT] ]
  357. [ COMMON_OPTIONS ]
  358. [ PV ... ]
  359. -
  360.  
  361. Create a raid1 or mirror LV (infers --type raid1|mirror).
  362.  
  363. lvcreate -m|--mirrors Number -L|--size Size[m|UNIT] VG
  364. [ -l|--extents Number[PERCENT] ]
  365. [ -R|--regionsize Size[m|UNIT] ]
  366. [ --mirrorlog core|disk ]
  367. [ --[raid]minrecoveryrate Size[k|UNIT] ]
  368. [ --[raid]maxrecoveryrate Size[k|UNIT] ]
  369. [ COMMON_OPTIONS ]
  370. [ PV ... ]
  371. -
  372.  
  373. Create a raid LV (a specific raid level must be used, e.g.
  374. raid1).
  375.  
  376. lvcreate --type raid -L|--size Size[m|UNIT] VG
  377. [ -l|--extents Number[PERCENT] ]
  378. [ -m|--mirrors Number ]
  379. [ -i|--stripes Number ]
  380. [ -I|--stripesize Size[k|UNIT] ]
  381. [ -R|--regionsize Size[m|UNIT] ]
  382. [ --[raid]minrecoveryrate Size[k|UNIT] ]
  383. [ --[raid]maxrecoveryrate Size[k|UNIT] ]
  384. [ COMMON_OPTIONS ]
  385. [ PV ... ]
  386. -
  387.  
  388. Create a raid10 LV.
  389.  
  390. lvcreate -m|--mirrors Number -i|--stripes Number
  391. -L|--size Size[m|UNIT] VG
  392. [ -l|--extents Number[PERCENT] ]
  393. [ -I|--stripesize Size[k|UNIT] ]
  394. [ -R|--regionsize Size[m|UNIT] ]
  395. [ --[raid]minrecoveryrate Size[k|UNIT] ]
  396. [ --[raid]maxrecoveryrate Size[k|UNIT] ]
  397. [ COMMON_OPTIONS ]
  398. [ PV ... ]
  399. -
  400.  
  401. Create a COW snapshot LV of an origin LV.
  402.  
  403. lvcreate -s|--snapshot -L|--size Size[m|UNIT] LV
  404. [ -l|--extents Number[PERCENT] ]
  405. [ -i|--stripes Number ]
  406. [ -I|--stripesize Size[k|UNIT] ]
  407. [ -c|--chunksize Size[k|UNIT] ]
  408. [ --type snapshot ]
  409. [ COMMON_OPTIONS ]
  410. [ PV ... ]
  411. -
  412.  
  413. Create a thin pool.
  414.  
  415. lvcreate --type thin-pool -L|--size Size[m|UNIT] VG
  416. [ -l|--extents Number[PERCENT] ]
  417. [ -c|--chunksize Size[k|UNIT] ]
  418. [ -i|--stripes Number ]
  419. [ -I|--stripesize Size[k|UNIT] ]
  420. [ --thinpool LV_new ]
  421. [ --poolmetadatasize Size[m|UNIT] ]
  422. [ --poolmetadataspare y|n ]
  423. [ --discards passdown|nopassdown|ignore ]
  424. [ --errorwhenfull y|n ]
  425. [ COMMON_OPTIONS ]
  426. [ PV ... ]
  427. -
  428.  
  429. Create a cache pool.
  430.  
  431. lvcreate --type cache-pool -L|--size Size[m|UNIT] VG
  432. [ -l|--extents Number[PERCENT] ]
  433. [ -H|--cache ]
  434. [ -c|--chunksize Size[k|UNIT] ]
  435. [ --poolmetadatasize Size[m|UNIT] ]
  436. [ --poolmetadataspare y|n ]
  437. [ --cachemode writethrough|writeback|passthrough ]
  438. [ --cachepolicy String ]
  439. [ --cachesettings String ]
  440. [ --cachemetadataformat auto|1|2 ]
  441. [ COMMON_OPTIONS ]
  442. [ PV ... ]
  443. -
  444.  
  445. Create a thin LV in a thin pool (infers --type thin).
  446.  
  447. lvcreate -V|--virtualsize Size[m|UNIT] --thinpool LV_thinpool VG
  448. [ -T|--thin ]
  449. [ --type thin ]
  450. [ --discards passdown|nopassdown|ignore ]
  451. [ --errorwhenfull y|n ]
  452. [ COMMON_OPTIONS ]
  453. -
  454.  
  455. Create a thin LV that is a snapshot of an existing thin LV
  456. (infers --type thin).
  457.  
  458. lvcreate -s|--snapshot LV_thin
  459. [ --type thin ]
  460. [ --discards passdown|nopassdown|ignore ]
  461. [ --errorwhenfull y|n ]
  462. [ COMMON_OPTIONS ]
  463. -
  464.  
  465. Create a thin LV that is a snapshot of an external origin LV.
  466.  
  467. lvcreate --type thin --thinpool LV_thinpool LV
  468. [ -T|--thin ]
  469. [ -c|--chunksize Size[k|UNIT] ]
  470. [ --poolmetadatasize Size[m|UNIT] ]
  471. [ --poolmetadataspare y|n ]
  472. [ --discards passdown|nopassdown|ignore ]
  473. [ --errorwhenfull y|n ]
  474. [ COMMON_OPTIONS ]
  475. -
  476.  
  477. Create a thin LV, first creating a thin pool for it,
  478. where the new thin pool is named by the --thinpool arg.
  479.  
  480. lvcreate --type thin -V|--virtualsize Size[m|UNIT]
  481. -L|--size Size[m|UNIT] --thinpool LV_new
  482. [ -l|--extents Number[PERCENT] ]
  483. [ -T|--thin ]
  484. [ -c|--chunksize Size[k|UNIT] ]
  485. [ -i|--stripes Number ]
  486. [ -I|--stripesize Size[k|UNIT] ]
  487. [ --poolmetadatasize Size[m|UNIT] ]
  488. [ --poolmetadataspare y|n ]
  489. [ --discards passdown|nopassdown|ignore ]
  490. [ --errorwhenfull y|n ]
  491. [ COMMON_OPTIONS ]
  492. [ PV ... ]
  493. -
  494.  
  495. Create a cache LV, first creating a new origin LV,
  496. then combining it with the existing cache pool named
  497. by the --cachepool arg.
  498.  
  499. lvcreate --type cache -L|--size Size[m|UNIT]
  500. --cachepool LV_cachepool VG
  501. [ -l|--extents Number[PERCENT] ]
  502. [ -H|--cache ]
  503. [ -c|--chunksize Size[k|UNIT] ]
  504. [ -i|--stripes Number ]
  505. [ -I|--stripesize Size[k|UNIT] ]
  506. [ --poolmetadatasize Size[m|UNIT] ]
  507. [ --poolmetadataspare y|n ]
  508. [ --cachemode writethrough|writeback|passthrough ]
  509. [ --cachepolicy String ]
  510. [ --cachesettings String ]
  511. [ --cachemetadataformat auto|1|2 ]
  512. [ COMMON_OPTIONS ]
  513. [ PV ... ]
  514. -
  515.  
  516. Common options for command:
  517. [ -a|--activate y|n|ay ]
  518. [ -A|--autobackup y|n ]
  519. [ -C|--contiguous y|n ]
  520. [ -K|--ignoreactivationskip ]
  521. [ -j|--major Number ]
  522. [ -n|--name String ]
  523. [ -p|--permission rw|r ]
  524. [ -M|--persistent y|n ]
  525. [ -r|--readahead auto|none|Number ]
  526. [ -k|--setactivationskip y|n ]
  527. [ -W|--wipesignatures y|n ]
  528. [ -Z|--zero y|n ]
  529. [ --addtag Tag ]
  530. [ --alloc contiguous|cling|cling_by_tags|normal|any
  531. where|inherit ]
  532. [ --ignoremonitoring ]
  533. [ --metadataprofile String ]
  534. [ --minor Number ]
  535. [ --monitor y|n ]
  536. [ --nosync ]
  537. [ --noudevsync ]
  538. [ --reportformat basic|json ]
  539.  
  540. Common options for lvm:
  541. [ -d|--debug ]
  542. [ -h|--help ]
  543. [ -q|--quiet ]
  544. [ -t|--test ]
  545. [ -v|--verbose ]
  546. [ -y|--yes ]
  547. [ --commandprofile String ]
  548. [ --config String ]
  549. [ --driverloaded y|n ]
  550. [ --longhelp ]
  551. [ --profile String ]
  552. [ --version ]
  553.  
  554. OPTIONS
  555. -a|--activate y|n|ay
  556. Controls the active state of the new LV. y makes the LV
  557. active, or available. New LVs are made active by
  558. default. n makes the LV inactive, or unavailable, only
  559. when possible. In some cases, creating an LV requires it
  560. to be active. For example, COW snapshots of an active
  561. origin LV can only be created in the active state (this
  562. does not apply to thin snapshots). The --zero option
  563. normally requires the LV to be active. If autoactivation
  564. ay is used, the LV is only activated if it matches an
  565. item in lvm.conf activation/auto_activation_volume_list.
  566. ay implies --zero n and --wipesignatures n. See lvm
  567. lockd(8) for more information about activation options
  568. for shared VGs. See clvmd(8) for more information about
  569. activation options for clustered VGs.
  570.  
  571. --addtag Tag
  572. Adds a tag to a PV, VG or LV. This option can be repeated
  573. to add multiple tags at once. See lvm(8) for information
  574. about tags.
  575.  
  576. --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
  577. Determines the allocation policy when a command needs to
  578. allocate Physical Extents (PEs) from the VG. Each VG and
  579. LV has an allocation policy which can be changed with
  580. vgchange/lvchange, or overriden on the command line.
  581. normal applies common sense rules such as not placing
  582. parallel stripes on the same PV. inherit applies the VG
  583. policy to an LV. contiguous requires new PEs be placed
  584. adjacent to existing PEs. cling places new PEs on the
  585. same PV as existing PEs in the same stripe of the LV. If
  586. there are sufficient PEs for an allocation, but normal
  587. does not use them, anywhere will use them even if it
  588. reduces performance, e.g. by placing two stripes on the
  589. same PV. Optional positional PV args on the command line
  590. can also be used to limit which PVs the command will use
  591. for allocation. See lvm(8) for more information about
  592. allocation.
  593.  
  594. -A|--autobackup y|n
  595. Specifies if metadata should be backed up automatically
  596. after a change. Enabling this is strongly advised! See
  597. vgcfgbackup(8) for more information.
  598.  
  599. -H|--cache
  600. Specifies the command is handling a cache LV or cache
  601. pool. See --type cache and --type cache-pool. See lvm
  602. cache(7) for more information about LVM caching.
  603.  
  604. --cachemetadataformat auto|1|2
  605. Specifies the cache metadata format used by cache target.
  606.  
  607. --cachemode writethrough|writeback|passthrough
  608. Specifies when writes to a cache LV should be considered
  609. complete. writeback considers a write complete as soon
  610. as it is stored in the cache pool. writethough considers
  611. a write complete only when it has been stored in both the
  612. cache pool and on the origin LV. While writethrough may
  613. be slower for writes, it is more resilient if something
  614. should happen to a device associated with the cache pool
  615. LV. With passthrough, all reads are served from the ori
  616. gin LV (all reads miss the cache) and all writes are for
  617. warded to the origin LV; additionally, write hits cause
  618. cache block invalidates. See lvmcache(7) for more infor
  619. mation.
  620.  
  621. --cachepolicy String
  622. Specifies the cache policy for a cache LV. See lvm
  623. cache(7) for more information.
  624.  
  625. --cachepool LV
  626. The name of a cache pool LV.
  627.  
  628. --cachesettings String
  629. Specifies tunable values for a cache LV in "Key = Value"
  630. form. Repeat this option to specify multiple values.
  631. (The default values should usually be adequate.) The
  632. special string value default switches settings back to
  633. their default kernel values and removes them from the
  634. list of settings stored in LVM metadata. See lvmcache(7)
  635. for more information.
  636.  
  637. -c|--chunksize Size[k|UNIT]
  638. The size of chunks in a snapshot, cache pool or thin
  639. pool. For snapshots, the value must be a power of 2
  640. between 4KiB and 512KiB and the default value is 4. For
  641. a cache pool the value must be between 32KiB and 1GiB and
  642. the default value is 64. For a thin pool the value must
  643. be between 64KiB and 1GiB and the default value starts
  644. with 64 and scales up to fit the pool metadata size
  645. within 128MiB, if the pool metadata size is not speci
  646. fied. The value must be a multiple of 64KiB. See
  647. lvmthin(7) and lvmcache(7) for more information.
  648.  
  649. --commandprofile String
  650. The command profile to use for command configuration.
  651. See lvm.conf(5) for more information about profiles.
  652.  
  653. --config String
  654. Config settings for the command. These override lvm.conf
  655. settings. The String arg uses the same format as
  656. lvm.conf, or may use section/field syntax. See
  657. lvm.conf(5) for more information about config.
  658.  
  659. -C|--contiguous y|n
  660. Sets or resets the contiguous allocation policy for LVs.
  661. Default is no contiguous allocation based on a next free
  662. principle. It is only possible to change a non-contigu
  663. ous allocation policy to contiguous if all of the allo
  664. cated physical extents in the LV are already contiguous.
  665.  
  666. -d|--debug ...
  667. Set debug level. Repeat from 1 to 6 times to increase the
  668. detail of messages sent to the log file and/or syslog (if
  669. configured).
  670.  
  671. --discards passdown|nopassdown|ignore
  672. Specifies how the device-mapper thin pool layer in the
  673. kernel should handle discards. ignore causes the thin
  674. pool to ignore discards. nopassdown causes the thin pool
  675. to process discards itself to allow reuse of unneeded
  676. extents in the thin pool. passdown causes the thin pool
  677. to process discards itself (like nopassdown) and pass the
  678. discards to the underlying device. See lvmthin(7) for
  679. more information.
  680.  
  681. --driverloaded y|n
  682. If set to no, the command will not attempt to use device-
  683. mapper. For testing and debugging.
  684.  
  685. --errorwhenfull y|n
  686. Specifies thin pool behavior when data space is
  687. exhausted. When yes, device-mapper will immediately
  688. return an error when a thin pool is full and an I/O
  689. request requires space. When no, device-mapper will
  690. queue these I/O requests for a period of time to allow
  691. the thin pool to be extended. Errors are returned if no
  692. space is available after the timeout. (Also see dm-
  693. thin-pool kernel module option no_space_timeout.) See
  694. lvmthin(7) for more information.
  695.  
  696. -l|--extents Number[PERCENT]
  697. Specifies the size of the new LV in logical extents. The
  698. --size and --extents options are alternate methods of
  699. specifying size. The total number of physical extents
  700. used will be greater when redundant data is needed for
  701. RAID levels. An alternate syntax allows the size to be
  702. determined indirectly as a percentage of the size of a
  703. related VG, LV, or set of PVs. The suffix %VG denotes the
  704. total size of the VG, the suffix %FREE the remaining free
  705. space in the VG, and the suffix %PVS the free space in
  706. the specified PVs. For a snapshot, the size can be
  707. expressed as a percentage of the total size of the origin
  708. LV with the suffix %ORIGIN (100%ORIGIN provides space for
  709. the whole origin). When expressed as a percentage, the
  710. size defines an upper limit for the number of logical
  711. extents in the new LV. The precise number of logical
  712. extents in the new LV is not determined until the command
  713. has completed.
  714.  
  715. -h|--help
  716. Display help text.
  717.  
  718. -K|--ignoreactivationskip
  719. Ignore the "activation skip" LV flag during activation to
  720. allow LVs with the flag set to be activated.
  721.  
  722. --ignoremonitoring
  723. Do not interact with dmeventd unless --monitor is speci
  724. fied. Do not use this if dmeventd is already monitoring
  725. a device.
  726.  
  727. --longhelp
  728. Display long help text.
  729.  
  730. -j|--major Number
  731. Sets the major number of an LV block device.
  732.  
  733. --[raid]maxrecoveryrate Size[k|UNIT]
  734. Sets the maximum recovery rate for a RAID LV. The rate
  735. value is an amount of data per second for each device in
  736. the array. Setting the rate to 0 means it will be
  737. unbounded. See lvmraid(7) for more information.
  738.  
  739. --metadataprofile String
  740. The metadata profile to use for command configuration.
  741. See lvm.conf(5) for more information about profiles.
  742.  
  743. --minor Number
  744. Sets the minor number of an LV block device.
  745.  
  746. --[raid]minrecoveryrate Size[k|UNIT]
  747. Sets the minimum recovery rate for a RAID LV. The rate
  748. value is an amount of data per second for each device in
  749. the array. Setting the rate to 0 means it will be
  750. unbounded. See lvmraid(7) for more information.
  751.  
  752. --mirrorlog core|disk
  753. Specifies the type of mirror log for LVs with the "mir‐
  754. ror" type (does not apply to the "raid1" type.) disk is
  755. a persistent log and requires a small amount of storage
  756. space, usually on a separate device from the data being
  757. mirrored. core is not persistent; the log is kept only
  758. in memory. In this case, the mirror must be synchronized
  759. (by copying LV data from the first device to others) each
  760. time the LV is activated, e.g. after reboot. mirrored is
  761. a persistent log that is itself mirrored, but should be
  762. avoided. Instead, use the raid1 type for log redundancy.
  763.  
  764. -m|--mirrors Number
  765. Specifies the number of mirror images in addition to the
  766. original LV image, e.g. --mirrors 1 means there are two
  767. images of the data, the original and one mirror image.
  768. Optional positional PV args on the command line can spec
  769. ify the devices the images should be placed on. There
  770. are two mirroring implementations: "raid1" and "mirror".
  771. These are the names of the corresponding LV types, or
  772. "segment types". Use the --type option to specify which
  773. to use (raid1 is default, and mirror is legacy) Use
  774. lvm.conf global/mirror_segtype_default and
  775. global/raid10_segtype_default to configure the default
  776. types. See the --nosync option for avoiding initial
  777. image synchronization. See lvmraid(7) for more informa
  778. tion.
  779.  
  780. --monitor y|n
  781. Start (yes) or stop (no) monitoring an LV with dmeventd.
  782. dmeventd monitors kernel events for an LV, and performs
  783. automated maintenance for the LV in reponse to specific
  784. events. See dmeventd(8) for more information.
  785.  
  786. -n|--name String
  787. Specifies the name of a new LV. When unspecified, a
  788. default name of "lvol#" is generated, where # is a number
  789. generated by LVM.
  790.  
  791. --nosync
  792. Causes the creation of mirror, raid1, raid4, raid5 and
  793. raid10 to skip the initial synchronization. In case of
  794. mirror, raid1 and raid10, any data written afterwards
  795. will be mirrored, but the original contents will not be
  796. copied. In case of raid4 and raid5, no parity blocks will
  797. be written, though any data written afterwards will cause
  798. parity blocks to be stored. This is useful for skipping
  799. a potentially long and resource intensive initial sync of
  800. an empty mirror/raid1/raid4/raid5 and raid10 LV. This
  801. option is not valid for raid6, because raid6 relies on
  802. proper parity (P and Q Syndromes) being created during
  803. initial synchronization in order to reconstruct proper
  804. user date in case of device failures. raid0 and
  805. raid0_meta do not provide any data copies or parity sup
  806. port and thus do not support initial synchronization.
  807.  
  808. --noudevsync
  809. Disables udev synchronisation. The process will not wait
  810. for notification from udev. It will continue irrespective
  811. of any possible udev processing in the background. Only
  812. use this if udev is not running or has rules that ignore
  813. the devices LVM creates.
  814.  
  815. -p|--permission rw|r
  816. Set access permission to read only r or read and write
  817. rw.
  818.  
  819. -M|--persistent y|n
  820. When yes, makes the specified minor number persistent.
  821.  
  822. --poolmetadatasize Size[m|UNIT]
  823. Specifies the size of the new pool metadata LV.
  824.  
  825. --poolmetadataspare y|n
  826. Enable or disable the automatic creation and management
  827. of a spare pool metadata LV in the VG. A spare metadata
  828. LV is reserved space that can be used when repairing a
  829. pool.
  830.  
  831. --profile String
  832. An alias for --commandprofile or --metadataprofile,
  833. depending on the command.
  834.  
  835. -q|--quiet ...
  836. Suppress output and log messages. Overrides --debug and
  837. --verbose. Repeat once to also suppress any prompts with
  838. answer 'no'.
  839.  
  840. -r|--readahead auto|none|Number
  841. Sets read ahead sector count of an LV. auto is the
  842. default which allows the kernel to choose a suitable
  843. value automatically. none is equivalent to zero.
  844.  
  845. -R|--regionsize Size[m|UNIT]
  846. Size of each raid or mirror synchronization region.
  847. lvm.conf activation/raid_region_size can be used to con
  848. figure a default.
  849.  
  850. --reportformat basic|json
  851. Overrides current output format for reports which is
  852. defined globally by the report/output_format setting in
  853. lvm.conf. basic is the original format with columns and
  854. rows. If there is more than one report per command, each
  855. report is prefixed with the report name for identifica
  856. tion. json produces report output in JSON format. See
  857. lvmreport(7) for more information.
  858.  
  859. -k|--setactivationskip y|n
  860. Persistently sets (yes) or clears (no) the "activation
  861. skip" flag on an LV. An LV with this flag set is not
  862. activated unless the --ignoreactivationskip option is
  863. used by the activation command. This flag is set by
  864. default on new thin snapshot LVs. The flag is not
  865. applied to deactivation. The current value of the flag
  866. is indicated in the lvs lv_attr bits.
  867.  
  868. -L|--size Size[m|UNIT]
  869. Specifies the size of the new LV. The --size and
  870. --extents options are alternate methods of specifying
  871. size. The total number of physical extents used will be
  872. greater when redundant data is needed for RAID levels.
  873.  
  874. -s|--snapshot
  875. Create a snapshot. Snapshots provide a "frozen image" of
  876. an origin LV. The snapshot LV can be used, e.g. for
  877. backups, while the origin LV continues to be used. This
  878. option can create a COW (copy on write) snapshot, or a
  879. thin snapshot (in a thin pool.) Thin snapshots are cre
  880. ated when the origin is a thin LV and the size option is
  881. NOT specified. Thin snapshots share the same blocks in
  882. the thin pool, and do not allocate new space from the VG.
  883. Thin snapshots are created with the "activation skip"
  884. flag, see --setactivationskip. A thin snapshot of a non-
  885. thin "external origin" LV is created when a thin pool is
  886. specified. Unprovisioned blocks in the thin snapshot LV
  887. are read from the external origin LV. The external origin
  888. LV must be read-only. See lvmthin(7) for more informa
  889. tion about LVM thin provisioning. COW snapshots are cre
  890. ated when a size is specified. The size is allocated from
  891. space in the VG, and is the amount of space that can be
  892. used for saving COW blocks as writes occur to the origin
  893. or snapshot. The size chosen should depend upon the
  894. amount of writes that are expected; often 20% of the ori
  895. gin LV is enough. If COW space runs low, it can be
  896. extended with lvextend (shrinking is also allowed with
  897. lvreduce.) A small amount of the COW snapshot LV size is
  898. used to track COW block locations, so the full size is
  899. not available for COW data blocks. Use lvs to check how
  900. much space is used, and see --monitor to to automatically
  901. extend the size to avoid running out of space.
  902.  
  903. -i|--stripes Number
  904. Specifies the number of stripes in a striped LV. This is
  905. the number of PVs (devices) that a striped LV is spread
  906. across. Data that appears sequential in the LV is spread
  907. across multiple devices in units of the stripe size (see
  908. --stripesize). This does not change existing allocated
  909. space, but only applies to space being allocated by the
  910. command. When creating a RAID 4/5/6 LV, this number does
  911. not include the extra devices that are required for par
  912. ity. The largest number depends on the RAID type (raid0:
  913. 64, raid10: 32, raid4/5: 63, raid6: 62), and when unspec
  914. ified, the default depends on the RAID type (raid0: 2,
  915. raid10: 2, raid4/5: 3, raid6: 5.) To stripe a new raid
  916. LV across all PVs by default, see lvm.conf alloca
  917. tion/raid_stripe_all_devices.
  918.  
  919. -I|--stripesize Size[k|UNIT]
  920. The amount of data that is written to one device before
  921. moving to the next in a striped LV.
  922.  
  923. -t|--test
  924. Run in test mode. Commands will not update metadata.
  925. This is implemented by disabling all metadata writing but
  926. nevertheless returning success to the calling function.
  927. This may lead to unusual error messages in multi-stage
  928. operations if a tool relies on reading back metadata it
  929. believes has changed but hasn't.
  930.  
  931. -T|--thin
  932. Specifies the command is handling a thin LV or thin pool.
  933. See --type thin, --type thin-pool, and --virtualsize.
  934. See lvmthin(7) for more information about LVM thin provi‐
  935. sioning.
  936.  
  937. --thinpool LV
  938. The name of a thin pool LV.
  939.  
  940. --type linear|striped|snapshot|mir‐
  941. ror|raid|thin|cache|thin-pool|cache-pool
  942. The LV type, also known as "segment type" or "segtype".
  943. See usage descriptions for the specific ways to use these
  944. types. For more information about redundancy and perfor‐
  945. mance (raid<N>, mirror, striped, linear) see lvmraid(7).
  946. For thin provisioning (thin, thin-pool) see lvmthin(7).
  947. For performance caching (cache, cache-pool) see lvm‐
  948. cache(7). For copy-on-write snapshots (snapshot) see
  949. usage definitions. Several commands omit an explicit
  950. type option because the type is inferred from other
  951. options or shortcuts (e.g. --stripes, --mirrors, --snap‐
  952. shot, --virtualsize, --thin, --cache). Use inferred
  953. types with care because it can lead to unexpected
  954. results.
  955.  
  956. -v|--verbose ...
  957. Set verbose level. Repeat from 1 to 4 times to increase
  958. the detail of messages sent to stdout and stderr.
  959.  
  960. --version
  961. Display version information.
  962.  
  963. -V|--virtualsize Size[m|UNIT]
  964. The virtual size of a new thin LV. See lvmthin(7) for
  965. more information about LVM thin provisioning. Using vir‐
  966. tual size (-V) and actual size (-L) together creates a
  967. sparse LV. lvm.conf global/sparse_segtype_default deter‐
  968. mines the default segment type used to create a sparse
  969. LV. Anything written to a sparse LV will be returned
  970. when reading from it. Reading from other areas of the LV
  971. will return blocks of zeros. When using a snapshot to
  972. create a sparse LV, a hidden virtual device is created
  973. using the zero target, and the LV has the suffix
  974. _vorigin. Snapshots are less efficient than thin provi‐
  975. sioning when creating large sparse LVs (GiB).
  976.  
  977. -W|--wipesignatures y|n
  978. Controls detection and subsequent wiping of signatures on
  979. new LVs. There is a prompt for each signature detected
  980. to confirm its wiping (unless --yes is used to override
  981. confirmations.) When not specified, signatures are wiped
  982. whenever zeroing is done (see --zero). This behaviour can
  983. be configured with lvm.conf allocation/wipe_signa‐
  984. tures_when_zeroing_new_lvs. If blkid wiping is used
  985. (lvm.conf allocation/use_blkid_wiping) and LVM is com‐
  986. piled with blkid wiping support, then the blkid(8)
  987. library is used to detect the signatures (use blkid -k to
  988. list the signatures that are recognized). Otherwise,
  989. native LVM code is used to detect signatures (only MD
  990. RAID, swap and LUKS signatures are detected in this
  991. case.) The LV is not wiped if the read only flag is set.
  992.  
  993. -y|--yes
  994. Do not prompt for confirmation interactively but always
  995. assume the answer yes. Use with extreme caution. (For
  996. automatic no, see -qq.)
  997.  
  998. -Z|--zero y|n
  999. Controls zeroing of the first 4KiB of data in the new LV.
  1000. Default is y. Snapshot COW volumes are always zeroed.
  1001. LV is not zeroed if the read only flag is set. Warning:
  1002. trying to mount an unzeroed LV can cause the system to
  1003. hang.
  1004.  
  1005. VARIABLES
  1006. VG
  1007. Volume Group name. See lvm(8) for valid names. For
  1008. lvcreate, the required VG positional arg may be omitted
  1009. when the VG name is included in another option, e.g.
  1010. --name VG/LV.
  1011.  
  1012. LV
  1013. Logical Volume name. See lvm(8) for valid names. An LV
  1014. positional arg generally includes the VG name and LV
  1015. name, e.g. VG/LV. LV followed by _<type> indicates that
  1016. an LV of the given type is required. (raid represents
  1017. raid<N> type)
  1018.  
  1019. PV
  1020. Physical Volume name, a device path under /dev. For com‐
  1021. mands managing physical extents, a PV positional arg gen‐
  1022. erally accepts a suffix indicating a range (or multiple
  1023. ranges) of physical extents (PEs). When the first PE is
  1024. omitted, it defaults to the start of the device, and when
  1025. the last PE is omitted it defaults to end. Start and end
  1026. range (inclusive): PV[:PE-PE]... Start and length range
  1027. (counting from 0): PV[:PE+PE]...
  1028.  
  1029. String
  1030. See the option description for information about the
  1031. string content.
  1032.  
  1033. Size[UNIT]
  1034. Size is an input number that accepts an optional unit.
  1035. Input units are always treated as base two values,
  1036. regardless of capitalization, e.g. 'k' and 'K' both refer
  1037. to 1024. The default input unit is specified by letter,
  1038. followed by |UNIT. UNIT represents other possible input
  1039. units: bBsSkKmMgGtTpPeE. b|B is bytes, s|S is sectors of
  1040. 512 bytes, k|K is kilobytes, m|M is megabytes, g|G is
  1041. gigabytes, t|T is terabytes, p|P is petabytes, e|E is
  1042. exabytes. (This should not be confused with the output
  1043. control --units, where capital letters mean multiple of
  1044. 1000.)
  1045.  
  1046. ENVIRONMENT VARIABLES
  1047. See lvm(8) for information about environment variables used by
  1048. lvm. For example, LVM_VG_NAME can generally be substituted for
  1049. a required VG parameter.
  1050.  
  1051. ADVANCED USAGE
  1052. Alternate command forms, advanced command usage, and listing of
  1053. all valid syntax for completeness.
  1054.  
  1055. Create an LV that returns errors when used.
  1056.  
  1057. lvcreate --type error -L|--size Size[m|UNIT] VG
  1058. [ -l|--extents Number[PERCENT] ]
  1059. [ COMMON_OPTIONS ]
  1060. -
  1061.  
  1062. Create an LV that returns zeros when read.
  1063.  
  1064. lvcreate --type zero -L|--size Size[m|UNIT] VG
  1065. [ -l|--extents Number[PERCENT] ]
  1066. [ COMMON_OPTIONS ]
  1067. -
  1068.  
  1069. Create a linear LV.
  1070.  
  1071. lvcreate --type linear -L|--size Size[m|UNIT] VG
  1072. [ -l|--extents Number[PERCENT] ]
  1073. [ COMMON_OPTIONS ]
  1074. [ PV ... ]
  1075. -
  1076.  
  1077. Create a striped LV (also see lvcreate --stripes).
  1078.  
  1079. lvcreate --type striped -L|--size Size[m|UNIT] VG
  1080. [ -l|--extents Number[PERCENT] ]
  1081. [ -i|--stripes Number ]
  1082. [ -I|--stripesize Size[k|UNIT] ]
  1083. [ COMMON_OPTIONS ]
  1084. [ PV ... ]
  1085. -
  1086.  
  1087. Create a mirror LV (also see --type raid1).
  1088.  
  1089. lvcreate --type mirror -L|--size Size[m|UNIT] VG
  1090. [ -l|--extents Number[PERCENT] ]
  1091. [ -m|--mirrors Number ]
  1092. [ -R|--regionsize Size[m|UNIT] ]
  1093. [ -i|--stripes Number ]
  1094. [ -I|--stripesize Size[k|UNIT] ]
  1095. [ --mirrorlog core|disk ]
  1096. [ COMMON_OPTIONS ]
  1097. [ PV ... ]
  1098. -
  1099.  
  1100. Create a COW snapshot LV of an origin LV
  1101. (also see --snapshot).
  1102.  
  1103. lvcreate --type snapshot -L|--size Size[m|UNIT] LV
  1104. [ -l|--extents Number[PERCENT] ]
  1105. [ -s|--snapshot ]
  1106. [ -i|--stripes Number ]
  1107. [ -I|--stripesize Size[k|UNIT] ]
  1108. [ -c|--chunksize Size[k|UNIT] ]
  1109. [ COMMON_OPTIONS ]
  1110. [ PV ... ]
  1111. -
  1112.  
  1113. Create a sparse COW snapshot LV of a virtual origin LV
  1114. (also see --snapshot).
  1115.  
  1116. lvcreate --type snapshot -L|--size Size[m|UNIT]
  1117. -V|--virtualsize Size[m|UNIT] VG
  1118. [ -l|--extents Number[PERCENT] ]
  1119. [ -s|--snapshot ]
  1120. [ -c|--chunksize Size[k|UNIT] ]
  1121. [ COMMON_OPTIONS ]
  1122. [ PV ... ]
  1123. -
  1124.  
  1125. Create a sparse COW snapshot LV of a virtual origin LV.
  1126.  
  1127. lvcreate -s|--snapshot -L|--size Size[m|UNIT]
  1128. -V|--virtualsize Size[m|UNIT] VG
  1129. [ -l|--extents Number[PERCENT] ]
  1130. [ -c|--chunksize Size[k|UNIT] ]
  1131. [ --type snapshot ]
  1132. [ COMMON_OPTIONS ]
  1133. [ PV ... ]
  1134. -
  1135.  
  1136. Create a thin pool (infers --type thin-pool).
  1137.  
  1138. lvcreate -T|--thin -L|--size Size[m|UNIT] VG
  1139. [ -l|--extents Number[PERCENT] ]
  1140. [ -c|--chunksize Size[k|UNIT] ]
  1141. [ -i|--stripes Number ]
  1142. [ -I|--stripesize Size[k|UNIT] ]
  1143. [ --type thin-pool ]
  1144. [ --poolmetadatasize Size[m|UNIT] ]
  1145. [ --poolmetadataspare y|n ]
  1146. [ --discards passdown|nopassdown|ignore ]
  1147. [ --errorwhenfull y|n ]
  1148. [ COMMON_OPTIONS ]
  1149. [ PV ... ]
  1150. -
  1151.  
  1152. Create a thin pool named by the --thinpool arg
  1153. (infers --type thin-pool).
  1154.  
  1155. lvcreate -L|--size Size[m|UNIT] --thinpool LV_new VG
  1156. [ -l|--extents Number[PERCENT] ]
  1157. [ -T|--thin ]
  1158. [ -c|--chunksize Size[k|UNIT] ]
  1159. [ -i|--stripes Number ]
  1160. [ -I|--stripesize Size[k|UNIT] ]
  1161. [ --type thin-pool ]
  1162. [ --poolmetadatasize Size[m|UNIT] ]
  1163. [ --poolmetadataspare y|n ]
  1164. [ --discards passdown|nopassdown|ignore ]
  1165. [ --errorwhenfull y|n ]
  1166. [ COMMON_OPTIONS ]
  1167. [ PV ... ]
  1168. -
  1169.  
  1170. Create a cache pool named by the --cachepool arg
  1171. (variant, uses --cachepool in place of --name).
  1172.  
  1173. lvcreate --type cache-pool -L|--size Size[m|UNIT]
  1174. --cachepool LV_new VG
  1175. [ -l|--extents Number[PERCENT] ]
  1176. [ -H|--cache ]
  1177. [ -c|--chunksize Size[k|UNIT] ]
  1178. [ --poolmetadatasize Size[m|UNIT] ]
  1179. [ --poolmetadataspare y|n ]
  1180. [ --cachemode writethrough|writeback|passthrough ]
  1181. [ --cachepolicy String ]
  1182. [ --cachesettings String ]
  1183. [ --cachemetadataformat auto|1|2 ]
  1184. [ COMMON_OPTIONS ]
  1185. [ PV ... ]
  1186. -
  1187.  
  1188. Create a thin LV in a thin pool.
  1189.  
  1190. lvcreate --type thin -V|--virtualsize Size[m|UNIT]
  1191. --thinpool LV_thinpool VG
  1192. [ -T|--thin ]
  1193. [ -c|--chunksize Size[k|UNIT] ]
  1194. [ --poolmetadatasize Size[m|UNIT] ]
  1195. [ --poolmetadataspare y|n ]
  1196. [ --discards passdown|nopassdown|ignore ]
  1197. [ --errorwhenfull y|n ]
  1198. [ COMMON_OPTIONS ]
  1199. -
  1200.  
  1201. Create a thin LV in a thin pool named in the first arg
  1202. (variant, also see --thinpool for naming pool).
  1203.  
  1204. lvcreate --type thin -V|--virtualsize Size[m|UNIT] LV_thinpool
  1205. [ -T|--thin ]
  1206. [ --discards passdown|nopassdown|ignore ]
  1207. [ --errorwhenfull y|n ]
  1208. [ COMMON_OPTIONS ]
  1209. -
  1210.  
  1211. Create a thin LV in the thin pool named in the first arg
  1212. (variant, infers --type thin, also see --thinpool for
  1213. naming pool.)
  1214.  
  1215. lvcreate -V|--virtualsize Size[m|UNIT] LV_thinpool
  1216. [ -T|--thin ]
  1217. [ --type thin ]
  1218. [ --discards passdown|nopassdown|ignore ]
  1219. [ --errorwhenfull y|n ]
  1220. [ COMMON_OPTIONS ]
  1221. -
  1222.  
  1223. Create a thin LV that is a snapshot of an existing thin LV.
  1224.  
  1225. lvcreate --type thin LV_thin
  1226. [ -T|--thin ]
  1227. [ --discards passdown|nopassdown|ignore ]
  1228. [ --errorwhenfull y|n ]
  1229. [ COMMON_OPTIONS ]
  1230. -
  1231.  
  1232. Create a thin LV that is a snapshot of an existing thin LV
  1233. (infers --type thin).
  1234.  
  1235. lvcreate -T|--thin LV_thin
  1236. [ --type thin ]
  1237. [ --discards passdown|nopassdown|ignore ]
  1238. [ --errorwhenfull y|n ]
  1239. [ COMMON_OPTIONS ]
  1240. -
  1241.  
  1242. Create a thin LV that is a snapshot of an external origin LV
  1243. (infers --type thin).
  1244.  
  1245. lvcreate -s|--snapshot --thinpool LV_thinpool LV
  1246. [ --type thin ]
  1247. [ --discards passdown|nopassdown|ignore ]
  1248. [ --errorwhenfull y|n ]
  1249. [ COMMON_OPTIONS ]
  1250. -
  1251.  
  1252. Create a thin LV, first creating a thin pool for it,
  1253. where the new thin pool is named by the --thinpool arg
  1254. (variant, infers --type thin).
  1255.  
  1256. lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
  1257. --thinpool LV_new
  1258. [ -l|--extents Number[PERCENT] ]
  1259. [ -T|--thin ]
  1260. [ -c|--chunksize Size[k|UNIT] ]
  1261. [ -i|--stripes Number ]
  1262. [ -I|--stripesize Size[k|UNIT] ]
  1263. [ --poolmetadatasize Size[m|UNIT] ]
  1264. [ --poolmetadataspare y|n ]
  1265. [ --discards passdown|nopassdown|ignore ]
  1266. [ --errorwhenfull y|n ]
  1267. [ COMMON_OPTIONS ]
  1268. [ PV ... ]
  1269. -
  1270.  
  1271. Create a thin LV, first creating a thin pool for it,
  1272. where the new thin pool is named by the --thinpool arg
  1273. (variant, infers --type thin).
  1274.  
  1275. lvcreate -V|--virtualsize Size[m|UNIT] -L|--size Size[m|UNIT]
  1276. --thinpool LV_new VG
  1277. [ -l|--extents Number[PERCENT] ]
  1278. [ -T|--thin ]
  1279. [ -c|--chunksize Size[k|UNIT] ]
  1280. [ -i|--stripes Number ]
  1281. [ -I|--stripesize Size[k|UNIT] ]
  1282. [ --poolmetadatasize Size[m|UNIT] ]
  1283. [ --poolmetadataspare y|n ]
  1284. [ --discards passdown|nopassdown|ignore ]
  1285. [ --errorwhenfull y|n ]
  1286. [ COMMON_OPTIONS ]
  1287. [ PV ... ]
  1288. -
  1289.  
  1290. Create a thin LV, first creating a thin pool for it,
  1291. where the new thin pool is named in the first arg,
  1292. or the new thin pool name is generated when the first
  1293. arg is a VG name.
  1294.  
  1295. lvcreate --type thin -V|--virtualsize Size[m|UNIT]
  1296. -L|--size Size[m|UNIT] VG|LV_new
  1297. [ -l|--extents Number[PERCENT] ]
  1298. [ -T|--thin ]
  1299. [ -c|--chunksize Size[k|UNIT] ]
  1300. [ -i|--stripes Number ]
  1301. [ -I|--stripesize Size[k|UNIT] ]
  1302. [ --poolmetadatasize Size[m|UNIT] ]
  1303. [ --poolmetadataspare y|n ]
  1304. [ --discards passdown|nopassdown|ignore ]
  1305. [ --errorwhenfull y|n ]
  1306. [ COMMON_OPTIONS ]
  1307. [ PV ... ]
  1308. -
  1309.  
  1310. Create a thin LV, first creating a thin pool for it,
  1311. where the new thin pool is named in the first arg,
  1312. or the new thin pool name is generated when the first
  1313. arg is a VG name (variant, infers --type thin).
  1314.  
  1315. lvcreate -T|--thin -V|--virtualsize Size[m|UNIT]
  1316. -L|--size Size[m|UNIT] VG|LV_new
  1317. [ -l|--extents Number[PERCENT] ]
  1318. [ -c|--chunksize Size[k|UNIT] ]
  1319. [ -i|--stripes Number ]
  1320. [ -I|--stripesize Size[k|UNIT] ]
  1321. [ --poolmetadatasize Size[m|UNIT] ]
  1322. [ --poolmetadataspare y|n ]
  1323. [ --discards passdown|nopassdown|ignore ]
  1324. [ --errorwhenfull y|n ]
  1325. [ COMMON_OPTIONS ]
  1326. [ PV ... ]
  1327. -
  1328.  
  1329. Create a thin LV, first creating a thin pool for it
  1330. (infers --type thin).
  1331. Create a sparse snapshot of a virtual origin LV
  1332. (infers --type snapshot).
  1333. Chooses --type thin or --type snapshot according to
  1334. config setting sparse_segtype_default.
  1335.  
  1336. lvcreate -L|--size Size[m|UNIT] -V|--virtualsize Size[m|UNIT] VG
  1337. [ -l|--extents Number[PERCENT] ]
  1338. [ -s|--snapshot ]
  1339. [ -c|--chunksize Size[k|UNIT] ]
  1340. [ -i|--stripes Number ]
  1341. [ -I|--stripesize Size[k|UNIT] ]
  1342. [ --type snapshot ]
  1343. [ --poolmetadatasize Size[m|UNIT] ]
  1344. [ --poolmetadataspare y|n ]
  1345. [ --discards passdown|nopassdown|ignore ]
  1346. [ --errorwhenfull y|n ]
  1347. [ COMMON_OPTIONS ]
  1348. [ PV ... ]
  1349. -
  1350.  
  1351. Create a cache LV, first creating a new origin LV,
  1352. then combining it with the existing cache pool named
  1353. by the --cachepool arg (variant, infers --type cache).
  1354.  
  1355. lvcreate -L|--size Size[m|UNIT] --cachepool LV_cachepool VG
  1356. [ -l|--extents Number[PERCENT] ]
  1357. [ -H|--cache ]
  1358. [ -c|--chunksize Size[k|UNIT] ]
  1359. [ -i|--stripes Number ]
  1360. [ -I|--stripesize Size[k|UNIT] ]
  1361. [ --type cache ]
  1362. [ --cachemode writethrough|writeback|passthrough ]
  1363. [ --cachepolicy String ]
  1364. [ --cachesettings String ]
  1365. [ --cachemetadataformat auto|1|2 ]
  1366. [ COMMON_OPTIONS ]
  1367. [ PV ... ]
  1368. -
  1369.  
  1370. Create a cache LV, first creating a new origin LV,
  1371. then combining it with the existing cache pool named
  1372. in the first arg (variant, also use --cachepool).
  1373.  
  1374. lvcreate --type cache -L|--size Size[m|UNIT] LV_cachepool
  1375. [ -l|--extents Number[PERCENT] ]
  1376. [ -H|--cache ]
  1377. [ -c|--chunksize Size[k|UNIT] ]
  1378. [ -i|--stripes Number ]
  1379. [ -I|--stripesize Size[k|UNIT] ]
  1380. [ --poolmetadatasize Size[m|UNIT] ]
  1381. [ --poolmetadataspare y|n ]
  1382. [ --cachemode writethrough|writeback|passthrough ]
  1383. [ --cachepolicy String ]
  1384. [ --cachesettings String ]
  1385. [ --cachemetadataformat auto|1|2 ]
  1386. [ COMMON_OPTIONS ]
  1387. [ PV ... ]
  1388. -
  1389.  
  1390. When LV is a cache pool, create a cache LV,
  1391. first creating a new origin LV, then combining it with
  1392. the existing cache pool named in the first arg
  1393. (variant, infers --type cache, also use --cachepool).
  1394. When LV is not a cache pool, convert the specified LV
  1395. to type cache after creating a new cache pool LV to use
  1396. (use lvconvert).
  1397.  
  1398. lvcreate -H|--cache -L|--size Size[m|UNIT] LV
  1399. [ -l|--extents Number[PERCENT] ]
  1400. [ -c|--chunksize Size[k|UNIT] ]
  1401. [ -i|--stripes Number ]
  1402. [ -I|--stripesize Size[k|UNIT] ]
  1403. [ --cachemode writethrough|writeback|passthrough ]
  1404. [ --cachepolicy String ]
  1405. [ --cachesettings String ]
  1406. [ --cachemetadataformat auto|1|2 ]
  1407. [ --poolmetadatasize Size[m|UNIT] ]
  1408. [ --poolmetadataspare y|n ]
  1409. [ COMMON_OPTIONS ]
  1410. [ PV ... ]
  1411. -
  1412.  
  1413. EXAMPLES
  1414. Create a striped LV with 3 stripes, a stripe size of 8KiB and a
  1415. size of 100MiB. The LV name is chosen by lvcreate.
  1416. lvcreate -i 3 -I 8 -L 100m vg00
  1417.  
  1418. Create a raid1 LV with two images, and a useable size of 500
  1419. MiB. This operation requires two devices, one for each mirror
  1420. image. RAID metadata (superblock and bitmap) is also included on
  1421. the two devices.
  1422. lvcreate --type raid1 -m1 -L 500m -n mylv vg00
  1423.  
  1424. Create a mirror LV with two images, and a useable size of 500
  1425. MiB. This operation requires three devices: two for mirror
  1426. images and one for a disk log.
  1427. lvcreate --type mirror -m1 -L 500m -n mylv vg00
  1428.  
  1429. Create a mirror LV with 2 images, and a useable size of 500 MiB.
  1430. This operation requires 2 devices because the log is in memory.
  1431. lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
  1432.  
  1433. Create a copy-on-write snapshot of an LV:
  1434. lvcreate --snapshot --size 100m --name mysnap vg00/mylv
  1435.  
  1436. Create a copy-on-write snapshot with a size sufficient for over‐
  1437. writing 20% of the size of the original LV.
  1438. lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
  1439.  
  1440. Create a sparse LV with 1TiB of virtual space, and actual space
  1441. just under 100MiB.
  1442. lvcreate --snapshot --virtualsize 1t --size 100m --name mylv
  1443. vg00
  1444.  
  1445. Create a linear LV with a usable size of 64MiB on specific phys‐
  1446. ical extents.
  1447. lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
  1448.  
  1449. Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a
  1450. stripe size of 64KiB, using a total of 4 devices (including one
  1451. for parity).
  1452. lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
  1453.  
  1454. Create a RAID5 LV using all of the free space in the VG and
  1455. spanning all the PVs in the VG (note that the command will fail
  1456. if there are more than 8 PVs in the VG, in which case -i 7 must
  1457. be used to get to the current maximum of 8 devices including
  1458. parity for RaidLVs).
  1459. lvcreate --config allocation/raid_stripe_all_devices=1
  1460. --type raid5 -l 100%FREE -n mylv vg00
  1461.  
  1462. Create RAID10 LV with a usable size of 5GiB, using 2 stripes,
  1463. each on a two-image mirror. (Note that the -i and -m arguments
  1464. behave differently: -i specifies the total number of stripes,
  1465. but -m specifies the number of images in addition to the first
  1466. image).
  1467. lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
  1468.  
  1469. Create a 1TiB thin LV, first creating a new thin pool for it,
  1470. where the thin pool has 100MiB of space, uses 2 stripes, has a
  1471. 64KiB stripe size, and 256KiB chunk size.
  1472. lvcreate --type thin --name mylv --thinpool mypool
  1473. -V 1t -L 100m -i 2 -I 64 -c 256 vg00
  1474.  
  1475. Create a thin snapshot of a thin LV (the size option must not be
  1476. used, otherwise a copy-on-write snapshot would be created).
  1477. lvcreate --snapshot --name mysnap vg00/thinvol
  1478.  
  1479. Create a thin snapshot of the read-only inactive LV named "ori‐
  1480. gin" which becomes an external origin for the thin snapshot LV.
  1481. lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
  1482.  
  1483. Create a cache pool from a fast physical device. The cache pool
  1484. can then be used to cache an LV.
  1485. lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
  1486.  
  1487. Create a cache LV, first creating a new origin LV on a slow
  1488. physical device, then combining the new origin LV with an exist‐
  1489. ing cache pool.
  1490. lvcreate --type cache --cachepool my_cpool
  1491. -L 100G -n mylv vg00 /dev/slow1
  1492.  
  1493. SEE ALSO
  1494. lvm(8) lvm.conf(5) lvmconfig(8)
  1495.  
  1496. pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvre‐
  1497. move(8) pvresize(8) pvs(8) pvscan(8)
  1498.  
  1499. vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8)
  1500. vgconvert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8)
  1501. vgimportclone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8)
  1502. vgrename(8) vgs(8) vgscan(8) vgsplit(8)
  1503.  
  1504. lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8)
  1505. lvreduce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
  1506.  
  1507. lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8)
  1508. blkdeactivate(8) lvmdump(8)
  1509.  
  1510. dmeventd(8) lvmetad(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8)
  1511. clvmd(8) cmirrord(8) lvmdbusd(8)
  1512.  
  1513. lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
  1514.  
  1515. Red Hat, Inc. LVM TOOLS 2.02.171(2)-RHEL7 (2017-05-03) LVCREATE(8)
  1516.  
  1517. [root@ftp:/root]
  1518. >

LVM实践的更多相关文章

  1. linux学习书籍推荐《鸟哥的Linux私房菜》下载

    下载地址:点我 <鸟哥的Linux私房菜:基础学习篇>是具有知名度的Linux入门书<鸟哥的Linux私房菜基础学习篇>的最新版,全面而详细地介绍了Linux操作系统.< ...

  2. 硬盘相关合集,以及LVM操作实践

    1. 机器装有两块硬盘,重装系统只找到一块盘,如何解决? 正常装完系统后,运行: a. lsblk查看硬盘信息,这里可以发现还没有使用的另一块盘. b. fdisk或parted给硬盘分区,取决于硬盘 ...

  3. LVM最佳实践

    LVM逻辑卷管理器 LVM概念 在Linux中,逻辑卷管理器(Logical Volume Manager, LVM)是为Linux内核提供逻辑卷管理的设备映射器目标.大多数现代Linux发行版都能够 ...

  4. Linux LVM全面实践

    1.磁盘分区 [root@ol6-121-rac1 ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, no ...

  5. 深度实践KVM笔记

    深度实践KVM笔记 libvirt(virt-install,API,服务,virsh)->qemu(qemu-kvm进程,qemu-img)->KVM虚拟机->kvm.ko 内核模 ...

  6. Ubuntu Server上的LVM配置

    在安装Linux的时候,通常遇到的一个比较头痛的问题就是分区,到底每个区该分多少,用了一段时间之后,某个分区又不够用了,该怎么办?如果是普通的服务器,那一切都好说,大不了就关机重新划分分区嘛,但是对于 ...

  7. RHCS集群理论暨最佳实践

    RHCS集群理论暨 最佳实践 什么是集群?     集群是一组(>2)相互独立的,通过高速网络互联的计算机组成的集合.群集一般可以分为科学集群,负载均衡集群,高可用性集群三大类.     科学集 ...

  8. OpenStack实践系列⑨云硬盘服务Cinder

    OpenStack实践系列⑨云硬盘服务Cinder八.cinder8.1存储的三大分类 块存储:硬盘,磁盘阵列DAS,SAN存储 文件存储:nfs,GluserFS,Ceph(PB级分布式文件系统), ...

  9. binlog2sql之MySQL数据闪回实践

    DBA或开发人员,有时会误删或者误更新数据,如果是线上环境并且影响较大,就需要能快速回滚.传统恢复方法是利用备份重搭实例,再应用去除错误sql后的binlog来恢复数据.此法费时费力,甚至需要停机维护 ...

随机推荐

  1. D 分组背包

    <span style="color:#3333ff;">/* ---------------------------------------------------- ...

  2. 经验总结18--EF改动关系,多对多

    EF改动关系让我费事蛮多时间.能查的资料少,网上试了非常多方法都不正确. 最后还是自己研究出来了.在这里和大家分享下,有更好的方法也能够分享下. 首先说说我一般做改动功能时,前台传參数,后台使用对象接 ...

  3. 当使用servlet输出json时,浏览器端jquery的ajax遇到parse error的问题

    在使用jquery的ajax进行请求发送并由服务端的servlet返回json格式的数据内容时,假设输出内容没有正确设置,会遇到client浏览器报告parse error的问题.这个问题的解决仅仅须 ...

  4. Qt 3D的研究(十):描边渲染(轮廓渲染)以及Silhouette Shader

    Qt 3D的研究(十):描边渲染(轮廓渲染)以及Silhouette Shader 之前写了两篇文章,介绍了我在边缘检測上面的研究.实际上.使用GPU对渲染图像进行边缘检測.前提是须要进行两遍渲染.前 ...

  5. leetcode第一刷_Minimum Depth of Binary Tree

    非常easy的题目.只是还是认为要说一下. 最小深度.非常快想到bfs,层序遍历嘛.本科的时候实在是没写过多少代码,一開始竟然想不到怎么保存一层的信息.后来想到能够压入一个特殊的对象,每次到达这个对象 ...

  6. 字符串函数---strcmp()与strncmp()详解及实现【转】

    本文转载自:http://blog.csdn.net/lanzhihui_10086/article/details/39829623 一.strcmp()与strncmp() strcmp():st ...

  7. ubantu下NiFi单节点安装部署

    第一步,首先下载安装包:http://nifi.apache.org/download.html,博主下载的是1.4.0版本,直接下载的是编译后的文件. 第二步:将压缩包上传到服务器相应目录下,并且解 ...

  8. javascript中的分号【;】

    以前一直以为,在编写js代码的时候,如果在代码后面不添加分号,JavaScript会自动填补分号.最近看了权威指南,才突然发现一直理解有误,而且关于分号的使用,还有很多需要注意的地方. 1.分号的省略 ...

  9. 利用阿里云加速Docker For Windows

    1.进入阿里云的容器镜像服务,找到镜像中心的镜像加速器. https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors 2.进入Docker ...

  10. Javascript万物皆对象?

    在javascript的世界里,有这么一句话,万物皆对象. 但是这个对象,应该怎么理解呢? exm........??,难道值类型也是对象?!! 当然,不是. 准确地讲是对于“引用类型”而言. 那,在 ...