Tuesday, July 21, 2015

More VM Partition Fun

Docker images live in /var/lib/docker, so it's a good idea to set up a large /var if you're going to run docker. Otherwise, you get a large /home by default on some installs (like RHEL7).

A text-based install doesn't allow you to customize your partitions,, but a GUI install is a PITA to do on a VM in a lab on a slow private network that you're VPN'ing into, so just take the std LVM setup and then change it after installing:

- resize (shrink):

   --- Logical volume ---
  LV Path                /dev/rhel-l/home
  LV Name                home
  VG Name                rhel-l
  LV UUID                tXagVh-QH6i-smrg-Vt7h-y0cX-IenE-oitcIx
  LV Write Access        read/write
  LV Creation host, time localhost.localdomain, 2015-07-20 15:13:46 -0500
  Current LE             39793
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2

# lvresize /dev/rhel-l/home -L 55G

==
- make var:

lvcreate -a -n var -L 100G rhel-l

  --- Logical volume ---
  LV Path                /dev/rhel-l/var
  LV Name                var
  VG Name                rhel-l
  LV UUID                57vY5M-3Mq6-0z70-WlWI-wcjd-BJpU-UTeP8v
  LV Write Access        read/write
  LV Creation host, time rhel7-1-ci-ppc64, 2015-07-20 15:31:02 -0500
  LV Status              available
  # open                 0
  LV Size                100.00 GiB
  Current LE             25600
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:3

==

- mkfs -t xfs (since RHEL 7) on both /dev/mapper/ ... var and ... home
- update /etc/fstab (add line for /var)
- mount -a   

==

No comments:

Post a Comment