-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclvm.tex
More file actions
156 lines (118 loc) · 3.71 KB
/
clvm.tex
File metadata and controls
156 lines (118 loc) · 3.71 KB
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
\documentclass{beamer}
\mode<presentation>
{
\usetheme{Warsaw}
\setbeamercovered{transparent}
}
\usepackage[slovak]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tgpagella}
\usepackage{cmap}
\usepackage{graphicx}
\title[CLVM]
{Clustered Logical Volume Manager}
\author[Bezdička L.]
{Lukáš Bezdička}
\institute[FI MUNI]
{ Fakulta informatiky\\
Masarykova univerzita}
\date[2011]
{PV208}
\subject{FI MUNI PV208}
\pgfdeclareimage[height=0.5cm]{university-logo}{fi-logo}
\logo{\pgfuseimage{university-logo}}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}
\frametitle{Obsah}
\tableofcontents
\end{frame}
\section{LVM}
\subsection{Prečo LVM}
\begin{frame}
\frametitle{Výhody LVM}
\begin{itemize}
\item Abstrakcia nad HW.
\item Volume management na vytváranie logických diskov.
\item Logické disky nie sú späté s vlastnosťami fyzických diskov.
\item Presúvanie dát medzi fyzickými diskami za behu, kopírovanie dát na viaceré disky (mirroring), snapshoty a ďalšie.
\end{itemize}
\end{frame}
\subsection{Architektúra LVM}
\begin{frame}
\frametitle{Architektúra LVM}
Physical volume > Volume group > Logical volume
\end{frame}
\begin{frame}
PVG (Physical Volume Group) > PV (Physical Volume) > PE - physical extents (časti diskov)
\end{frame}
\begin{frame}
VG (Volume Group) > LV (Logical Volume) > LE - logical extents
\end{frame}
\begin{frame}
Logické časti LE sa mapujú na PE v pomere 1 : 1..N.
\end{frame}
\subsection{Ako?}
\begin{frame}
\frametitle{Label}
Label pozostáva z:
\begin{itemize}
\item názov
\item uuid
\item veľkosť v bitoch
\item lokácia metadát
\end{itemize}
Zvyk druhý 512-byte sektor, ale môže byť na ktoromkoľvek z prvých 4-och sektorov.
\end{frame}
\begin{frame}
\frametitle{Metadata}
Metadáta - ASCII dáta o konfigurácii, ktoré sa udržujú rovnaké na každej PV pre každú VG v priestore pre metadáta.
Štandardne existuje viacero kópií metadát, pri veľa fyzickych diskoch vo VG sú zálohy neefektívne => \texttt{pvcreate --metadatacopies 0}.
Ako sa dostať k metadátam:
\texttt{strings /dev/disk | grep "\# Generated by LVM" -A 2048 > output.txt}
\end{frame}
\subsection{Is there a Problem Officer?}
\begin{frame}
\frametitle{Cluster}
\includegraphics[width=2cm]{problem.png}
Cluster, kde dochádza k používaniu disku naraz viacerými strojmi.
Ak pristupuje vždy len jeden stroj a ide o HA Cluster > HaLVM.
\end{frame}
\section{CLVM}
\subsection{Clustered Logical Volume Manager}
\begin{frame}
\frametitle{Clustered Logical Volume Manager}
Rozšírenie LVM --- pridáva uzamykanie PE počas prístupu na logický disk atď.
\note{atď - clustered locking system}
\end{frame}
\subsection{Ako na to?}
\begin{frame}
\frametitle{Ako na to?}
\begin{itemize}
\item Bežiaci cluster.
\item Spustiť \textbf{clvmd} - \texttt{chkconfig clvmd on;...}
\item Zaistit všetkým nódam prístup k PV.
\item Inak je práca s LVM skoro rovnaká ako bez clustera.
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Nutná zmena uzamykania lvm.}
\texttt{/sbin/lvmconf --enable-cluster}
alebo úpravou \texttt{/etc/lvm/lvm.conf} zmeniť zamykanie.
\texttt{locking = 3} pre zabudovanú podporu clustrového zamykania.
\end{frame}
\begin{frame}
\texttt{\#cman\_tool services} na kontrolu, či nám beží \textbf{clvmd}.
\texttt{DLM (Distributed Lock Manager) lockspaces - clvmd}
\end{frame}
\begin{frame}
\frametitle{Mirroring}
\textbf{cmirrord} pokiaľ chceme mirroring!
Potom uz len PVs > VGs > \texttt{lvcreate ... -m1 ...}
\texttt{-m1} mirroruje na jeden disk \texttt{-m2} na dva.
\end{frame}
\end{document}
%Particie > typy. Zistit efigpt > udev (fdisk =[ parted]).