1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-25 13:49:28 +03:00
Files
lvm2/man/lvcreate.8_end
Zdenek Kabelac c1bfc8737f man: updates and typography
Manually enhance pages for thin, cache, raid, vdo.

Replace usage of .HP with .TP when it makes sense (but keep .HP
where so far we don't have replacement giving same visual results).

Use .CMS, .CME  macros in dmsetup/dmstats so it easy to switch
But keep using .HP when the rendering looks simply better in terminal
although HTML output does not looks that well - so we may eventually
switch here to .TP.

For basic command synopsis use .NSY macro that will
use .SY for graphical rendering (postscript/pdf) but keep
using .TP for ASCII terminal output, as here many HTML renderers
are emitting unreadable pages.

For options use '\ ' (non-breakable space) between option and
its argument and option are not across line.

Reformat lines to fit in 80 columns.

Use  .EX .. .EE  for example output - this improves
character alignment for poststrict/pdf rendering as
it use monospace fonts (unlike .nf .. .fi).
Also with Example section never let the line being with space
and use '\' for such line.
If the Example line should being with '.' it needs to be
prefix with \&.
Add .nf/.fi macros for cases where .EX & .EE are undefined
(this happens i.e. with man2html)

Avoid use of tables (.TS .. .TE) as HTML renderers often use
images (.png) files for such tables and this does not scale well
when user changes font size in browser.
(and the large/long table were split into 2 pieces
so it does fit to 80 columns).

Use .MT .ME for emails.

Use .UR .UE. for URL.

Use  .\|.\|.\& as sequence of 3 dots and add \& to not create end of
sentence and possibly wrong alignment.

On lines starting with .BR & .IR avoid using \fB \fI as this
can cause problem when i.e. html rendered may keep use
italic bold when just italic was really wanted.

When using series of .TP/.IP - set the size only with the
first tag - and let renderer align others to match the column.

Correct some small typographical rendering issues.

Rendering was evaluated for readable results with:
- mandoc -T html  (-O style=mandoc.css)
- groff  -Thtml -mman
- man2html
- man -Thtml
- man -Tps
- man

Unfortunatelly various g/troff troubles are with each of them,
so we need to select usage of macros in a way, that is not mangling
results for above engines.
2025-04-28 14:19:18 +02:00

101 lines
3.6 KiB
Plaintext

.
.SH EXAMPLES
.
Create a striped LV with 3 stripes, a stripe size of 8\ KiB
and a size of 100\ MiB.
The LV name is chosen by lvcreate.
.br
.B lvcreate -i 3 -I 8 -L 100m vg00
.P
Create a raid1 LV with two images, and a usable size of 500\ MiB.
This operation requires two devices, one for each mirror image.
RAID metadata (superblock and bitmap) is also included on the two devices.
.br
.B lvcreate --type raid1 -m1 -L 500m -n mylv vg00
.P
Create a mirror LV with two images, and a usable size of 500\ MiB.
This operation requires three devices: two for mirror images and
one for a disk log.
.br
.B lvcreate --type mirror -m1 -L 500m -n mylv vg00
.P
Create a mirror LV with 2 images, and a usable size of 500\ MiB.
This operation requires 2 devices because the log is in memory.
.br
.B lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
.P
Create a copy-on-write snapshot of an LV:
.br
.B lvcreate --snapshot --size 100m --name mysnap vg00/mylv
.P
Create a copy-on-write snapshot with a size sufficient
for overwriting 20% of the size of the original LV.
.br
.B lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
.P
Create a sparse LV with 1 TiB of virtual space,
and actual space just under 100\ MiB.
.br
.B lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
.P
Create a linear LV with a usable size of 64\ MiB on specific physical extents.
.br
.B lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
.P
Create a RAID5 LV with a usable size of 5 GiB, 3 stripes, a stripe size of
64\ KiB, using a total of 4 devices (including one for parity).
.br
.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
.P
Create a RAID5 LV using all of the free space in the VG and spanning all the
PVs in the VG (note that the command will fail if there are more than 8 PVs in
the VG, in which case \fB-i 7\fP must be used to get to the current maximum of
8 devices including parity for RaidLVs).
.br
.B lvcreate --config allocation/\:raid_stripe_all_devices=1 \
--type raid5 -l 100%FREE -n mylv vg00
.P
Create RAID10 LV with a usable size of 5 GiB, using 2 stripes,
each on a two-image mirror.
(Note that the \fB-i\fP and \fB-m\fP arguments behave differently:
\fB-i\fP specifies the total number of stripes,
but \fB-m\fP specifies the number of images in addition
to the first image).
.br
.B lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
.P
Create a 1 TiB thin LV mythin, with 256 GiB thinpool tpool0 in vg00.
.br
.B lvcreate -T -V 1T --size 256G --name mythin vg00/tpool0
.P
Create a 1 TiB thin LV, first creating a new thin pool for it,
where the thin pool has 100\ MiB of space, uses 2 stripes,
has a 64\ KiB stripe size, and 256\ KiB chunk size.
.br
.B lvcreate --type thin --name mylv --thinpool mypool -V 1t \
-L 100m -i 2 -I 64 -c 256 vg00
.P
Create a thin snapshot of a thin LV (the size option must not be used,
otherwise a copy-on-write snapshot would be created).
.br
.B lvcreate --snapshot --name mysnap vg00/thinvol
.P
Create a thin snapshot of the read-only inactive LV named "origin"
which becomes an external origin for the thin snapshot LV.
.br
.B lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
.P
Create a cache pool from a fast physical device. The cache pool can
then be used to cache an LV.
.br
.B lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
.P
Create a cache LV, first creating a new origin LV on a slow physical device,
then combining the new origin LV with an existing cache pool.
.br
.B lvcreate --type cache --cachepool my_cpool -L 100G -n mylv vg00 /dev/slow1
.P
Create a VDO LV vdo0 with VDOPoolLV size of 10 GiB and name vpool1.
.br
.B lvcreate --vdo --size 10G --name vdo0 vg00/vpool1