SlideShare a Scribd company logo
1 of 31
Download to read offline
Logical Volume Management




          Michal Sedlak
      michal6103@gmail.com
Common problems
●   Resize partition?
●   Use space on separated disks?
●   Use speed of multiple devices?
●   Write same data on more devices?
●   Backup used filesystem?




                                       2/29
LVM
●   Flexible capacity - multiple disks/partitions
●   Resizeable storage pools - extend/reduce
●   Online data relocation
●   Convenient device naming - names/tags
●   Disk striping
●   Mirroring volumes
●   Volume Snapshots


                                                    3/29
Concept




          4/29
PV
●   partition, disk, LUN
●   LVM label - 2nd sector
●   0, 1 or 2 copies of ASCII metadata
●   More PV on one disk?


# pvcreate /dev/sd[a-c]1




                                         5/29
VG
●   Pool of PVs
●   extent
    ●   fixed for whole VG
    ●   smallest allocable space
●   Size of logical extent = Size of physical extent
●   Map logical extents to physical extents

# vgcreate -s 4M vg_test /dev/sd[a-c]1


                                                       6/29
LV
●   Linear
●   Striped
●   Mirrored
●   Snapshot
●   Virtual




                    7/29
Linear
 ●   concatenate physical
     extents to logical
     volume
 ●   flexible space
     allocation

 ●   Example:
     ●   2x99 physical extents
     ●   198 logical extents
# lvcreate -L 50G -n lv_linear vg_test
# lvcreate -l 100%FREE -n lv_linear vg_test
                                              8/29
Striped
 ●   round robin
 ●   effective for large I/O




# lvcreate -L 50G -i 3 -I 128 -n lv_linear vg_test
                                                     9/29
Mirrored
    ●   Identical copies
    ●   Mirror log on another
        device or in memory
    ●   Mirror != backup
    ●   mirror_image_fault_p
        olicy
        ●   allocate
        ●   remove


                                10/29
Mirror creation
# lvcreate   -m1   -L   1G   -n lv_mirror vg_test
# lvcreate   -m1   -L   2T   -R 2 -n lv_mirror vg_test
# lvcreate   -m1   -L   1G   --mirrorlog core -n lv_mirror vg_test
# lvcreate   -m1   -L   1G   -n lv_mirror -alloc anywhere vg_test
# lvcreate   -m1   -L   1G   --mirrorlog mirrored -n lv_mirror vg_test
# lvcreate   -m1   -L   1G   -n lv_mirror vg_test /dev/sda1 /dev/sdb1
/dev/sdc1

# lvcreate -m1 -l 5 --mirrorlog mirrored -n lv_mirror vg_test             /
> /dev/sda1:0-4 /dev/sdb1:0-4 /dev/sda1:5 /dev/sdb1:5

# lvcreate -m1 -i2 --mirrorlog core -n lv_lvm vg_four




                                                                         11/29
Snapshot
●   stores only differences
●   origin and snapshot, both are RW
●   snapshot != backup
●   100% full is lost completely
●   Use
    ●   backup
    ●   fsck
    ●   test/rollback on production data “--merge”
    ●   virtual machines
lvcreate --size 100M --snapshot --name lv_snap /dev/vg0/lv0
                                                              12/29
Virtual
  ●   --virtualsize VirtualSize
  ●   sparse device




$ lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1



                                                                  13/29
Device mapper
●   linear
●   striped
●   mirror
●   snapshot and snapshot-origin
●   error
●   zero
●   multipath
●   crypt

                                   14/29
$ sudo dmsetup ls --tree
vg0-lv0 (253:5)
 ├─vg0-lv0_mimage_1 (253:2)
 │ ├─ (7:2)
 │ ├─ (7:1)
 │ └─ (7:0)
 ├─vg0-lv0_mimage_0 (253:1)
 │ ├─ (7:6)
 │ ├─ (7:5)
 │ └─ (7:4)
 └─vg0-lv0_mlog (253:0)
    └─ (7:3)


$ sudo dmsetup status
vg0-lv0_mlog: 0 8192 linear
vg0-lv0_mimage_1: 0 2850816 striped 3 7:0 7:1 7:2 1 AAA
vg0-lv0_mimage_0: 0 2850816 striped 3 7:4 7:5 7:6 1 AAA
vg0-lv0: 0 2850816 mirror 2 253:1 253:2 2784/2784 1 AA 3 disk 253:0 A




                                                                        15/29
$ sudo dmsetup info
Name:               vg0-lv0_mlog
State:              ACTIVE
Read Ahead:         256
Tables present:     LIVE
Open count:         1
Event number:       0
Major, minor:       253, 0
Number of targets: 1
UUID: LVM-ggZ5NqMTOZx43akuLZxxn03JdQGNta6gWlHnr0WT1Ua8Ek56ke6X9CdH8m3OVsAg
Name:              vg0-lv0_mimage_1
State:             ACTIVE
Read Ahead:        768
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 2
Number of targets: 1
UUID: LVM-ggZ5NqMTOZx43akuLZxxn03JdQGNta6gKIufDqbRgOaURN83IeA2AbYfH0zwTI0d
Name:              vg0-lv0_mimage_0
State:             ACTIVE
Read Ahead:        768
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      253, 1
Number of targets: 1
UUID: LVM-ggZ5NqMTOZx43akuLZxxn03JdQGNta6g23mlbEbEk5r5l9Hy6YgRxuu2hd4DFg0Q
Name:             vg0-lv0
State:            ACTIVE
Read Ahead:       256
Tables present:   LIVE
Open count:       1
Event number:     1                                                          16/29
Example: Striped Mirror




                          17/29
$ cd ~/tmp
$ for i in {0..6}; do dd if=/dev/zero of=lvm$i.img bs=1 count=0       /
seek=505M; done
$ ls -lh lvm*
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm0.img
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm1.img
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm2.img
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm3.img
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm4.img
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm5.img
-rw-rw-r-- 1 michal   michal   505M   2011-10-20   22:36   lvm6.img
$ for i in {0..6}; do sudo losetup /dev/loop$i lvm$i.img; done

$ sudo losetup -a
/dev/loop0: [0802]:1966260     (/home/michal/tmp/lvm0.img)
/dev/loop1: [0802]:1966347     (/home/michal/tmp/lvm1.img)
/dev/loop2: [0802]:1966350     (/home/michal/tmp/lvm2.img)
/dev/loop3: [0802]:1966351     (/home/michal/tmp/lvm3.img)
/dev/loop4: [0802]:1966354     (/home/michal/tmp/lvm4.img)
/dev/loop5: [0802]:1966355     (/home/michal/tmp/lvm5.img)
/dev/loop6: [0802]:1966356     (/home/michal/tmp/lvm6.img)

                                                                      18/29
$ sudo pvcreate /dev/loop[0-6]
  Physical volume "/dev/loop0"     successfully     created
  Physical volume "/dev/loop1"     successfully     created
  Physical volume "/dev/loop2"     successfully     created
  Physical volume "/dev/loop3"     successfully     created
  Physical volume "/dev/loop4"     successfully     created
  Physical volume "/dev/loop5"     successfully     created
  Physical volume "/dev/loop6"     successfully     created

$ sudo pvs
  PV         VG   Fmt    Attr   PSize     PFree
  /dev/loop0      lvm2   a-     500,00m   500,00m
  /dev/loop1      lvm2   a-     500,00m   500,00m
  /dev/loop2      lvm2   a-     500,00m   500,00m
  /dev/loop3      lvm2   a-     500,00m   500,00m
  /dev/loop4      lvm2   a-     500,00m   500,00m
  /dev/loop5      lvm2   a-     500,00m   500,00m
  /dev/loop6      lvm2   a-     500,00m   500,00m

$ sudo vgcreate vg0 /dev/loop[0-6]
  Volume group "vg0" successfully created

$ sudo vgs
  VG   #PV #LV #SN Attr   VSize VFree
  vg0    7   0   0 wz--n- 3,39g 3,39g
                                                              19/29
$ sudo vgdisplay
  --- Volume group ---
  VG Name                vg0
  System ID
  Format                 lvm2
  Metadata Areas         7
  Metadata Sequence No   22
  VG Access              read/write
  VG Status              resizable
  MAX LV                 0
  Cur LV                 0
  Open LV                0
  Max PV                 0
  Cur PV                 7
  Act PV                 7
  VG Size                3,39 GiB
  PE Size                4,00 MiB
  Total PE               868
  Alloc PE / Size        0 / 0
  Free PE / Size         868 / 3,39 GiB
  VG UUID                ggZ5Nq-MTOZ-x43a-kuLZ-xxn0-3JdQ-GNta6g

$ sudo lvcreate -i2 -m1 -L1200m -n lv0   vg0
  Using default stripesize 64,00 KiB
  Logical volume "lv0" created




                                                                  20/29
$ sudo lvs -a -o   +devices
  LV               VG   Attr    LSize Origin Snap% Move Log      Copy% Convert Devices
  lv0              vg0 mwi-a-   1,17g lv0_mlog 10,29 lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0]   vg0 Iwi-ao   1,17g                /dev/loop0(0),/dev/loop1(0)
  [lv0_mimage_0]   vg0 Iwi-ao   1,17g                /dev/loop2(0),/dev/loop3(0)
  [lv0_mimage_1]   vg0 Iwi-ao   1,17g                /dev/loop4(0),/dev/loop5(0)
  [lv0_mimage_1]   vg0 Iwi-ao   1,17g                /dev/loop2(26),/dev/loop3(27)
  [lv0_mlog]       vg0 lwi-ao   4,00m                /dev/loop3(26)

$ sudo mkfs.ext4 /dev/vg0/lv0

$ sudo lvconvert -m0 --stripes 3 vg0/lv0
  Logical volume lv0 converted.

$ sudo mount /dev/vg0/lv0 /mnt

$ sudo   lvs -a -o +devices
  LV     VG   Attr   LSize Origin Snap%   Move Log Copy%   Convert Devices
  lv0    vg0 -wi-a- 1,17g                                  /dev/loop0(0),/dev/loop1(0)
  lv0    vg0 -wi-a- 1,17g                                  /dev/loop2(0),/dev/loop3(0)


$ sudo lvconvert -m1 --stripes 3 vg0/lv0
  Using default stripesize 64,00 KiB
  vg0/lv0: Converted: 0,3%
  vg0/lv0: Converted: 4,7%
  .
  .
  vg0/lv0: Converted: 100%


                                                                                         21/29
$ sudo lvs -a -o   +devices
  LV               VG   Attr    LSize   Log      Devices
  lv0              vg0 mwi-a-   1,17g   lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0]   vg0 Iwi-ao   1,17g            /dev/loop0(0),/dev/loop1(0)
  [lv0_mimage_0]   vg0 Iwi-ao   1,17g            /dev/loop2(0),/dev/loop3(0)
  [lv0_mimage_1]   vg0 Iwi-ao   1,17g            /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  [lv0_mlog]       vg0 lwi-ao   4,00m            /dev/loop3(26)

$ sudo lvconvert --splitmirrors 1 --name lv_split vg0/lv0
  Logical volume lv0 converted.

$ sudo lvs   -a -o +devices
  LV         VG   Attr   LSize Origin Snap%    Move Log Copy% Convert Devices
  lv0        vg0 -wi-a- 1,17g                   /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  lv_split   vg0 -wi-a- 1,17g                   /dev/loop0(0),/dev/loop1(0)
  lv_split   vg0 -wi-a- 1,17g                   /dev/loop2(0),/dev/loop3(0)

$ sudo lvremove vg0/lv_split
Do you really want to remove active logical volume lv_split? [y/n]: y
  Logical volume "lv_split" successfully removed

$ sudo lvs -a -o +devices
  LV VG     Attr   LSize Origin Snap%      Move Devices
  lv0 vg0 -wi-a- 1,17g                          /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)

$ sudo lvconvert -m1 --stripes 3 vg0/lv0
  Using default stripesize 64,00 KiB




                                                                                       22/29
$ sudo lvs -a -o   +devices
  LV               VG   Attr    LSize Log        Devices
  lv0              vg0 mwi-a-   1,17g lv0_mlog   lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0]   vg0 Iwi-ao   1,17g            /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  [lv0_mimage_1]   vg0 Iwi-ao   1,17g            /dev/loop0(0),/dev/loop1(0),/dev/loop2(0)
  [lv0_mlog]       vg0 lwi-ao   4,00m            /dev/loop3(0)

$ fsck /dev/vg0/lv0
fsck from util-linux 2.19.1
e2fsck 1.41.14 (22-Dec-2010)
/dev/mapper/vg0-lv0 is mounted.
WARNING!!! The filesystem is mounted.                  If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.
Do you really want to continue (y/n)? no
check aborted.

$ sudo lvcreate --size 100M --snapshot --name lv_snap /dev/vg0/lv0
  Logical volume "lv_snap" created
$ sudo fsck /dev/vg0/lv_snap
fsck from util-linux 2.19.1
e2fsck 1.41.14 (22-Dec-2010)
/dev/mapper/vg0-lv_snap: clean, 12/76800 files, 13475/307200 blocks

                                                                                        23/29
$ sudo lvs -a -o   +devices
  LV               VG   Attr    LSize Log        Devices
  lv0              vg0 mwi-ao   1,36g lv0_mlog   lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0]   vg0 Iwi-ao   1,36g            /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  [lv0_mimage_1]   vg0 Iwi-ao   1,36g            /dev/loop0(0),/dev/loop1(0),/dev/loop2(0)
  [lv0_mlog]       vg0 lwi-ao   4,00m            /dev/loop3(0)

$ df -h /mnt
Súborový systém        Size   Used Avail Use% Pripojený na
/dev/mapper/vg0-lv0    1,2G    34M 1,1G    4% /mnt

$ sudo resize2fs /dev/vg0/lv0
resize2fs 1.41.14 (22-Dec-2010)
Filesystem at /dev/vg0/lv0 is mounted on /mnt; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/vg0/lv0 to 356352 (4k) blocks.
The filesystem on /dev/vg0/lv0 is now 356352 blocks long.

$ df -h /mnt
Súborový systém        Size   Used Avail Use% Pripojený na
/dev/mapper/vg0-lv0    1,4G    34M 1,3G    3% /mnt




                                                                                        24/29
$ sudo dd if=/dev/zero of=/dev/loop1 count=10
10+0 záznamov prečítaných
10+0 záznamov zapísaných
5120 skopírovaných bajtov (5,1 kB), 0,00188767 s, 2,7 MB/s
$ sudo lvs -a -o +devices
  Couldn't find device with uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J.
  LV             VG   Attr   LSize Log       Devices
  lv0            vg0 mwi-ao 1,36g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0] vg0 iwi-ao 1,36g            /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  [lv0_mimage_1] vg0 iwi-ao 1,36g        /dev/loop0(0),unknown device(0),/dev/loop2(0)
  [lv0_mlog]     vg0 lwi-ao 4,00m        /dev/loop3(0)

$ sudo vgreduce --removemissing vg0
  Couldn't find device with uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J.
  WARNING: Partial LV lv0 needs to be repaired or removed.
  WARNING: Partial LV lv0_mimage_1 needs to be repaired or removed.
  WARNING: There are still partial LVs in VG vg0.
  To remove them unconditionally use: vgreduce --removemissing --force.
  Proceeding to remove empty missing PVs.

$ sudo vgreduce --removemissing vg0 --force
  Couldn't find device with uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J.
  WARNING: Bad device removed from mirror volume, vg0/lv0
  WARNING: Mirror volume, vg0/lv0 converted to linear due to device failure.
  Wrote out consistent volume group vg0



                                                                                   25/29
Corrupted metadata
$ sudo lvs -a -o +devices
  LV   VG   Attr   LSize Devices
  lv0 vg0 -wi-ao 1,36g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)

$ sudo pvcreate --uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J /dev/loop1
  Physical volume "/dev/loop1" successfully created


$ sudo vgcfgrestore -f /etc/lvm/archive/vg0_00170.vg vg0
  Restored volume group vg0

$ sudo lvs -a -o   +devices
  LV               VG   Attr    LSize Log        Devices
  lv0              vg0 mwi-ao   1,27g lv0_mlog   lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0]   vg0 iwi---   1,27g            /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  [lv0_mimage_1]   vg0 iwi---   1,27g            /dev/loop0(0),/dev/loop1(0),/dev/loop2(0)
  [lv0_mlog]       vg0 lwi---   4,00m            /dev/loop3(0)




                                                                                        26/29
$ sudo lvs -a -o +devices
                                        New disk
  LV   VG   Attr   LSize Devices
  lv0 vg0 -wi-ao 1,36g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)

$ sudo pvcreate --restorefile /etc/lvm/archive/vg0_00170.vg --uuid "hmPWAT-kPoM-yHZ8-
Yh5M-m11G-yDjI-WLA28J"
  Physical volume "/dev/loop1" successfully created

$ sudo pvs
  PV           VG    Fmt    Attr   PSize     PFree
  /dev/loop0   vg0   lvm2   a-     496,00m   496,00m
  /dev/loop1         lvm2   a-     505,00m   505,00m
  /dev/loop2   vg0   lvm2   a-     496,00m   496,00m
  /dev/loop3   vg0   lvm2   a-     496,00m   496,00m
  /dev/loop4   vg0   lvm2   a-     496,00m    64,00m
  /dev/loop5   vg0   lvm2   a-     496,00m    64,00m
  /dev/loop6   vg0   lvm2   a-     496,00m    64,00m

$ sudo vgextend vg0 /dev/loop1
  Volume group "vg0" successfully extended

$ sudo lvconvert -m1 --stripes 3 vg0/lv0

$ sudo lvs -a -o     +devices
  LV                 VG   Attr      LSize Log          Devices
  lv0                vg0 mwi-ao     1,27g lv0_mlog     lv0_mimage_0(0),lv0_mimage_1(0)
  [lv0_mimage_0]     vg0 Iwi-ao     1,27g              /dev/loop4(0),/dev/loop5(0),/dev/loop6(0)
  [lv0_mimage_1]     vg0 Iwi-ao     1,27g              /dev/loop0(0),/dev/loop2(0),/dev/loop3(0)
  [lv0_mlog]         vg0 lwi-ao     4,00m              /dev/loop1(0)                           27/29
Caveats
●   Until Linux kernel 2.6.31[1], write barriers were
    not supported (fully supported in 2.6.33). This
    means that the guarantee against filesystem
    corruption offered by journaled file systems like
    ext3 and XFS was negated under some
    circumstances.[2]
●   Device mapper does not honor barriers
●   Barriers are disabled by default
●   mount -t ext3 -o barrier=1 <device> <mount
    point>

                                                        28/29
Thank you




 Questions




             29/29
Thank you




 Questions




             30/29
RHEL 6
●   mirror_image_fault_policy=allocate/remove
●   data_alignment_detection
●   udev integration
●   lvconvert --repair
●   lvconvert --merge
●   lvconvert --splitmirrors
●   lvcreate --mirrorlog mirrored
●   lvextend --alloc cling
●   multiple --addtag and --deltag

                                                31/29

More Related Content

What's hot

The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecturehugo lu
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelDivye Kapoor
 
Linux Administration
Linux AdministrationLinux Administration
Linux AdministrationHarish1983
 
Linux command ppt
Linux command pptLinux command ppt
Linux command pptkalyanineve
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modulesEddy Reyes
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in LinuxSAMUEL OJO
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in LinuxHenry Osborne
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scriptingvceder
 
Systemtap
SystemtapSystemtap
SystemtapFeng Yu
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless modeAkihiro Suda
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel CrashdumpMarian Marinov
 
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxOptimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxScyllaDB
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VRISC-V International
 

What's hot (20)

Lvm advanced topics
Lvm advanced topicsLvm advanced topics
Lvm advanced topics
 
The linux networking architecture
The linux networking architectureThe linux networking architecture
The linux networking architecture
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
ZFS
ZFSZFS
ZFS
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Firmware analysis 101
Firmware analysis 101Firmware analysis 101
Firmware analysis 101
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
User Administration in Linux
User Administration in LinuxUser Administration in Linux
User Administration in Linux
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scripting
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Systemtap
SystemtapSystemtap
Systemtap
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode
 
Linux Kernel Crashdump
Linux Kernel CrashdumpLinux Kernel Crashdump
Linux Kernel Crashdump
 
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxOptimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
 
Static partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-VStatic partitioning virtualization on RISC-V
Static partitioning virtualization on RISC-V
 

Viewers also liked

Red hat lvm cheatsheet
Red hat   lvm cheatsheetRed hat   lvm cheatsheet
Red hat lvm cheatsheetPrakash Ghosh
 
Linux: Zaklady Linuxu
Linux: Zaklady LinuxuLinux: Zaklady Linuxu
Linux: Zaklady LinuxuMichal Sedlak
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionMazenetsolution
 
Sito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito_Group
 
Linux: Desktop na kazdy den
Linux: Desktop na kazdy denLinux: Desktop na kazdy den
Linux: Desktop na kazdy denMichal Sedlak
 
Installing Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsInstalling Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsKevin OBrien
 
SQL Server vNext on Linux
SQL Server vNext on LinuxSQL Server vNext on Linux
SQL Server vNext on LinuxTravis Wright
 
7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partitionchinkshady
 
Using CloudStack With Clustered LVM
Using CloudStack With Clustered LVMUsing CloudStack With Clustered LVM
Using CloudStack With Clustered LVMMarcus L Sorensen
 
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan BaljevicHP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan BaljevicCircling Cycle
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Ahmed El-Arabawy
 
Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014Ian Colle
 
Colour vision with lvm
Colour vision with lvmColour vision with lvm
Colour vision with lvmsurendra74
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Ahmed El-Arabawy
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsAhmed El-Arabawy
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introductionMichal Sedlak
 

Viewers also liked (20)

Red hat lvm cheatsheet
Red hat   lvm cheatsheetRed hat   lvm cheatsheet
Red hat lvm cheatsheet
 
Twisted
TwistedTwisted
Twisted
 
Linux: Zaklady Linuxu
Linux: Zaklady LinuxuLinux: Zaklady Linuxu
Linux: Zaklady Linuxu
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet Solution
 
Sito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVMSito Maas-Workshop: Marko Forsblom, LVM
Sito Maas-Workshop: Marko Forsblom, LVM
 
Linux: Desktop na kazdy den
Linux: Desktop na kazdy denLinux: Desktop na kazdy den
Linux: Desktop na kazdy den
 
Installing Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsInstalling Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System Considerations
 
Lvm
LvmLvm
Lvm
 
SQL Server vNext on Linux
SQL Server vNext on LinuxSQL Server vNext on Linux
SQL Server vNext on Linux
 
Multipath
MultipathMultipath
Multipath
 
7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition
 
Using CloudStack With Clustered LVM
Using CloudStack With Clustered LVMUsing CloudStack With Clustered LVM
Using CloudStack With Clustered LVM
 
LVM
LVMLVM
LVM
 
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan BaljevicHP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
 
Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management Course 102: Lecture 22: Package Management
Course 102: Lecture 22: Package Management
 
Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014Ceph and OpenStack - Feb 2014
Ceph and OpenStack - Feb 2014
 
Colour vision with lvm
Colour vision with lvmColour vision with lvm
Colour vision with lvm
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
 
Course 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and PermissionsCourse 102: Lecture 14: Users and Permissions
Course 102: Lecture 14: Users and Permissions
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 

Similar to Linux: LVM

PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22Yuya Takei
 
A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
A little systemtap
A little systemtapA little systemtap
A little systemtapyang bingwu
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Praguetomasbart
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-BaljevicHow to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-BaljevicCircling Cycle
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptxssuserfcf43f
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Pierre-jean Texier
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by stepsudakarman
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingMarian Marinov
 
7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance 7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance AMD
 
Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Community
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardeningarchwisp
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2While42
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterDUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterAndrey Kudryavtsev
 
Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Keisuke Takahashi
 
Pentesting111111 Cheat Sheet_OSCP_2023.pdf
Pentesting111111 Cheat Sheet_OSCP_2023.pdfPentesting111111 Cheat Sheet_OSCP_2023.pdf
Pentesting111111 Cheat Sheet_OSCP_2023.pdffaker1842002
 

Similar to Linux: LVM (20)

lvm.pptx
lvm.pptxlvm.pptx
lvm.pptx
 
PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22PFIセミナー資料 H27.10.22
PFIセミナー資料 H27.10.22
 
A little systemtap
A little systemtapA little systemtap
A little systemtap
 
A little systemtap
A little systemtapA little systemtap
A little systemtap
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Putting some "logic" in LVM.
Putting some "logic" in LVM.Putting some "logic" in LVM.
Putting some "logic" in LVM.
 
glance replicator
glance replicatorglance replicator
glance replicator
 
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-BaljevicHow to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
 
hacking-embedded-devices.pptx
hacking-embedded-devices.pptxhacking-embedded-devices.pptx
hacking-embedded-devices.pptx
 
Backups
BackupsBackups
Backups
 
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
Diving into SWUpdate: adding new platform support in 30minutes with Yocto/OE !
 
Linux lv ms step by step
Linux lv ms step by stepLinux lv ms step by step
Linux lv ms step by step
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuilding
 
7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance 7nm "Navi" GPU - A GPU Built For Performance
7nm "Navi" GPU - A GPU Built For Performance
 
Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph Ceph Day Melbourne - Troubleshooting Ceph
Ceph Day Melbourne - Troubleshooting Ceph
 
Creating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server HardeningCreating "Secure" PHP applications, Part 2, Server Hardening
Creating "Secure" PHP applications, Part 2, Server Hardening
 
Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2Qemu - Raspberry | while42 Singapore #2
Qemu - Raspberry | while42 Singapore #2
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation CenterDUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
 
Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5
 
Pentesting111111 Cheat Sheet_OSCP_2023.pdf
Pentesting111111 Cheat Sheet_OSCP_2023.pdfPentesting111111 Cheat Sheet_OSCP_2023.pdf
Pentesting111111 Cheat Sheet_OSCP_2023.pdf
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 

Linux: LVM

  • 1. Logical Volume Management Michal Sedlak michal6103@gmail.com
  • 2. Common problems ● Resize partition? ● Use space on separated disks? ● Use speed of multiple devices? ● Write same data on more devices? ● Backup used filesystem? 2/29
  • 3. LVM ● Flexible capacity - multiple disks/partitions ● Resizeable storage pools - extend/reduce ● Online data relocation ● Convenient device naming - names/tags ● Disk striping ● Mirroring volumes ● Volume Snapshots 3/29
  • 4. Concept 4/29
  • 5. PV ● partition, disk, LUN ● LVM label - 2nd sector ● 0, 1 or 2 copies of ASCII metadata ● More PV on one disk? # pvcreate /dev/sd[a-c]1 5/29
  • 6. VG ● Pool of PVs ● extent ● fixed for whole VG ● smallest allocable space ● Size of logical extent = Size of physical extent ● Map logical extents to physical extents # vgcreate -s 4M vg_test /dev/sd[a-c]1 6/29
  • 7. LV ● Linear ● Striped ● Mirrored ● Snapshot ● Virtual 7/29
  • 8. Linear ● concatenate physical extents to logical volume ● flexible space allocation ● Example: ● 2x99 physical extents ● 198 logical extents # lvcreate -L 50G -n lv_linear vg_test # lvcreate -l 100%FREE -n lv_linear vg_test 8/29
  • 9. Striped ● round robin ● effective for large I/O # lvcreate -L 50G -i 3 -I 128 -n lv_linear vg_test 9/29
  • 10. Mirrored ● Identical copies ● Mirror log on another device or in memory ● Mirror != backup ● mirror_image_fault_p olicy ● allocate ● remove 10/29
  • 11. Mirror creation # lvcreate -m1 -L 1G -n lv_mirror vg_test # lvcreate -m1 -L 2T -R 2 -n lv_mirror vg_test # lvcreate -m1 -L 1G --mirrorlog core -n lv_mirror vg_test # lvcreate -m1 -L 1G -n lv_mirror -alloc anywhere vg_test # lvcreate -m1 -L 1G --mirrorlog mirrored -n lv_mirror vg_test # lvcreate -m1 -L 1G -n lv_mirror vg_test /dev/sda1 /dev/sdb1 /dev/sdc1 # lvcreate -m1 -l 5 --mirrorlog mirrored -n lv_mirror vg_test / > /dev/sda1:0-4 /dev/sdb1:0-4 /dev/sda1:5 /dev/sdb1:5 # lvcreate -m1 -i2 --mirrorlog core -n lv_lvm vg_four 11/29
  • 12. Snapshot ● stores only differences ● origin and snapshot, both are RW ● snapshot != backup ● 100% full is lost completely ● Use ● backup ● fsck ● test/rollback on production data “--merge” ● virtual machines lvcreate --size 100M --snapshot --name lv_snap /dev/vg0/lv0 12/29
  • 13. Virtual ● --virtualsize VirtualSize ● sparse device $ lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1 13/29
  • 14. Device mapper ● linear ● striped ● mirror ● snapshot and snapshot-origin ● error ● zero ● multipath ● crypt 14/29
  • 15. $ sudo dmsetup ls --tree vg0-lv0 (253:5) ├─vg0-lv0_mimage_1 (253:2) │ ├─ (7:2) │ ├─ (7:1) │ └─ (7:0) ├─vg0-lv0_mimage_0 (253:1) │ ├─ (7:6) │ ├─ (7:5) │ └─ (7:4) └─vg0-lv0_mlog (253:0) └─ (7:3) $ sudo dmsetup status vg0-lv0_mlog: 0 8192 linear vg0-lv0_mimage_1: 0 2850816 striped 3 7:0 7:1 7:2 1 AAA vg0-lv0_mimage_0: 0 2850816 striped 3 7:4 7:5 7:6 1 AAA vg0-lv0: 0 2850816 mirror 2 253:1 253:2 2784/2784 1 AA 3 disk 253:0 A 15/29
  • 16. $ sudo dmsetup info Name: vg0-lv0_mlog State: ACTIVE Read Ahead: 256 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 253, 0 Number of targets: 1 UUID: LVM-ggZ5NqMTOZx43akuLZxxn03JdQGNta6gWlHnr0WT1Ua8Ek56ke6X9CdH8m3OVsAg Name: vg0-lv0_mimage_1 State: ACTIVE Read Ahead: 768 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 253, 2 Number of targets: 1 UUID: LVM-ggZ5NqMTOZx43akuLZxxn03JdQGNta6gKIufDqbRgOaURN83IeA2AbYfH0zwTI0d Name: vg0-lv0_mimage_0 State: ACTIVE Read Ahead: 768 Tables present: LIVE Open count: 1 Event number: 0 Major, minor: 253, 1 Number of targets: 1 UUID: LVM-ggZ5NqMTOZx43akuLZxxn03JdQGNta6g23mlbEbEk5r5l9Hy6YgRxuu2hd4DFg0Q Name: vg0-lv0 State: ACTIVE Read Ahead: 256 Tables present: LIVE Open count: 1 Event number: 1 16/29
  • 18. $ cd ~/tmp $ for i in {0..6}; do dd if=/dev/zero of=lvm$i.img bs=1 count=0 / seek=505M; done $ ls -lh lvm* -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm0.img -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm1.img -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm2.img -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm3.img -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm4.img -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm5.img -rw-rw-r-- 1 michal michal 505M 2011-10-20 22:36 lvm6.img $ for i in {0..6}; do sudo losetup /dev/loop$i lvm$i.img; done $ sudo losetup -a /dev/loop0: [0802]:1966260 (/home/michal/tmp/lvm0.img) /dev/loop1: [0802]:1966347 (/home/michal/tmp/lvm1.img) /dev/loop2: [0802]:1966350 (/home/michal/tmp/lvm2.img) /dev/loop3: [0802]:1966351 (/home/michal/tmp/lvm3.img) /dev/loop4: [0802]:1966354 (/home/michal/tmp/lvm4.img) /dev/loop5: [0802]:1966355 (/home/michal/tmp/lvm5.img) /dev/loop6: [0802]:1966356 (/home/michal/tmp/lvm6.img) 18/29
  • 19. $ sudo pvcreate /dev/loop[0-6] Physical volume "/dev/loop0" successfully created Physical volume "/dev/loop1" successfully created Physical volume "/dev/loop2" successfully created Physical volume "/dev/loop3" successfully created Physical volume "/dev/loop4" successfully created Physical volume "/dev/loop5" successfully created Physical volume "/dev/loop6" successfully created $ sudo pvs PV VG Fmt Attr PSize PFree /dev/loop0 lvm2 a- 500,00m 500,00m /dev/loop1 lvm2 a- 500,00m 500,00m /dev/loop2 lvm2 a- 500,00m 500,00m /dev/loop3 lvm2 a- 500,00m 500,00m /dev/loop4 lvm2 a- 500,00m 500,00m /dev/loop5 lvm2 a- 500,00m 500,00m /dev/loop6 lvm2 a- 500,00m 500,00m $ sudo vgcreate vg0 /dev/loop[0-6] Volume group "vg0" successfully created $ sudo vgs VG #PV #LV #SN Attr VSize VFree vg0 7 0 0 wz--n- 3,39g 3,39g 19/29
  • 20. $ sudo vgdisplay --- Volume group --- VG Name vg0 System ID Format lvm2 Metadata Areas 7 Metadata Sequence No 22 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 7 Act PV 7 VG Size 3,39 GiB PE Size 4,00 MiB Total PE 868 Alloc PE / Size 0 / 0 Free PE / Size 868 / 3,39 GiB VG UUID ggZ5Nq-MTOZ-x43a-kuLZ-xxn0-3JdQ-GNta6g $ sudo lvcreate -i2 -m1 -L1200m -n lv0 vg0 Using default stripesize 64,00 KiB Logical volume "lv0" created 20/29
  • 21. $ sudo lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices lv0 vg0 mwi-a- 1,17g lv0_mlog 10,29 lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 Iwi-ao 1,17g /dev/loop0(0),/dev/loop1(0) [lv0_mimage_0] vg0 Iwi-ao 1,17g /dev/loop2(0),/dev/loop3(0) [lv0_mimage_1] vg0 Iwi-ao 1,17g /dev/loop4(0),/dev/loop5(0) [lv0_mimage_1] vg0 Iwi-ao 1,17g /dev/loop2(26),/dev/loop3(27) [lv0_mlog] vg0 lwi-ao 4,00m /dev/loop3(26) $ sudo mkfs.ext4 /dev/vg0/lv0 $ sudo lvconvert -m0 --stripes 3 vg0/lv0 Logical volume lv0 converted. $ sudo mount /dev/vg0/lv0 /mnt $ sudo lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices lv0 vg0 -wi-a- 1,17g /dev/loop0(0),/dev/loop1(0) lv0 vg0 -wi-a- 1,17g /dev/loop2(0),/dev/loop3(0) $ sudo lvconvert -m1 --stripes 3 vg0/lv0 Using default stripesize 64,00 KiB vg0/lv0: Converted: 0,3% vg0/lv0: Converted: 4,7% . . vg0/lv0: Converted: 100% 21/29
  • 22. $ sudo lvs -a -o +devices LV VG Attr LSize Log Devices lv0 vg0 mwi-a- 1,17g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 Iwi-ao 1,17g /dev/loop0(0),/dev/loop1(0) [lv0_mimage_0] vg0 Iwi-ao 1,17g /dev/loop2(0),/dev/loop3(0) [lv0_mimage_1] vg0 Iwi-ao 1,17g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) [lv0_mlog] vg0 lwi-ao 4,00m /dev/loop3(26) $ sudo lvconvert --splitmirrors 1 --name lv_split vg0/lv0 Logical volume lv0 converted. $ sudo lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Log Copy% Convert Devices lv0 vg0 -wi-a- 1,17g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) lv_split vg0 -wi-a- 1,17g /dev/loop0(0),/dev/loop1(0) lv_split vg0 -wi-a- 1,17g /dev/loop2(0),/dev/loop3(0) $ sudo lvremove vg0/lv_split Do you really want to remove active logical volume lv_split? [y/n]: y Logical volume "lv_split" successfully removed $ sudo lvs -a -o +devices LV VG Attr LSize Origin Snap% Move Devices lv0 vg0 -wi-a- 1,17g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) $ sudo lvconvert -m1 --stripes 3 vg0/lv0 Using default stripesize 64,00 KiB 22/29
  • 23. $ sudo lvs -a -o +devices LV VG Attr LSize Log Devices lv0 vg0 mwi-a- 1,17g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 Iwi-ao 1,17g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) [lv0_mimage_1] vg0 Iwi-ao 1,17g /dev/loop0(0),/dev/loop1(0),/dev/loop2(0) [lv0_mlog] vg0 lwi-ao 4,00m /dev/loop3(0) $ fsck /dev/vg0/lv0 fsck from util-linux 2.19.1 e2fsck 1.41.14 (22-Dec-2010) /dev/mapper/vg0-lv0 is mounted. WARNING!!! The filesystem is mounted. If you continue you ***WILL*** cause ***SEVERE*** filesystem damage. Do you really want to continue (y/n)? no check aborted. $ sudo lvcreate --size 100M --snapshot --name lv_snap /dev/vg0/lv0 Logical volume "lv_snap" created $ sudo fsck /dev/vg0/lv_snap fsck from util-linux 2.19.1 e2fsck 1.41.14 (22-Dec-2010) /dev/mapper/vg0-lv_snap: clean, 12/76800 files, 13475/307200 blocks 23/29
  • 24. $ sudo lvs -a -o +devices LV VG Attr LSize Log Devices lv0 vg0 mwi-ao 1,36g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 Iwi-ao 1,36g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) [lv0_mimage_1] vg0 Iwi-ao 1,36g /dev/loop0(0),/dev/loop1(0),/dev/loop2(0) [lv0_mlog] vg0 lwi-ao 4,00m /dev/loop3(0) $ df -h /mnt Súborový systém Size Used Avail Use% Pripojený na /dev/mapper/vg0-lv0 1,2G 34M 1,1G 4% /mnt $ sudo resize2fs /dev/vg0/lv0 resize2fs 1.41.14 (22-Dec-2010) Filesystem at /dev/vg0/lv0 is mounted on /mnt; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/vg0/lv0 to 356352 (4k) blocks. The filesystem on /dev/vg0/lv0 is now 356352 blocks long. $ df -h /mnt Súborový systém Size Used Avail Use% Pripojený na /dev/mapper/vg0-lv0 1,4G 34M 1,3G 3% /mnt 24/29
  • 25. $ sudo dd if=/dev/zero of=/dev/loop1 count=10 10+0 záznamov prečítaných 10+0 záznamov zapísaných 5120 skopírovaných bajtov (5,1 kB), 0,00188767 s, 2,7 MB/s $ sudo lvs -a -o +devices Couldn't find device with uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J. LV VG Attr LSize Log Devices lv0 vg0 mwi-ao 1,36g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 iwi-ao 1,36g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) [lv0_mimage_1] vg0 iwi-ao 1,36g /dev/loop0(0),unknown device(0),/dev/loop2(0) [lv0_mlog] vg0 lwi-ao 4,00m /dev/loop3(0) $ sudo vgreduce --removemissing vg0 Couldn't find device with uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J. WARNING: Partial LV lv0 needs to be repaired or removed. WARNING: Partial LV lv0_mimage_1 needs to be repaired or removed. WARNING: There are still partial LVs in VG vg0. To remove them unconditionally use: vgreduce --removemissing --force. Proceeding to remove empty missing PVs. $ sudo vgreduce --removemissing vg0 --force Couldn't find device with uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J. WARNING: Bad device removed from mirror volume, vg0/lv0 WARNING: Mirror volume, vg0/lv0 converted to linear due to device failure. Wrote out consistent volume group vg0 25/29
  • 26. Corrupted metadata $ sudo lvs -a -o +devices LV VG Attr LSize Devices lv0 vg0 -wi-ao 1,36g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) $ sudo pvcreate --uuid hmPWAT-kPoM-yHZ8-Yh5M-m11G-yDjI-WLA28J /dev/loop1 Physical volume "/dev/loop1" successfully created $ sudo vgcfgrestore -f /etc/lvm/archive/vg0_00170.vg vg0 Restored volume group vg0 $ sudo lvs -a -o +devices LV VG Attr LSize Log Devices lv0 vg0 mwi-ao 1,27g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 iwi--- 1,27g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) [lv0_mimage_1] vg0 iwi--- 1,27g /dev/loop0(0),/dev/loop1(0),/dev/loop2(0) [lv0_mlog] vg0 lwi--- 4,00m /dev/loop3(0) 26/29
  • 27. $ sudo lvs -a -o +devices New disk LV VG Attr LSize Devices lv0 vg0 -wi-ao 1,36g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) $ sudo pvcreate --restorefile /etc/lvm/archive/vg0_00170.vg --uuid "hmPWAT-kPoM-yHZ8- Yh5M-m11G-yDjI-WLA28J" Physical volume "/dev/loop1" successfully created $ sudo pvs PV VG Fmt Attr PSize PFree /dev/loop0 vg0 lvm2 a- 496,00m 496,00m /dev/loop1 lvm2 a- 505,00m 505,00m /dev/loop2 vg0 lvm2 a- 496,00m 496,00m /dev/loop3 vg0 lvm2 a- 496,00m 496,00m /dev/loop4 vg0 lvm2 a- 496,00m 64,00m /dev/loop5 vg0 lvm2 a- 496,00m 64,00m /dev/loop6 vg0 lvm2 a- 496,00m 64,00m $ sudo vgextend vg0 /dev/loop1 Volume group "vg0" successfully extended $ sudo lvconvert -m1 --stripes 3 vg0/lv0 $ sudo lvs -a -o +devices LV VG Attr LSize Log Devices lv0 vg0 mwi-ao 1,27g lv0_mlog lv0_mimage_0(0),lv0_mimage_1(0) [lv0_mimage_0] vg0 Iwi-ao 1,27g /dev/loop4(0),/dev/loop5(0),/dev/loop6(0) [lv0_mimage_1] vg0 Iwi-ao 1,27g /dev/loop0(0),/dev/loop2(0),/dev/loop3(0) [lv0_mlog] vg0 lwi-ao 4,00m /dev/loop1(0) 27/29
  • 28. Caveats ● Until Linux kernel 2.6.31[1], write barriers were not supported (fully supported in 2.6.33). This means that the guarantee against filesystem corruption offered by journaled file systems like ext3 and XFS was negated under some circumstances.[2] ● Device mapper does not honor barriers ● Barriers are disabled by default ● mount -t ext3 -o barrier=1 <device> <mount point> 28/29
  • 31. RHEL 6 ● mirror_image_fault_policy=allocate/remove ● data_alignment_detection ● udev integration ● lvconvert --repair ● lvconvert --merge ● lvconvert --splitmirrors ● lvcreate --mirrorlog mirrored ● lvextend --alloc cling ● multiple --addtag and --deltag 31/29