% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
  \usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
  \usepackage{unicode-math} % this also loads fontspec
  \defaultfontfeatures{Scale=MatchLowercase}
  \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
  % xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
  \usepackage[]{microtype}
  \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
  \usepackage{selnolig}  % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}
\hypersetup{
  pdftitle={lvm-story},
  hidelinks,
  pdfcreator={LaTeX via pandoc}}

\title{lvm-story}
\author{}
\date{}

\begin{document}
\maketitle

\hypertarget{lvm-story}{%
\section{lvm-story}\label{lvm-story}}

once upon a time we randomly needed to add two new separate lvm logical
volumes to a server

\begin{enumerate}
\item
  verify which devices we will work with

  .. code-block:: bash

  sudo disk -l

  We need to create physical volumes on both of these buggers:

  \begin{itemize}
  \tightlist
  \item
    /dev/sdb
  \item
    /dev/sdc
  \end{itemize}
\item
  create a physical volume on the 20G and 400G LUNs

  .. code-block:: bash

  sudo lvm pvcreate /dev/sdb sudo lvm pvcreate /dev/sdc
\item
  create a volume group on the 20G and 400G physical volumes

  .. code-block:: bash

  sudo lvm vgcreate vg1 /dev/sdb sudo lvm vgcreate vg2 /dev/sdc
\item
  create a logical volume on the new volume groups

  .. code-block:: bash

  sudo lvm lvcreate vg1 -l 100\%VG --name app sudo lvm lvcreate vg2 -l
  100\%VG --name data
\item
  format each logical volume with ext4 filesystem

  .. code-block:: bash

  sudo mkfs --type=ext4 /dev/mapper/vg1-app sudo mkfs --type=ext4
  /dev/mapper/vg2-data
\item
  create mount points

  .. code-block:: bash

  sudo mkdir /app sudo mkdir /data
\item
  configure mount points in /etc/fstab

  .. code-block:: bash

  /dev/mapper/vg1-app /app ext4 errors=remount-ro 0 1
  /dev/mapper/vg2-data /data ext4 errors=remount-ro 0 1
\item
  verify fstab

  .. code-block:: bash

  sudo mount -a
\item
  verify new filesystems

  .. code-block:: bash

  df -hal
\end{enumerate}

\end{document}
