/var/lib/docker を LVM領域としてマウント



```
[root@DockerHost user]# fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/xvda: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         4096     16777182      8G  Linux filesyste Linux
128         2048         4095      1M  BIOS boot parti BIOS Boot Partition

Disk /dev/xvdf: 214.7 GB, 214748364800 bytes, 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xb60804db

    Device Boot      Start         End      Blocks   Id  System
/dev/xvdf1            2048   419430399   209714176   8e  Linux LVM
[root@DockerHost user]# 
[root@DockerHost user]#
[root@DockerHost user]# pvcreate /dev/xvdf1
  Physical volume "/dev/xvdf1" successfully created
[root@DockerHost user]# pvs
  PV         VG   Fmt  Attr PSize   PFree
  /dev/sdf1       lvm2 a--  200.00g 200.00g
[root@DockerHost user]# vgcreate docker /dev/sdf1
  Volume group "docker" successfully created
[root@DockerHost user]# 
[root@DockerHost user]# 
[root@DockerHost user]# vgdisplay
  --- Volume group ---
  VG Name               docker  
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               200.00 GiB
  PE Size               4.00 MiB
  Total PE              51199   
  Alloc PE / Size       0 / 0   
  Free  PE / Size       51199 / 200.00 GiB
  VG UUID               rHTaXe-rYi2-TTDU-CM3S-LiYp-LId2-wcfl7x

[root@DockerHost user]# echo 4 * 51199 | bc
204796
[root@DockerHost user]# lvcreate -L 204796M -n lv01 /dev/docker
  Logical volume "lv01" created 
[root@DockerHost user]# lvscan
  ACTIVE            '/dev/docker/lv01' [200.00 GiB] inherit
[root@DockerHost user]#
[root@DockerHost user]# mkfs.ext4 /dev/docker/lv01
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
13107200 inodes, 52427776 blocks
2621388 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2199912448
1600 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done   
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

[root@DockerHost user]# 
[root@DockerHost user]# mkdir /var/lib/docker
[root@DockerHost user]# mount /dev/docker/lv01 /var/lib/docker
[root@DockerHost user]# tail -1 /etc/fstab 
/dev/docker/lv01 /var/lib/docker ext4 defaults 0 0
[root@DockerHost user]#