1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126
|
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
# Copyright (C) 2004-2017 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU Lesser General Public License v.2.1.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Syntax
#
# A new command has a unique combination of:
# command name, required option args and required
# positional args.
#
# To define a new command, begin a single line with a
# command name, followed by required options/args,
# (e.g. --foo, or --foo val), followed by required
# positional args, (e.g. VG)
#
# After the single line of required elements are lines
# of optional elements:
# OO: <optional --option args>
# OP: <optional positional args>
#
# command_name required_opt_arg ... required_pos_arg ...
# OO: optional_opt_arg, ...
# OP: optional_pos_arg ...
#
# required_opt_arg/optional_opt_arg must begin with the
# long form option name, e.g. --foo. If the option name
# takes a value, then the type of value is specified,
# e.g. --foo String.
#
# Possible option names are listed in args.h
#
# Use --foo_long to specify that only the long form of
# --foo is accepted by the command. (This is uncommon.)
#
# Possible option arg types are shown in tools/vals.h,
# e.g. Bool, String, VG, SizeMB.
#
# --option args outside the list of types in vals.h are treated
# as literal (non-variable) strings or numbers.
#
# positional args can be multiple types separated by |, e.g. VG|LV|Tag
#
# If a positional arg is repeatable, it is followed by ..., e.g. VG|LV|Tag ...
#
# LV can have a suffix indicating the LV type, e.g. LV_linear, LV_thinpool.
# LV_raid represents any raidN. LV_type1_type2_type3 when the LV is
# limited to multiple specific types.
#
# Note that two commands whose required parameters differ only by
# the LV types they accept are ambiguous. That is, they cannot be
# distinguished by just looking at the command, but require reading
# the VG to find the LV type. So, command definitions that differ
# only in accepted LV types are not allowed. It would be best to
# distinguish them by using different option names.
# There are FIXME's below for some of these cases.
#
# VG, LV can have the suffix _new, indicating the named VG or LV
# does not yet exist.
#
# If Select is included in pos_arg, it means that the pos_arg
# may be empty if the --select option is used.
#
# --size and --extents are interchangeable, but only --size is used
# in these definitions to keep them simpler. --extents is
# automatically included and recognized as an alternative to --size.
#
# lvcreate generally requires a VG arg in position 1 and does not
# require the --name option (when --name is omitted, a name is
# generated). But, all commands of that form have a variant which
# is not defined here, but which is automatically recognized as
# being equivalent. That variant allows the required VG arg to
# be omitted when --name VG/LV is specified, or when the
# LVM_VG_NAME env var is set and --name LV is specified.
# The lvcreate variants with --name and without a VG arg are
# automatically recognized as an alternative to the defined
# command forms requiring the VG and no --name.
# Also, --thinpool VG/LV or --cachepool VG/LV can be used in
# place of --name to provide the VG name instead of pos 1.
#
# Note that one the most difficult aspect of these definitions is
# the variants of --thin / --type thin / --type thin-pool,
# --cache / --type cache / --type cache-pool.
# There are no consistent rules to follow and the behaviors are
# unpredictable; each possible variation and combination needs
# to be tested individually to see what it means.
#
# Some options have multiple names, but only one form of the name
# is used in these definitions. Synonyms will be recognized when
# matching a command to a command definition.
#
# used in definitions below (equivalent but not used in definitions)
# mirrorlog core (not corelog)
# resizable (resizable or allocation)
# allocatable (allocation)
# activate (available)
# rebuild (raidrebuild)
# syncaction (raidsyncaction)
# writemostly (raidwritemostly)
# minrecoveryrate (raidminrecoveryrate)
# maxrecoveryrate (raidmaxrecoveryrate)
# writebehind (raidwritebehind)
# virtualsize (virtualoriginsize)
# splitcache (split)
# vgmetadatacopies (metadatacopies)
# pvmetadatacopies (metadatacopies)
#
# "---" is like a comment line, used to separate text for readability
#
# ID: A unique string identifying the command. Two commands that do
# the same thing, but are alternate syntaxes can share the same ID,
# in which case the implementation would have to sort out which
# args to look at for the required parameters. Or, the two commands
# could use different IDs, in which case the implementation would
# know where to look for each parameter.
#
# DESC: A description of the command. The "DESC:" tags will be
# included in the text as indicators of new lines when printing
# the descriptions for help/man output.
#
# RULE: rules that a given command must follow, i.e. required (and)
# or invalid (not) combinations of options, LV types or LV properties.
#
# RULE: A and|not B
#
# Conditions in A are applied to a given command+LV.
# If the conditions in A are true, then the checks in B
# are applied. If the checks in B are true|false according
# to and|not, then the command fails|continues.
#
# When A is "all", the conditions in B are always applied.
#
# Conditions:
# . if any --option listed is set, the checks may apply
# . if any LV_type listed matches LV, the checks may apply
# . if all lv_is_prop listed matches LV, the checks may apply
# . if all of the above pass, then perform the checks
#
# Checks for "and":
# . if any --option listed is not set, then fail
# . if none of the LV_types matches the LV, then fail
# . if any of the lv_is_prop do not match the LV, then fail
#
# Checks for "not":
# . if any --option listed is set, then fail
# . if any of the LV_types matches the LV, then fail
# . if any of the lv_is_prop match the LV, then fail
#
# RULE: --option|LV_type|lv_is_prop|all ... and|not --option|LV_type|lv_is_prop ...
#
# RULE: --opt1 not --opt2
# RULE: --opt1 and --opt2
# RULE: --opt1 LV_type1 lv_is_prop1 and --opt2
# RULE: --opt1 LV_type1 and lv_is_prop1
# RULE: LV_type1 and lv_is_prop1
#
#
# AUTOTYPE: <segtype>
# The cmd def implies the type. Optionally using --type foo
# is not wrong, but it's redundant. If --type is specified
# it is not used in matching a user command to the cmd def,
# but once a user cmd is matched to the cmd def, a specified
# type is compared to the AUTOTYPE to ensure they match.
# We avoid including --type foo in the OO list because doing
# so often makes the cmd def redundant with another cmd def
# that has --type foo in its required_options. We want a user
# command to only match a single cmd def.
# Usually, a user command with --type foo will match a cmd def
# that includes --type foo in its required_options.
#
# For lvcreate cmd defs, each should either include --type foo
# in required_options, or it should include AUTOTYPE foo
# (and not include --type in OO).
#
# For efficiency, sets of options can be defined and reused
# in multiple command definitions.
#
# To define a common set of options:
# OO_NAME: --foo, --bar String
#
# To use this set of options, include it on the OO: line, e.g.
# OO: --example, OO_NAME
#
# which is expanded to
# OO: --example, --foo, --bar String
#
# Including OO_NAME after a command name on the required line
# means that any one of the options is required and the rest
# are optional. The usage syntax for this case is printed as:
# command (--foo A, --bar B)
#
#
# OO_ALL is included in every command automatically.
#
OO_ALL: --commandprofile String, --config String, --debug,
--driverloaded Bool, --help, --nolocking, --lockopt String, --longhelp, --profile String, --quiet,
--verbose, --version, --yes, --test, --devicesfile String, --devices PV, --nohints --journal String
#
# options for pvdisplay, lvdisplay, vgdisplay
#
OO_REPORTING: --configreport ConfigReport, --foreign,
--ignorelockingfailure, --logonly, --readonly, --reportformat ReportFmt,
--select String, --shared, --units Units
#
# options for pvs, lvs, vgs, fullreport
#
OO_REPORT: OO_REPORTING, --all, --aligned, --binary,
--headings HeadingsType, --nameprefixes, --noheadings,
--nosuffix, --options String, --rows, --separator String,
--sort String, --unbuffered, --unquoted
#
# options for config, dumpconfig, lvmconfig
#
OO_CONFIG: --atversion String, --typeconfig ConfigType, --file String, --ignoreadvanced,
--ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String,
--sinceversion String, --showdeprecated, --showunsupported, --validate, --valuesonly,
--withsummary, --withcomments, --withgeneralpreamble, --withlocalpreamble, --withspaces,
--unconfigured, --withversions
---
# None of these can function as a required option for lvchange.
OO_LVCHANGE: --autobackup Bool, --force, --ignoremonitoring,
--noudevsync, --reportformat ReportFmt, --select String
# Any of these can function as a required option for lvchange.
# profile is also part of OO_ALL, but is repeated in OO_LVCHANGE_META
# because it can function as a required opt.
OO_LVCHANGE_META: --addtag Tag, --deltag Tag,
--alloc Alloc, --contiguous Bool,
--compression Bool, --deduplication Bool,
--detachprofile, --metadataprofile String, --profile String,
--permission Permission, --readahead Readahead, --setactivationskip Bool,
--setautoactivation Bool, --errorwhenfull Bool, --discards Discards, --zero Bool,
--cachemode CacheMode, --cachepolicy String, --cachesettings String,
--minrecoveryrate SizeKB, --maxrecoveryrate SizeKB,
--vdosettings String, --integritysettings String,
--writebehind Number, --writemostly WriteMostlyPV, --persistent n
# It's unfortunate that activate needs to be optionally allowed here;
# it should only be used explicitly, but it's been previously allowed
# in combination with unrelated metadata changes.
lvchange OO_LVCHANGE_META VG|LV|Tag|Select ...
OO: --activate Active, --poll Bool, --monitor Bool, OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_properties
DESC: Change a general LV attribute.
DESC: For options listed in parentheses, any one is
DESC: required, after which the others are optional.
RULE: all not lv_is_pvmove lv_is_mirror_log lv_is_mirror_image
RULE: all and lv_is_vg_writable
RULE: --contiguous not --alloc
RULE: --profile not --detachprofile
RULE: --metadataprofile not --detachprofile
RULE: --minrecoveryrate --maxrecoveryrate and LV_raid
RULE: --writebehind --writemostly and LV_raid1
RULE: --cachemode --cachepolicy --cachesettings and LV_cache LV_cachepool LV_writecache
RULE: --errorwhenfull --discards --zero and LV_thinpool
RULE: --permission not lv_is_external_origin lv_is_raid_metadata lv_is_raid_image LV_thinpool
RULE: --alloc --contiguous --metadataprofile --persistent --profile --readahead not lv_is_thick_origin
RULE: --alloc --discards --zero --cachemode --cachepolicy --cachesettings not lv_is_partial
# It's unfortunate that activate needs to be optionally allowed here,
# like above, it was previously allowed in combination.
lvchange --resync VG|LV_raid_mirror|Tag|Select ...
OO: --activate Active, OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_resync
DESC: Resynchronize a mirror or raid LV.
DESC: Use to reset 'R' attribute on a not initially synchronized LV.
RULE: all not lv_is_pvmove lv_is_locked lv_is_raid_with_integrity
RULE: all not LV_raid0
lvchange --syncaction SyncAction VG|LV_raid|Tag|Select ...
OO: OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_syncaction
DESC: Resynchronize or check a raid LV.
RULE: all not LV_raid0
lvchange --rebuild PV VG|LV_raid|Tag|Select ...
OO: OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_rebuild
DESC: Reconstruct data on specific PVs of a raid LV.
RULE: all not LV_raid0
lvchange --activate Active VG|LV|Tag|Select ...
OO: --activationmode ActivationMode, --partial, --poll Bool, --monitor Bool,
--ignoreactivationskip, --ignorelockingfailure, --sysinit, --readonly, OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_activate
DESC: Activate or deactivate an LV.
lvchange --refresh VG|LV|Tag|Select ...
OO: --activationmode ActivationMode, --partial, --poll Bool, --monitor Bool, OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_refresh
DESC: Reactivate an LV using the latest metadata.
lvchange --monitor Bool VG|LV|Tag|Select ...
OO: OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_monitor
DESC: Start or stop monitoring an LV from dmeventd.
RULE: all not lv_is_pvmove
lvchange --poll Bool VG|LV|Tag|Select ...
OO: --monitor Bool, OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_poll
DESC: Start or stop processing an LV conversion.
lvchange --persistent y --minor Number LV
OO: --major Number, --activate Active, --poll Bool, --monitor Bool, OO_LVCHANGE
IO: --ignoreskippedcluster
ID: lvchange_persistent
DESC: Make the minor device number persistent for an LV.
RULE: all not LV_thinpool LV_cachepool LV_vdopool
---
OO_LVCONVERT_POOL: --chunksize SizeKB, --poolmetadata LV,
--poolmetadatasize SizeMB, --poolmetadataspare Bool, --metadataprofile String,
--readahead Readahead, --wipesignatures Bool, --zero Bool
OO_LVCONVERT_CACHE: --cachemetadataformat CacheMetadataFormat,
--cachemode CacheMode, --cachepolicy String,
--cachesettings String, --zero Bool
OO_LVCONVERT_VDO: --compression Bool, --deduplication Bool, --vdosettings String
OO_LVCONVERT_VDO_POOL: OO_LVCONVERT_VDO, --metadataprofile String,
--readahead Readahead, --wipesignatures Bool, --zero Bool
OO_LVCONVERT_THINPOOL: --discards Discards, --errorwhenfull Bool, --pooldatavdo Bool,
OO_LVCONVERT_VDO, OO_LVCONVERT_POOL
OO_LVCONVERT: --alloc Alloc, --background, --force, --noudevsync
---
# These cover all the core, raid-related type conversions.
# They are all routed into the core raid conversion code.
lvconvert --type linear LV
OO: OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to linear.
RULE: all not lv_is_locked lv_is_pvmove
lvconvert --type striped LV
OO: --stripes_long Number, --stripesize SizeKB, --regionsize RegionSize, --interval Number, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to striped.
RULE: all not lv_is_locked lv_is_pvmove
lvconvert --type mirror LV
OO: --mirrors SNumber, --stripes_long Number, --stripesize SizeKB, --regionsize RegionSize, --interval Number, --mirrorlog MirrorLog, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to type mirror (also see type raid1),
RULE: all not lv_is_locked lv_is_pvmove
# When LV is already raid, this changes the raid layout
# (changing layout of raid0 and raid1 not allowed.)
lvconvert --type raid LV
OO: --mirrors SNumber, --stripes_long Number, --stripesize SizeKB, --regionsize RegionSize, --interval Number, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to raid or change raid layout
DESC: (a specific raid level must be used, e.g. raid1).
RULE: all not lv_is_locked lv_is_pvmove
RULE: lv_is_raid_with_integrity not --stripes_long --stripesize --regionsize --interval
lvconvert --mirrors SNumber LV
OO: --regionsize RegionSize, --interval Number, --mirrorlog MirrorLog, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to raid1 or mirror, or change number of mirror images.
RULE: all not lv_is_locked lv_is_pvmove
lvconvert --stripes_long Number LV_raid
OO: OO_LVCONVERT, --interval Number, --regionsize RegionSize, --stripesize SizeKB
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert raid LV to change number of stripe images.
RULE: all not lv_is_locked lv_is_pvmove lv_is_raid_with_integrity
RULE: all not LV_raid0 LV_raid1
lvconvert --stripesize SizeKB LV_raid
OO: OO_LVCONVERT, --interval Number, --regionsize RegionSize
ID: lvconvert_raid_types
DESC: Convert raid LV to change the stripe size.
RULE: all not lv_is_locked lv_is_pvmove lv_is_raid_with_integrity
RULE: all not LV_raid0 LV_raid1
lvconvert --regionsize RegionSize LV_raid
OO: OO_LVCONVERT
ID: lvconvert_change_region_size
DESC: Change the region size of an LV.
RULE: all not lv_is_locked lv_is_pvmove lv_is_raid_with_integrity
RULE: all not LV_raid0
FLAGS: SECONDARY_SYNTAX
---
# lvconvert raid-related utilities
# Create a new command set for these and migrate them out of lvconvert?
lvconvert --splitmirrors Number --name LV_new LV_raid1_mirror_cache
OO: OO_LVCONVERT
OP: PV ...
ID: lvconvert_split_mirror_images
DESC: Split images from a raid1 or mirror LV and use them to create a new LV.
RULE: all not lv_is_locked lv_is_pvmove lv_is_raid_with_integrity
lvconvert --splitmirrors Number --trackchanges LV_raid1_cache
OO: OO_LVCONVERT
OP: PV ...
ID: lvconvert_split_mirror_images
DESC: Split images from a raid1 LV and track changes to origin for later merge.
RULE: all not lv_is_locked lv_is_pvmove lv_is_raid_with_integrity
lvconvert --mergemirrors LV_linear_raid|VG|Tag ...
OO: OO_LVCONVERT
ID: lvconvert_merge_mirror_images
DESC: Merge LV images that were split from a raid1 LV.
RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow lv_is_raid_with_integrity
lvconvert --mirrorlog MirrorLog LV_mirror
OO: OO_LVCONVERT
OP: PV ...
ID: lvconvert_change_mirrorlog
DESC: Change the type of mirror log used by a mirror LV.
RULE: all not lv_is_locked lv_is_pvmove
FLAGS: SECONDARY_SYNTAX
---
# lvconvert utilities for creating/maintaining thin and cache objects.
# Create a new command set for these and migrate them out of lvconvert?
lvconvert --type thin --thinpool LV LV_linear_striped_raid_cache_thin_error_zero
OO: --thin, --originname LV_new, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_thin_with_external
DESC: Convert LV to a thin LV, using the original LV as an external origin.
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
# alternate form of lvconvert --type thin
lvconvert --thin --thinpool LV LV_linear_striped_raid_cache_thin_error_zero
OO: --originname LV_new, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_thin_with_external
DESC: Convert LV to a thin LV, using the original LV as an external origin.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
# Convert to thin volume
lvconvert --type thin LV_linear_striped_raid_cache_writecache_vdo_error_zero
OO: --thin, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_thin_with_data
DESC: Convert LV to a thin LV, using LV as thin-pool data volume.
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
# Convert to thin volume
lvconvert --thin LV_linear_striped_raid_cache_writecache_vdo_error_zero
OO: OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_thin_with_data
DESC: Convert LV to a thin LV, using LV as thin-pool data volume.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
---
lvconvert --type cache --cachepool LV LV_linear_striped_raid_thinpool_vdo_vdopool_vdopooldata_thin_error_zero
OO: --cache, OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_cache_with_cachepool
DESC: Attach a cache pool to an LV, converts the LV to type cache.
RULE: all not lv_is_locked lv_is_merging_origin lv_is_merging_cow lv_is_cow
RULE: --poolmetadata not --readahead --stripesize --stripes_long
# alternate form of lvconvert --type cache
lvconvert --cache --cachepool LV LV_linear_striped_raid_thinpool_vdo_vdopool_vdopooldata_thin_error_zero
OO: OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_cache_with_cachepool
DESC: Attach a cache pool to an LV.
RULE: all not lv_is_locked lv_is_merging_origin lv_is_merging_cow lv_is_cow
RULE: --poolmetadata not --readahead --stripesize --stripes_long
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: cache
---
lvconvert --type writecache --cachevol LV LV_linear_striped_raid_thinpool
OO: OO_LVCONVERT, --cachesettings String
ID: lvconvert_to_writecache
DESC: Attach a writecache to an LV, converts the LV to type writecache.
RULE: all and lv_is_visible
---
lvconvert --type cache --cachevol LV LV_linear_striped_raid_thinpool
OO: --cache, OO_LVCONVERT_CACHE, OO_LVCONVERT, --poolmetadatasize SizeMB, --chunksize SizeKB
ID: lvconvert_to_cache_with_cachevol
DESC: Attach a cache to an LV, converts the LV to type cache.
RULE: all and lv_is_visible
# alternate form of lvconvert --type cache
lvconvert --cache --cachevol LV LV_linear_striped_raid_thinpool
OO: OO_LVCONVERT_CACHE, OO_LVCONVERT, --poolmetadatasize SizeMB, --chunksize SizeKB
ID: lvconvert_to_cache_with_cachevol
DESC: Attach a cache to an LV, converts the LV to type cache.
RULE: all and lv_is_visible
FLAGS: SECONDARY_SYNTAX
---
lvconvert --type writecache --cachedevice PV LV_linear_striped_raid_thinpool
OO: OO_LVCONVERT, --cachesize SizeMB, --cachesettings String
ID: lvconvert_to_writecache_with_device
DESC: Add a writecache to an LV, using a specified cache device.
RULE: all and lv_is_visible
lvconvert --type cache --cachedevice PV LV_linear_striped_raid_thinpool
OO: OO_LVCONVERT, --cachesize SizeMB, --cachesettings String, --chunksize SizeKB
ID: lvconvert_to_cache_with_device
DESC: Add a cache to an LV, using a specified cache device.
RULE: all and lv_is_visible
---
lvconvert --type thin-pool LV_linear_striped_raid_cache_writecache_vdo_error_zero
OO: --stripes_long Number, --stripesize SizeKB,
OO_LVCONVERT_THINPOOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_thinpool
DESC: Convert LV to type thin-pool.
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
# This command syntax has two different meanings depending on
# whether the LV pos arg is already a thin pool or not.
#
# 1. When the LV arg is not a pool, this command converts
# the LV into a pool, optionally using a specified meta LV.
# This is an alternate form of the primary command:
# lvconvert --type thin-pool LV
#
# 2. When the LV is is already a pool and a meta LV is specified,
# the meta LV is swapped. Swapping a meta LV is a very specialized
# operation that users should never use.
# This is an alternate form of the primary command:
# lvconvert --swapmetadata --poolmetadata LV LV
#
# The command def cannot include --poolmetadata as a required
# option, otherwise 1 would not pass, so the validation of
# this option cannot be done by the command defs, but has to
# be done ad hoc in the lvconvert implementation.
#
# This command syntax is deprecated, and the primary forms
# of creating a pool or swapping metadata should be used.
lvconvert --thinpool LV_linear_striped_raid_cache_writecache_vdo_error_zero_thinpool
OO: --stripes_long Number, --stripesize SizeKB,
OO_LVCONVERT_THINPOOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_thinpool_or_swap_metadata
DESC: Convert LV to type thin-pool (variant, use --type thin-pool).
DESC: Swap metadata LV in a thin pool (variant, use --swapmetadata).
FLAGS: PREVIOUS_SYNTAX
RULE: all and lv_is_visible
RULE: all not lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
AUTOTYPE: thin-pool
---
lvconvert --type cache-pool LV_linear_striped_raid_error_zero
OO: OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_cachepool
DESC: Convert LV to type cache-pool.
RULE: --poolmetadata not --readahead --stripesize --stripes_long
RULE: all not lv_is_raid_with_integrity
# This command syntax has two different meanings depending on
# whether the LV pos arg is already a cache pool or not.
#
# 1. When the LV arg is not a pool, this command converts
# the LV into a pool, optionally using a specified meta LV.
# This is an alternate form of the primary command:
# lvconvert --type cache-pool LV
#
# 2. When the LV is is already a pool and a meta LV is specified,
# the meta LV is swapped. Swapping a meta LV is a very specialized
# operation that users should never use.
# This is an alternate form of the primary command:
# lvconvert --swapmetadata --poolmetadata LV LV
#
# The command def cannot include --poolmetadata as a required
# option, otherwise 1 would not pass, so the validation of
# this option cannot be done by the command defs, but has to
# be done ad hoc in the lvconvert implementation.
#
# This command syntax is deprecated, and the primary forms
# of creating a pool or swapping metadata should be used.
# FIXME
# AUTOTYPE: cache-pool doesn't work here.
# A strange command matches this cmd def:
# lvconvert --type cache-pool --cachepool LV
# where the LV is already a cache pool. That command
# seems to be used to change properties on an existing cache pool.
# The command lvconvert --type cache-pool LV will also change
# properties on an existing cache pool.
# Neither seems like a logical command to change properties
# of an LV, wouldn't lvchange do that?
lvconvert --cachepool LV_linear_striped_raid_cachepool_error_zero
OO: --type cache-pool, OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
ID: lvconvert_to_cachepool_or_swap_metadata
DESC: Convert LV to type cache-pool (variant, use --type cache-pool).
DESC: Swap metadata LV in a cache pool (variant, use --swapmetadata).
FLAGS: PREVIOUS_SYNTAX
RULE: all and lv_is_visible
RULE: all not lv_is_raid_with_integrity
RULE: --poolmetadata not --readahead --stripesize --stripes_long
---
lvconvert --type vdo-pool LV_linear_striped_raid_cache
OO: --name LV_new, --virtualsize SizeMB, OO_LVCONVERT_VDO_POOL, OO_LVCONVERT
ID: lvconvert_to_vdopool
DESC: Convert LV to type vdopool.
RULE: all and lv_is_visible lv_is_writable
RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_virtual lv_is_raid_with_integrity
lvconvert --vdopool LV_linear_striped_raid_cache
OO: OO_LVCONVERT_VDO_POOL, OO_LVCONVERT, --name LV_new, --virtualsize SizeMB,
ID: lvconvert_to_vdopool_param
DESC: Convert LV to type vdopool.
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_virtual lv_is_raid_with_integrity
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: vdo-pool
---
lvconvert --splitcache LV_cachepool_cache_thinpool_vdopool_writecache
OO: OO_LVCONVERT, --cachesettings String
ID: lvconvert_split_and_keep_cache
DESC: Detach a cache from an LV.
---
lvconvert --uncache LV_cache_thinpool_vdopool_writecache
OO: OO_LVCONVERT, --cachesettings String
ID: lvconvert_split_and_remove_cache
DESC: Detach and delete a cache from an LV.
FLAGS: SECONDARY_SYNTAX
---
lvconvert --swapmetadata --poolmetadata LV LV_thinpool_cachepool
OO: --chunksize SizeKB, OO_LVCONVERT
ID: lvconvert_swap_pool_metadata
DESC: Swap metadata LV in a thin pool or cache pool (for repair only).
FLAGS: SECONDARY_SYNTAX
---
# lvconvert --merge is an extremely ambiguous command.
# It can do very different operations, but which one depends
# on knowing the LV type. So, the command doesn't know what
# it's actually doing until quite late, when processing a
# single LV. When passed a VG or tag, it will do different
# operations on each LV it finds, depending on the current LV type.
lvconvert --merge LV_linear_striped_raid_thin_snapshot|VG|Tag ...
OO: --background, --interval Number, OO_LVCONVERT
ID: lvconvert_merge
DESC: Merge LV that was split from a mirror (variant, use --mergemirrors).
DESC: Merge thin LV into its origin LV (variant, use --mergethin).
DESC: Merge COW snapshot LV into its origin (variant, use --mergesnapshot).
RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow
FLAGS: SECONDARY_SYNTAX
---
lvconvert --mergethin LV_thin ...
OO: OO_LVCONVERT
ID: lvconvert_merge_thin
DESC: Merge thin LV into its origin LV.
RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow
RULE: all and lv_is_visible
---
# lvconvert snapshot-related utilities
# Create a new command set for these and migrate them out of lvconvert?
lvconvert --mergesnapshot LV_snapshot ...
OO: --background, --interval Number, OO_LVCONVERT
ID: lvconvert_merge_snapshot
DESC: Merge COW snapshot LV into its origin.
RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow
RULE: all and lv_is_visible
---
lvconvert --splitsnapshot LV_snapshot
OO: OO_LVCONVERT
ID: lvconvert_split_cow_snapshot
DESC: Separate a COW snapshot from its origin LV.
RULE: all not lv_is_locked lv_is_pvmove lv_is_origin lv_is_external_origin lv_is_merging_cow
FLAGS: SECONDARY_SYNTAX
---
# NB: an unusual use of position args here, the first pos arg
# (will become origin LV) is not passed to process_each,
# the second pos arg (will become cow LV) is given to
# process_each. Because the first pos LV is not handled
# by process_each_lv, it cannot be checked against this
# command def, so a specific LV type in the first pos
# will not be checked.
# alternate form of lvconvert --snapshot
lvconvert --type snapshot LV LV_linear_striped
OO: --snapshot, --chunksize SizeKB, --zero Bool, OO_LVCONVERT
ID: lvconvert_combine_split_snapshot
DESC: Combine a former COW snapshot (second arg) with a former
DESC: origin LV (first arg) to reverse a splitsnapshot command.
RULE: all not lv_is_locked lv_is_pvmove
RULE: all and lv_is_visible
lvconvert --snapshot LV LV_linear_striped
OO: --chunksize SizeKB, --zero Bool, OO_LVCONVERT
ID: lvconvert_combine_split_snapshot
DESC: Combine a former COW snapshot (second arg) with a former
DESC: origin LV (first arg) to reverse a splitsnapshot command.
RULE: all not lv_is_locked lv_is_pvmove
RULE: all and lv_is_visible
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: snapshot
---
# lvconvert repair/replace utilities
# Create a new command set for these and migrate them out of lvconvert?
# FIXME: use specific option names to distinguish these two
# very different commands, e.g.
#
# lvconvert --repair-pvs LV_raid_mirror
# DESC: Replace failed PVs in a raid or mirror LV.
#
# lvconvert --repair-thinpool LV_thinpool
# DESC: Repair a thin pool.
#
# lvconvert --repair-cache LV_cache
# DESC: Repair a cache.
#
# lvconvert --repair-cachepool LV_cachepool
# DESC: Repair a cachepool.
#
# lvm may want to do different things, or allow different options
# depending on which operation is being run, but as it stands, it
# cannot do anything operation-specific until after the VG is read
# and the LV type is known.
lvconvert --repair LV_cache_cachepool_mirror_raid_thinpool
OO: --usepolicies, --interval Number, --setactivationskip Bool, --poolmetadataspare Bool, OO_LVCONVERT
OP: PV ...
ID: lvconvert_repair
DESC: Replace failed PVs in a raid or mirror LV.
DESC: Repair a thin pool.
DESC: Repair a cache pool.
RULE: all not lv_is_locked lv_is_pvmove
RULE: --poolmetadataspare and LV_cache LV_cachepool LV_thinpool
RULE: --setactivationskip and LV_cache LV_cachepool LV_thinpool
lvconvert --replace PV LV_raid
OO: OO_LVCONVERT
OP: PV ...
ID: lvconvert_replace_pv
DESC: Replace specific PV(s) in a raid LV with another PV.
RULE: all not lv_is_locked lv_is_pvmove
---
# This command just (re)starts the polling process on the LV
# to continue a previous conversion.
lvconvert --startpoll LV_mirror_raid
OO: OO_LVCONVERT
ID: lvconvert_start_poll
DESC: Poll LV to continue conversion.
RULE: all and lv_is_converting
# alternate form of lvconvert --startpoll, this is only kept
# for compat since this was how it used to be done.
lvconvert LV_mirror_raid
OO: OO_LVCONVERT
ID: lvconvert_plain
DESC: Poll LV to continue conversion (also see --startpoll)
DESC: or waits till conversion/mirror syncing is finished
FLAGS: SECONDARY_SYNTAX
---
lvconvert --raidintegrity Bool LV_raid
OO: --raidintegritymode String, --raidintegrityblocksize Number, --integritysettings String, OO_LVCONVERT
OP: PV ...
ID: lvconvert_integrity
DESC: Add or remove data integrity checksums to raid images.
---
# --extents is not specified; it's an automatic alternative for --size
OO_LVCREATE: --addtag Tag, --alloc Alloc, --autobackup Bool, --activate Active,
--contiguous Bool, --ignoreactivationskip, --ignoremonitoring, --major Number,
--metadataprofile String, --minor Number, --monitor Bool, --name String, --nosync,
--noudevsync, --permission Permission, --persistent Bool, --readahead Readahead,
--reportformat ReportFmt, --setactivationskip Bool, --wipesignatures Bool,
--zero Bool, --setautoactivation Bool
OO_LVCREATE_CACHE: --cachemode CacheMode, --cachepolicy String, --cachesettings String,
--chunksize SizeKB, --cachemetadataformat CacheMetadataFormat
OO_LVCREATE_POOL: --poolmetadatasize SizeMB, --poolmetadataspare Bool, --chunksize SizeKB
OO_LVCREATE_VDO: --compression Bool, --deduplication Bool, --vdosettings String
OO_LVCREATE_THINPOOL: --discards Discards, --errorwhenfull Bool, --pooldatavdo Bool, OO_LVCREATE_VDO, OO_LVCREATE_POOL
OO_LVCREATE_RAID: --regionsize RegionSize, --minrecoveryrate SizeKB, --maxrecoveryrate SizeKB,
--raidintegrity Bool, --raidintegritymode String, --raidintegrityblocksize Number, --integritysettings String
---
lvcreate --type error --size SizeMB VG
OO: OO_LVCREATE
ID: lvcreate_error_vol
DESC: Create an LV that returns errors when used.
FLAGS: SECONDARY_SYNTAX
---
lvcreate --type zero --size SizeMB VG
OO: OO_LVCREATE
ID: lvcreate_zero_vol
DESC: Create an LV that returns zeros when read.
FLAGS: SECONDARY_SYNTAX
---
lvcreate --type linear --size SizeMB VG
OO: OO_LVCREATE
OP: PV ...
IO: --mirrors 0, --stripes 1
ID: lvcreate_linear
DESC: Create a linear LV.
FLAGS: SECONDARY_SYNTAX
lvcreate --size SizeMB VG
OO: OO_LVCREATE
OP: PV ...
IO: --mirrors 0, --stripes 1
ID: lvcreate_linear
DESC: Create a linear LV.
AUTOTYPE: linear
---
# all lvcreate combinations of:
# a) --type striped
# b) --type mirror
# c) --type raid<N>
# d) --stripes
# e) --mirrors
#
# R1. a: striped with default stripes
# R2. a,d: striped with specified stripes
# R3. a,e: NA
# R4. a,d,e: NA
#
# R5. b: mirror with default mirrors
# R6. b,d: NA
# R7. b,e: mirror with specified mirrors
# R8. b,d,e: NA
#
# R9. c: raid<N> with default stripes/mirrors
# R10. c,d: raid<N> with specified stripes
# R11. c,e: raid<N> with specified mirrors
# R12. c,d,e: raid10 with specified stripes and mirrors
#
# R13. d: striped with specified stripes
# R14. e: mirror with specified mirrors
# R15. d,e: raid10 with specified mirrors
# R1,R2 (--type striped with or without --stripes)
lvcreate --type striped --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB, OO_LVCREATE
OP: PV ...
ID: lvcreate_striped
DESC: Create a striped LV (also see lvcreate --stripes).
FLAGS: SECONDARY_SYNTAX
# R13 (just --stripes)
lvcreate --stripes Number --size SizeMB VG
OO: --stripesize SizeKB, OO_LVCREATE
OP: PV ...
ID: lvcreate_striped
DESC: Create a striped LV.
AUTOTYPE: striped
# R5,R7 (--type mirror with or without --mirrors)
lvcreate --type mirror --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB,
--mirrors PNumber, --mirrorlog MirrorLog, --regionsize RegionSize, OO_LVCREATE
OP: PV ...
ID: lvcreate_mirror
DESC: Create a mirror LV (also see --type raid1).
FLAGS: SECONDARY_SYNTAX
# R14 (just --mirrors)
# alternate form of lvcreate --type raid1|mirror
lvcreate --mirrors PNumber --size SizeMB VG
OO: --stripesize SizeKB, --mirrorlog MirrorLog, OO_LVCREATE_RAID, OO_LVCREATE
OP: PV ...
IO: --stripes 1
ID: lvcreate_mirror_or_raid1
DESC: Create a raid1 or mirror LV.
AUTOTYPE: raid1
AUTOTYPE: mirror
# R9,R10,R11,R12 (--type raid with any use of --stripes/--mirrors)
lvcreate --type raid --size SizeMB VG
OO: --mirrors PNumber, --stripes Number, --stripesize SizeKB,
OO_LVCREATE_RAID, OO_LVCREATE
OP: PV ...
ID: lvcreate_raid_any
DESC: Create a raid LV (a specific raid level must be used, e.g. raid1).
# R15 (--stripes and --mirrors which implies raid10)
# FIXME: --mirrors N --stripes 1 is raid1|mirror and should only
# match the cmd def above for raid1|mirror with IO: --stripes 1
lvcreate --mirrors PNumber --stripes Number --size SizeMB VG
OO: --stripesize SizeKB, OO_LVCREATE_RAID, OO_LVCREATE
OP: PV ...
ID: lvcreate_raid_any
DESC: Create a raid10 LV.
AUTOTYPE: raid10
---
# The LV created by these commands actually has type linear or striped,
# not snapshot as specified by the command. If LVs never have type
# snapshot, perhaps "snapshot" should not be considered an LV type, but
# another new LV property?
# alternate form of lvcreate --snapshot
lvcreate --type snapshot --size SizeMB LV
OO: --snapshot, --stripes Number, --stripesize SizeKB,
--chunksize SizeKB, OO_LVCREATE
OP: PV ...
ID: lvcreate_cow_snapshot
DESC: Create a COW snapshot LV of an origin LV
DESC: (also see --snapshot).
FLAGS: SECONDARY_SYNTAX
lvcreate --snapshot --size SizeMB LV
OO: --stripes Number, --stripesize SizeKB,
--chunksize SizeKB, OO_LVCREATE
OP: PV ...
ID: lvcreate_cow_snapshot
DESC: Create a COW snapshot LV of an origin LV.
AUTOTYPE: snapshot
---
# alternate form of lvcreate --snapshot
lvcreate --type snapshot --size SizeMB --virtualsize SizeMB VG
OO: --snapshot, --chunksize SizeKB, OO_LVCREATE
OP: PV ...
ID: lvcreate_cow_snapshot_with_virtual_origin
DESC: Create a sparse COW snapshot LV of a virtual origin LV
DESC: (also see --snapshot).
FLAGS: SECONDARY_SYNTAX
---
lvcreate --type thin-pool --size SizeMB VG
OO: --thinpool LV_new, --stripes Number, --stripesize SizeKB,
--thin, OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thinpool
DESC: Create a thin pool.
# alternate form of lvcreate --type thin-pool
lvcreate --thin --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB, OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thinpool
DESC: Create a thin pool.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin-pool
# alternate form of lvcreate --type thin-pool
lvcreate --size SizeMB --thinpool LV_new VG
OO: --stripes Number, --stripesize SizeKB,
--thin, OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thinpool
DESC: Create a thin pool named in --thinpool.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin-pool
---
# NB. there are no alternate forms of these commands that
# use --cache in place of --type cache-pool, but --cache
# still needs to be listed as an optional addition to
# --type cache-pool.
lvcreate --type cache-pool --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB,
--cache, OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE
OP: PV ...
ID: lvcreate_cachepool
DESC: Create a cache pool.
# alternate form of lvcreate --type cache-pool
lvcreate --type cache-pool --size SizeMB --cachepool LV_new VG
OO: --stripes Number, --stripesize SizeKB,
--cache, OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE
OP: PV ...
ID: lvcreate_cachepool
DESC: Create a cache pool named by the --cachepool arg
DESC: (variant, uses --cachepool in place of --name).
FLAGS: SECONDARY_SYNTAX
---
lvcreate --type thin --virtualsize SizeMB --thinpool LV_thinpool VG
OO: --thin, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_vol
DESC: Create a thin LV in a thin pool.
FLAGS: SECONDARY_SYNTAX
# alternate form of lvcreate --type thin
lvcreate --type thin --virtualsize SizeMB LV_thinpool
OO: --thin, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_vol
DESC: Create a thin LV in a thin pool named in the first arg
DESC: (variant, also see --thinpool for naming pool).
FLAGS: SECONDARY_SYNTAX
# NB. this is the variant which can substitute
# --thin for --type thin, even though --thin is in OO.
# alternate form of lvcreate --type thin
lvcreate --virtualsize SizeMB --thinpool LV_thinpool VG
OO: --thin, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_vol
DESC: Create a thin LV in a thin pool.
AUTOTYPE: thin
# alternate form of lvcreate --type thin
lvcreate --virtualsize SizeMB LV_thinpool
OO: --thin, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_vol
DESC: Create a thin LV in the thin pool named in the first arg
DESC: (also see --thinpool for naming pool.)
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
---
lvcreate --type thin LV_thin
OO: --thin, --snapshot, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_snapshot
DESC: Create a thin LV that is a snapshot of an existing thin LV.
FLAGS: SECONDARY_SYNTAX
# alternate form of lvcreate --type thin
lvcreate --thin LV_thin
OO: --snapshot, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_snapshot
DESC: Create a thin LV that is a snapshot of an existing thin LV.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
# alternate form of lvcreate --type thin
lvcreate --snapshot LV_thin
# not providing implied --thin option with this OO
# so we have 2 different command variant
OO: OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_snapshot
DESC: Create a thin LV that is a snapshot of an existing thin LV.
AUTOTYPE: thin
lvcreate --type thin --thinpool LV_thinpool LV
OO: --thin, OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_snapshot_of_external
DESC: Create a thin LV that is a snapshot of an external origin LV.
# alternate form of lvcreate --type thin --thinpool LV_thinpool LV
lvcreate --snapshot --thinpool LV_thinpool LV
OO: OO_LVCREATE
IO: --mirrors 0
ID: lvcreate_thin_snapshot_of_external
DESC: Create a thin LV that is a snapshot of an external origin LV.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
---
lvcreate --type vdo --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB,
--vdo, --virtualsize SizeMB, --vdopool LV_new, OO_LVCREATE_VDO, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create a LV that returns VDO when used.
lvcreate --vdo --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB,
--virtualsize SizeMB, --vdopool LV_new, OO_LVCREATE_VDO, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create a VDO LV with VDO pool.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: vdo
lvcreate --vdopool LV_new --size SizeMB VG
OO: --stripes Number, --stripesize SizeKB,
--virtualsize SizeMB, OO_LVCREATE_VDO, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create a VDO LV with VDO pool.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: vdo
---
# stripes option is not intuitive when creating a thin LV,
# but here it applies to creating the new thin pool that
# is used for the thin LV
# FIXME: there are commands here that differ only in that
# one takes LV_new in arg pos 1, and the other takes a VG name
# in arg pos 1. The commands that take LV_new use that
# name as the new name of the pool, but the commands that
# take a VG automatically generate the LV name. The problem
# is that currently the command matching function cannot
# distinguish between an LV name and a VG name being used
# in arg pos 1, so a user-entered command would just match
# the first it finds and not necessarily the correct
# definition. Note that when LV_new is used in arg pos 1,
# it needs to include a VG name, i.e. VG/LV_new
lvcreate --type thin --virtualsize SizeMB --size SizeMB --thinpool LV_new VG
OO: --stripes Number, --stripesize SizeKB,
--thin, OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thin_vol_and_thinpool
DESC: Create a thin LV, first creating a thin pool for it,
DESC: where the new thin pool is named by the --thinpool arg.
FLAGS: SECONDARY_SYNTAX
# alternate form of lvcreate --type thin
lvcreate --virtualsize SizeMB --size SizeMB --thinpool LV_new VG
OO: --stripes Number, --stripesize SizeKB,
--thin, OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thin_vol_and_thinpool
DESC: Create a thin LV, first creating a thin pool for it,
DESC: where the new thin pool is named by --thinpool.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
# alternate form of lvcreate --type thin
lvcreate --type thin --virtualsize SizeMB --size SizeMB LV_new|VG
OO: --stripes Number, --stripesize SizeKB,
--thin, OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thin_vol_and_thinpool
DESC: Create a thin LV, first creating a thin pool for it,
DESC: where the new thin pool is named in the first arg,
DESC: or the new thin pool name is generated when the first
DESC: arg is a VG name.
FLAGS: SECONDARY_SYNTAX
# alternate form of lvcreate --type thin
lvcreate --thin --virtualsize SizeMB --size SizeMB LV_new|VG
OO: --stripes Number, --stripesize SizeKB,
OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thin_vol_and_thinpool
DESC: Create a thin LV, first creating a thin pool for it,
DESC: where the new thin pool is named in the first arg,
DESC: or the new thin pool name is generated when the first
DESC: arg is a VG name.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
---
lvcreate --size SizeMB --virtualsize SizeMB VG
OO: --stripes Number, --stripesize SizeKB, --snapshot, --thin,
OO_LVCREATE_THINPOOL, OO_LVCREATE
OP: PV ...
IO: --mirrors 0
ID: lvcreate_thin_vol_with_thinpool_or_sparse_snapshot
DESC: Create a thin LV, first creating a thin pool for it.
DESC: Create a sparse snapshot of a virtual origin LV
DESC: Chooses type thin or snapshot according to
DESC: config setting sparse_segtype_default.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: thin
AUTOTYPE: snapshot
---
# stripes option is not intuitive when creating a cache LV,
# but here it applies to creating the new origin that
# is used to create the cache LV
lvcreate --type cache --size SizeMB --cachepool LV_cachepool VG
OO: --stripes Number, --stripesize SizeKB,
--cache, OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE
OP: PV ...
ID: lvcreate_and_attach_cachepool
DESC: Create a new LV, then attach the specified cachepool
DESC: which converts the new LV to type cache.
# alternate form of lvcreate --type cache
# (omits the --type cache option which is inferred)
lvcreate --size SizeMB --cachepool LV_cachepool VG
OO: --stripes Number, --stripesize SizeKB,
--cache, OO_LVCREATE_CACHE, OO_LVCREATE
OP: PV ...
ID: lvcreate_and_attach_cachepool_v2
DESC: Create a new LV, then attach the specified cachepool
DESC: which converts the new LV to type cache.
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: cache
# alternate form of lvcreate --type cache
# (moves cachepool from option arg to position arg,
# dropping the normal VG position arg)
lvcreate --type cache --size SizeMB LV_cachepool
OO: --stripes Number, --stripesize SizeKB,
--cache, OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE
OP: PV ...
ID: lvcreate_and_attach_cachepool_v3
DESC: Create a new LV, then attach the specified cachepool
DESC: which converts the new LV to type cache.
DESC: (variant, also use --cachepool).
FLAGS: SECONDARY_SYNTAX
# This command has two different meanings which ought to
# have separate command defs, but since the syntax is the
# same for both they have to share one command def with
# an ambiguous meaning. Which command is performed depends
# on whether the LV in the first arg position is a
# cachepool or not (we can't have two different command
# defs that differ only in the type of LV in the arg position
# because when parsing commands we don't know the LV type.)
#
# 1. An alternate form of lvcreate_and_attach_cachepool_v3
# this syntax: lvcreate --cache --size SizeMB LV_cachepool
# is alternative for: lvcreate --type cache --size SizeMB LV_cachepool
#
# 2. An alternative to using lvconvert to convert LV to type cache,
# but in this case the cachepool is created internally and
# then attached to the LV arg.
#
# Note that stripes are accepted by the first and not by the
# second, but it's not possible to validate this until after
# the LV type is known.
lvcreate --cache --size SizeMB LV
OO: OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE,
--stripes Number, --stripesize SizeKB
OP: PV ...
ID: lvcreate_new_plus_old_cachepool_or_lvconvert_old_plus_new_cachepool
DESC: When the LV arg is a cachepool, then create a new LV and
DESC: attach the cachepool arg to it.
DESC: (variant, use --type cache and --cachepool.)
DESC: When the LV arg is not a cachepool, then create a new cachepool
DESC: and attach it to the LV arg (alternative, use lvconvert.)
FLAGS: SECONDARY_SYNTAX
AUTOTYPE: cache
---
# These all create a new origin LV, then forwards to lvconvert
# which combines it with a cachevol (which already exists or
# which needs to be created from cachedevice), converting
# the new LV to type cache or writecache.
lvcreate --type cache --size SizeMB --cachevol LV VG
OO: --stripes Number, --stripesize SizeKB, OO_LVCREATE_CACHE, OO_LVCREATE
OP: PV ...
ID: lvcreate_and_attach_cachevol_for_cache
DESC: Create a new LV, then attach the specified cachevol
DESC: which converts the new LV to type cache.
lvcreate --type cache --size SizeMB --cachedevice PV VG
OO: --stripes Number, --stripesize SizeKB,
--cachesize SizeMB, OO_LVCREATE_CACHE, OO_LVCREATE
OP: PV ...
ID: lvcreate_and_attach_cachedevice_for_cache
DESC: Create a new LV, then attach a cachevol created from
DESC: the specified cache device, which converts the
DESC: new LV to type cache.
lvcreate --type writecache --size SizeMB --cachevol LV VG
OO: OO_LVCREATE, --cachesettings String, --stripes Number, --stripesize SizeKB
OP: PV ...
ID: lvcreate_and_attach_cachevol_for_writecache
DESC: Create a new LV, then attach the specified cachevol
DESC: which converts the new LV to type writecache.
lvcreate --type writecache --size SizeMB --cachedevice PV VG
OO: OO_LVCREATE, --cachesize SizeMB, --cachesettings String, --stripes Number, --stripesize SizeKB
OP: PV ...
ID: lvcreate_and_attach_cachedevice_for_writecache
DESC: Create a new LV, then attach a cachevol created from
DESC: the specified cache device, which converts the
DESC: new LV to type writecache.
---
lvdisplay
OO: OO_REPORTING, --all, --history, --segments, --maps
OP: VG|LV|Tag ...
IO: --partial, --ignoreskippedcluster
ID: lvdisplay_general
lvdisplay --columns
OO: OO_REPORT, --history, --segments
OP: VG|LV|Tag ...
IO: --partial, --ignoreskippedcluster
RULE: --noheadings not --headings
ID: lvdisplay_columns
DESC: Display output in columns like lvs.
lvdisplay --colon
OO: OO_REPORTING, --all, --history, --segments
OP: VG|LV|Tag ...
IO: --partial, --ignoreskippedcluster
ID: lvdisplay_colon
DESC: Generate colon separated output.
---
# --type is an option in lvextend/lvresize only so that the specified type
# value can be checked to match the existing type; using it doesn't
# currently enable any different behavior.
# --extents is not specified; it's an automatic alternative for --size
lvextend --size PSizeMB LV
OO: --alloc Alloc, --autobackup Bool, --force, --mirrors Number,
--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs,
--stripes Number, --stripesize SizeKB, --poolmetadatasize PSizeMB,
--type SegType, --fs String, --fsmode String
OP: PV ...
ID: lvextend_size
DESC: Extend an LV by a specified size.
lvextend LV PV ...
OO: --alloc Alloc, --autobackup Bool, --force, --mirrors Number,
--nofsck, --nosync, --noudevsync,
--reportformat ReportFmt, --resizefs, --stripes Number, --stripesize SizeKB,
--type SegType, --fs String, --fsmode String
ID: lvextend_pv
DESC: Extend an LV by specified PV extents.
lvextend --poolmetadatasize PSizeMB LV_thinpool_linear
OO: --alloc Alloc, --autobackup Bool, --force, --mirrors Number,
--nofsck, --nosync, --noudevsync,
--reportformat ReportFmt, --stripes Number, --stripesize SizeKB,
--type SegType
OP: PV ...
ID: lvextend_pool_metadata
DESC: Extend a pool metadata SubLV by a specified size.
lvextend --usepolicies LV_snapshot_thinpool_vdopool
OO: --alloc Alloc, --autobackup Bool, --force, --mirrors Number,
--nofsck, --nosync, --noudevsync,
--reportformat ReportFmt, --resizefs,
--type SegType, --fs String, --fsmode String
OP: PV ...
ID: lvextend_policy
DESC: Extend an LV according to a predefined policy.
---
lvmconfig
OO: OO_CONFIG
OP: String ...
ID: lvmconfig_general
---
lvmdevices
ID: lvmdevices_list
DESC: Print devices in the devices file.
lvmdevices --check
ID: lvmdevices_check
OO: --refresh
DESC: Check the devices file and report incorrect values.
lvmdevices --update
OO: --delnotfound, --refresh
ID: lvmdevices_update
DESC: Update the devices file to fix incorrect values.
lvmdevices --adddev PV
OO: --deviceidtype String
ID: lvmdevices_edit
DESC: Add a device to the devices file.
lvmdevices --deldev PV|String
OO: --deviceidtype String
ID: lvmdevices_edit
DESC: Remove a device from the devices file.
lvmdevices --addpvid String
OO: --deviceidtype String
ID: lvmdevices_edit
DESC: Find the device with the given PVID and add it to the devices file.
lvmdevices --delpvid String
ID: lvmdevices_edit
DESC: Remove the devices file entry for the given PVID.
---
lvreduce --size NSizeMB LV
OO: --autobackup Bool, --force, --nofsck, --noudevsync,
--reportformat ReportFmt, --resizefs, --fs String, --fsmode String
ID: lvreduce_size
---
lvremove VG|LV|Tag|Select ...
OO: --autobackup Bool, --force, --nohistory, --noudevsync,
--reportformat ReportFmt, --select String
ID: lvremove_general
---
lvrename VG LV LV_new
OO: --autobackup Bool, --noudevsync, --reportformat ReportFmt
ID: lvrename_vg_lv_lv
lvrename LV LV_new
OO: --autobackup Bool, --noudevsync, --reportformat ReportFmt
ID: lvrename_lv_lv
---
# --type is an option in lvextend/lvresize only so that the specified type
# value can be checked to match the existing type; using it doesn't
# currently enable any different behavior.
lvresize --size SSizeMB LV
OO: --alloc Alloc, --autobackup Bool, --force,
--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs,
--stripes Number, --stripesize SizeKB, --poolmetadatasize PSizeMB,
--type SegType, --fs String, --fsmode String
OP: PV ...
ID: lvresize_size
DESC: Resize an LV by a specified size.
lvresize LV PV ...
OO: --alloc Alloc, --autobackup Bool, --force,
--nofsck, --nosync, --noudevsync,
--reportformat ReportFmt, --resizefs, --stripes Number, --stripesize SizeKB,
--type SegType, --fs String, --fsmode String
ID: lvresize_pv
DESC: Resize an LV by specified PV extents.
lvresize --poolmetadatasize PSizeMB LV_thinpool
OO: --alloc Alloc, --autobackup Bool, --force,
--nofsck, --nosync, --noudevsync,
--reportformat ReportFmt, --stripes Number, --stripesize SizeKB,
--type SegType
OP: PV ...
ID: lvresize_pool_metadata
DESC: Resize a pool metadata SubLV by a specified size.
---
lvs
OO: --history, --segments, OO_REPORT
OP: VG|LV|Tag ...
IO: --partial, --ignoreskippedcluster, --trustcache
ID: lvs_general
RULE: --noheadings not --headings
---
lvscan
OO: --all, --blockdevice, --ignorelockingfailure,
--readonly, --reportformat ReportFmt
IO: --partial, --cache_long
ID: lvscan_general
---
# None of these can function as a required option for pvchange.
OO_PVCHANGE: --autobackup Bool, --force, --reportformat ReportFmt, --uuid
# Any of these can function as a required option for pvchange.
OO_PVCHANGE_META: --allocatable Bool, --addtag Tag, --deltag Tag,
--uuid, --metadataignore Bool
pvchange --all OO_PVCHANGE_META
OO: OO_PVCHANGE
IO: --ignoreskippedcluster
ID: pvchange_properties_all
DESC: Change properties of all PVs.
pvchange OO_PVCHANGE_META PV|Select ...
OO: --select String, OO_PVCHANGE
IO: --ignoreskippedcluster
ID: pvchange_properties_some
DESC: Change properties of specified PVs.
---
pvresize PV ...
OO: --setphysicalvolumesize SizeMB, --reportformat ReportFmt
ID: pvresize_general
---
pvck PV ...
OO: --labelsector Number
ID: pvck_general
DESC: Check for metadata on a device
pvck --dump DumpType PV
OO: --settings String, --file String,
--pvmetadatacopies MetadataCopiesPV, --labelsector Number
ID: pvck_dump
DESC: Check and print LVM headers and metadata on a device
pvck --repairtype RepairType PV
OO: --settings String, --file String, --labelsector Number
ID: pvck_repair_type
DESC: Repair LVM headers or metadata on a device
pvck --repair --file String PV
OO: --settings String, --labelsector Number
ID: pvck_repair
DESC: Repair LVM headers and metadata on a device
---
# Use --uuidstr here which will be converted to uuidstr_ARG
# which is actually --uuid string on the command line.
pvcreate PV ...
OO: --dataalignment SizeKB, --dataalignmentoffset SizeKB, --bootloaderareasize SizeMB,
--force, --labelsector Number, --metadatatype MetadataType,
--pvmetadatacopies MetadataCopiesPV, --metadatasize SizeMB,
--metadataignore Bool, --norestorefile, --setphysicalvolumesize SizeMB,
--reportformat ReportFmt, --restorefile String, --uuidstr String, --zero Bool
ID: pvcreate_general
RULE: --norestorefile not --restorefile
RULE: --bootloaderareasize not --restorefile
---
pvdisplay
OO: OO_REPORTING, --maps, --segments, --short
OP: PV|Tag ...
IO: --partial, --ignoreskippedcluster
ID: pvdisplay_general
pvdisplay --columns
OO: OO_REPORT, --segments
OP: PV|Tag ...
IO: --partial, --ignoreskippedcluster
RULE: --noheadings not --headings
ID: pvdisplay_columns
DESC: Display output in columns like pvs.
pvdisplay --colon
OO: OO_REPORTING, --segments
OP: PV|Tag ...
IO: --partial, --ignoreskippedcluster
ID: pvdisplay_colon
DESC: Generate colon separated output.
---
pvmove PV
OO: --abort, --alloc Alloc, --atomic, --autobackup Bool, --background,
--interval Number, --name LV, --noudevsync, --reportformat ReportFmt
OP: PV ...
ID: pvmove_one
DESC: Move PV extents.
pvmove
OO: --abort, --background, --interval Number
ID: pvmove_any
DESC: Continue or abort existing pvmove operations.
---
pvremove PV ...
OO: --force, --reportformat ReportFmt
ID: pvremove_general
---
pvs
OO: --segments, --allpvs, OO_REPORT
OP: PV|Tag ...
IO: --partial, --ignoreskippedcluster, --trustcache
ID: pvs_general
RULE: --noheadings not --headings
---
pvscan
OO: --ignorelockingfailure, --reportformat ReportFmt, --exported, --novolumegroup,
--short, --uuid, --allpvs
ID: pvscan_display
DESC: Display PV information.
pvscan --cache_long
OO: --ignorelockingfailure, --reportformat ReportFmt,
--major Number, --minor Number, --noudevsync
OP: PV|String ...
IO: --background
ID: pvscan_cache
DESC: Record that a PV is online or offline.
pvscan --cache_long --activate ay
OO: --ignorelockingfailure, --reportformat ReportFmt,
--major Number, --minor Number, --noudevsync, --autoactivation String
OP: PV|String ...
IO: --background
ID: pvscan_cache
DESC: Record that a PV is online and autoactivate the VG if complete.
pvscan --cache_long --listvg PV
OO: --ignorelockingfailure, --checkcomplete, --vgonline, --udevoutput,
--autoactivation String
ID: pvscan_cache
DESC: Record that a PV is online and list the VG using the PV.
pvscan --cache_long --listlvs PV
OO: --ignorelockingfailure, --checkcomplete, --vgonline
ID: pvscan_cache
DESC: Record that a PV is online and list LVs using the PV.
pvscan --listlvs PV
ID: pvscan_cache
DESC: List LVs using the PV.
pvscan --listvg PV
ID: pvscan_cache
DESC: List the VG using the PV.
---
vgcfgbackup
OO: --file String, --foreign, --ignorelockingfailure, --readonly,
--reportformat ReportFmt
OP: VG ...
IO: --partial
ID: vgcfgbackup_general
---
OO_VGCFGRESTORE: --force_long, --metadatatype MetadataType
vgcfgrestore VG
OO: OO_VGCFGRESTORE
ID: vgcfgrestore_by_vg
DESC: Restore VG metadata from last backup.
vgcfgrestore --file String VG
OO: OO_VGCFGRESTORE
ID: vgcfgrestore_by_file
DESC: Restore VG metadata from specified file.
vgcfgrestore --list VG
OO: OO_VGCFGRESTORE
ID: vgcfgrestore_list_by_vg
DESC: List all VG metadata backups.
# FIXME: the optional VG pos arg is not used or checked and can be
# anything, but a test in the test suite uses it. Fix the test or
# verify that the positional VG is correct?
vgcfgrestore --list --file String
OO: OO_VGCFGRESTORE
OP: VG
ID: vgcfgrestore_list_by_file
DESC: List one VG metadata backup file.
---
# None of these can function as a required option for vgchange.
OO_VGCHANGE: --autobackup Bool, --ignoremonitoring,
--noudevsync, --reportformat ReportFmt, --select String, --force
# Any of these can function as a required option for vgchange.
# profile is also part of OO_ALL, but is repeated in OO_VGCHANGE_META
# because it can function as a required opt.
OO_VGCHANGE_META: --addtag Tag, --deltag Tag,
--logicalvolume Uint32, --maxphysicalvolumes Uint32, --alloc Alloc, --uuid,
--pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,
--physicalextentsize SizeMB, --resizeable Bool,
--profile String, --detachprofile, --metadataprofile String,
--setautoactivation Bool
vgchange OO_VGCHANGE_META
OO: --poll Bool, OO_VGCHANGE
OP: VG|Tag|Select ...
IO: --ignoreskippedcluster
ID: vgchange_properties
DESC: Change a general VG attribute.
DESC: For options listed in parentheses, any one is
DESC: required, after which the others are optional.
vgchange --monitor Bool
OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE
OP: VG|Tag|Select ...
IO: --ignoreskippedcluster
ID: vgchange_monitor
DESC: Start or stop monitoring LVs from dmeventd.
vgchange --poll Bool
OO: --ignorelockingfailure, OO_VGCHANGE
OP: VG|Tag|Select ...
IO: --ignoreskippedcluster
ID: vgchange_poll
DESC: Start or stop processing LV conversions.
vgchange --activate Active
OO: --activationmode ActivationMode, --ignoreactivationskip, --partial, --sysinit,
--readonly, --ignorelockingfailure, --monitor Bool, --poll Bool,
--autoactivation String, OO_VGCHANGE
OP: VG|Tag|Select ...
IO: --ignoreskippedcluster
ID: vgchange_activate
DESC: Activate or deactivate LVs.
vgchange --refresh
OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE
OP: VG|Tag|Select ...
IO: --ignoreskippedcluster
ID: vgchange_refresh
DESC: Reactivate LVs using the latest metadata.
vgchange --systemid String VG|Tag|Select
OO: --select String, --majoritypvs
ID: vgchange_systemid
DESC: Change the system ID of a VG.
vgchange --lockstart
OO: --select String
OP: VG|Tag|Select ...
ID: vgchange_lockstart
DESC: Start the lockspace of a shared VG in lvmlockd.
vgchange --lockstop
OO: --select String
OP: VG|Tag|Select ...
ID: vgchange_lockstop
DESC: Stop the lockspace of a shared VG in lvmlockd.
vgchange --locktype LockType VG
ID: vgchange_locktype
DESC: Change the lock type for a shared VG.
---
vgck
OO: --reportformat ReportFmt
OP: VG|Tag ...
ID: vgck_general
DESC: Read and display information about a VG.
vgck --updatemetadata VG
ID: vgck_update_metadata
DESC: Rewrite VG metadata to correct problems.
---
vgcreate VG_new PV ...
OO: --addtag Tag, --alloc Alloc, --autobackup Bool, --clustered Bool, --maxlogicalvolumes Uint32,
--maxphysicalvolumes Uint32, --metadataprofile String, --metadatatype MetadataType,
--physicalextentsize SizeMB, --force, --zero Bool, --labelsector Number,
--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,
--reportformat ReportFmt, --dataalignment SizeKB, --dataalignmentoffset SizeKB,
--shared, --systemid String, --locktype LockType, --setautoactivation Bool
ID: vgcreate_general
---
vgdisplay
OO: OO_REPORTING, --short, --activevolumegroups
OP: VG|Tag ...
IO: --partial, --ignoreskippedcluster
ID: vgdisplay_general
vgdisplay --columns
OO: OO_REPORT
OP: VG|Tag ...
IO: --partial, --ignoreskippedcluster
RULE: --noheadings not --headings
ID: vgdisplay_columns
DESC: Display output in columns like vgs.
vgdisplay --colon
OO: OO_REPORTING, --activevolumegroups
OP: VG|Tag ...
IO: --partial, --ignoreskippedcluster
ID: vgdisplay_colon
DESC: Generate colon separated output.
---
OO_VGEXPORT: --reportformat ReportFmt
vgexport VG|Tag|Select ...
OO: --select String, OO_VGEXPORT
ID: vgexport_some
DESC: Export specified VGs.
vgexport --all
OO: OO_VGEXPORT
ID: vgexport_all
DESC: Export all VGs.
---
vgextend VG PV ...
OO: --autobackup Bool,
--force, --zero Bool, --labelsector Number, --metadatatype MetadataType,
--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV,
--metadataignore Bool, --dataalignment SizeKB, --dataalignmentoffset SizeKB,
--reportformat ReportFmt, --restoremissing
ID: vgextend_general
---
OO_VGIMPORT: --force, --reportformat ReportFmt
vgimport VG|Tag|Select ...
OO: --select String, OO_VGIMPORT
ID: vgimport_some
DESC: Import specified VGs.
vgimport --all
OO: OO_VGIMPORT
ID: vgimport_all
DESC: Import all VGs.
---
vgimportclone PV ...
OO: --basevgname VG, --import, --importdevices
ID: vgimportclone_general
---
vgimportdevices VG|Tag|Select ...
OO: --select String, --foreign, --reportformat ReportFmt
ID: vgimportdevices_some
DESC: Add devices from specific VGs to the devices file.
vgimportdevices --all
OO: --foreign, --reportformat ReportFmt
ID: vgimportdevices_all
DESC: Add devices from all accessible VGs to the devices file.
vgimportdevices --rootvg
OO: --auto, --reportformat ReportFmt
ID: vgimportdevices_root
DESC: Add devices from root VG to the devices file.
---
vgmerge VG VG
OO: --autobackup Bool, --list, --poolmetadataspare Bool
ID: vgmerge_general
---
vgmknodes
OO: --ignorelockingfailure, --refresh, --reportformat ReportFmt
OP: VG|LV|Tag ...
ID: vgmknodes_general
---
OO_VGREDUCE: --autobackup Bool, --force, --reportformat ReportFmt
vgreduce VG PV ...
OO: OO_VGREDUCE
ID: vgreduce_by_pv
DESC: Remove a PV from a VG.
vgreduce --all VG
OO: OO_VGREDUCE
ID: vgreduce_all
DESC: Remove all unused PVs from a VG.
vgreduce --removemissing VG
OO: --mirrorsonly, OO_VGREDUCE
ID: vgreduce_missing
DESC: Remove all missing PVs from a VG.
---
vgremove VG|Tag|Select ...
OO: --force, --noudevsync, --reportformat ReportFmt, --select String
ID: vgremove_general
---
vgrename VG VG_new
OO: --autobackup Bool, --force, --reportformat ReportFmt
ID: vgrename_by_name
DESC: Rename a VG.
vgrename String VG_new
OO: --autobackup Bool, --force, --reportformat ReportFmt
ID: vgrename_by_uuid
DESC: Rename a VG by specifying the VG UUID.
---
vgs
OO: OO_REPORT
OP: VG|Tag ...
IO: --partial, --ignoreskippedcluster, --trustcache
ID: vgs_general
RULE: --noheadings not --headings
---
vgscan
OO: --ignorelockingfailure, --mknodes, --notifydbus, --refresh,
--reportformat ReportFmt
IO: --partial, --cache_long
ID: vgscan_general
---
OO_VGSPLIT: --autobackup Bool, --poolmetadataspare Bool
# used only when the destination VG is new
OO_VGSPLIT_NEW: --alloc Alloc,
--maxlogicalvolumes Uint32, --maxphysicalvolumes Uint32,
--metadatatype MetadataType, --vgmetadatacopies MetadataCopiesVG
vgsplit VG VG PV ...
OO: OO_VGSPLIT, OO_VGSPLIT_NEW
ID: vgsplit_by_pv
DESC: Split a VG by specified PVs.
vgsplit --name LV VG VG
OO: OO_VGSPLIT, OO_VGSPLIT_NEW
ID: vgsplit_by_lv
DESC: Split a VG by PVs in a specified LV.
---
# built-in and deprecated commands
# use lvmconfig
config
OO: OO_CONFIG
OP: String ...
ID: lvmconfig_general
# use lvmconfig
dumpconfig
OO: OO_CONFIG
OP: String ...
ID: lvmconfig_general
devtypes
OO: --aligned, --binary, --nameprefixes, --noheadings,
--nosuffix, --options String, --reportformat ReportFmt, --rows,
--select String, --separator String, --sort String, --unbuffered, --unquoted
ID: devtypes_general
fullreport
OO: OO_REPORT
OP: VG ...
IO: --partial, --ignoreskippedcluster, --trustcache
ID: fullreport_general
RULE: --noheadings not --headings
lastlog
OO: --reportformat ReportFmt, --select String
ID: lastlog_general
lvpoll --polloperation PollOp LV ...
OO: --abort, --autobackup Bool, --handlemissingpvs, --interval Number
ID: lvpoll_general
formats
ID: formats_general
help
OP: String ...
ID: help_general
version
ID: version_general
# deprecated
pvdata
ID: pvdata_general
segtypes
ID: segtypes_general
systemid
ID: systemid_general
tags
ID: tags_general
# deprecated
lvmchange
ID: lvmchange_general
# deprecated
lvmdiskscan
OO: --lvmpartition, --readonly
ID: lvmdiskscan_general
# deprecated
lvmsadc
ID: lvmsadc_general
# deprecated
lvmsar
OO: --full, --stdin
ID: lvmsar_general
# deprecated
vgconvert VG ...
OO: --force, --labelsector Number, --bootloaderareasize SizeMB,
--metadatatype MetadataType, --pvmetadatacopies MetadataCopiesPV,
--metadatasize SizeMB, --reportformat ReportFmt
ID: vgconvert_general
|