CCI Private Cloud - Managing filesystems on a Linux VM

Portal - Login Information


The default CCI Virtualization Linux VM has 40 GB of virtual disk space. While it is configured to use Logical Volume Management (LVM) and xfs filesystems, ~28 GB of virtual disk is not allocated to any filesystem.

Instructions for managing LVM, including adding space to an existing filesystem can be found below:

Below is an example of how to grow /home from 2 GB to 5 GB in size:
   
1. View mounted filesystems and their sizes:
 
[root@CCI-00001 ~]# df -hT
Filesystem                         Type      Size  Used Avail Use% Mounted on
/dev/mapper/Volume00-root          xfs       4.9G  1.1G  3.9G  21% /
devtmpfs                           devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs                              tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs                              tmpfs     1.9G  8.5M  1.9G   1% /run
tmpfs                              tmpfs     1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/Volume00-var           xfs       2.0G  134M  1.9G   7% /var
/dev/mapper/Volume00-home          xfs       2.0G   33M  2.0G   2% /home
/dev/mapper/Volume00-tmp           xfs       997M   33M  965M   4% /tmp
/dev/sda1                          xfs       497M  150M  347M  31% /boot
/dev/mapper/Volume00-var_log       xfs       997M   33M  964M   4% /var/log
/dev/mapper/Volume00-var_log_audit xfs       997M   33M  965M   4% /var/log/audit
 
2. View unallocated virtual disk:
 
[root@CCI-00001 ~]# /sbin/vgdisplay 
  --- Volume group ---
  VG Name               Volume00
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  30
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                6
  Open LV               6
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               39.50 GiB
  PE Size               4.00 MiB
  Total PE              10113
  Alloc PE / Size       3000 / 11.72 GiB
  Free  PE / Size       7113 / 27.79 GiB
  VG UUID               Sn0ned-Ktau-vnBL-trz7-ILiD-DOuQ-Ff0h4f
   
3. View the size of /home:
 
[root@CCI-00001 ~]# df -h /home
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/Volume00-home  2.0G   33M  2.0G   2% /home
   
4. Add 3 GB of space to /dev/mapper/Volume00-home, the logical volume on which /home resides:
 
[root@CCI-00001 ~]# /sbin/lvextend --size +3G -r /dev/mapper/Volume00-home
 
Size of logical volume Volume00/home changed from 1.95 GiB (500 extents) to 4.95 GiB (1268 extents).
  Logical volume home successfully resized
  meta-data=/dev/mapper/Volume00-home isize=256    agcount=4, agsize=128000 blks         =                       sectsz=512   attr=2, projid32bit=1         =                       crc=0        finobt=0data     =                       bsize=4096   blocks=512000, imaxpct=25         =                       sunit=0      swidth=0 blksnaming   =version 2              bsize=4096   ascii-ci=0 ftype=0log      =internal               bsize=4096   blocks=2560, version=2         =                       sectsz=512   sunit=0 blks, lazy-count=1realtime =none                   extsz=4096   blocks=0, rtextents=0data blocks changed from 512000 to 1298432
   
5. Verify that /home has grown by 3 GB (from 2 GB to 5 GB):
 
[root@CCI-00001 ~]# df -h /home
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/Volume00-home  5.0G   33M  5.0G   1% /home


Incident Reporting & Technical Support

CCI Private Cloud Incident Reporting

  • Customers should contact the DoIT Help Desk to report an incident or check the outages page for an CCI Private Cloud incident.
  • Formal support is provided for CCI Private Cloud during business hours only. After-hours support is best effort.

CCI Private Cloud Technical Support

  • Customers should contact the DoIT Help Desk or email cci-virtualization@wisc.edu with support requests.
  • CCI Private Cloud technologists will respond to all support requests by the end of the following business day.

 



Keywords:
cci, cciv, cloud, private, virtualization, centos xfs lvm logical volume management filesystem disk allocated fs, linux, ubuntu 
Doc ID:
57797
Owned by:
Drew D. in CCI Private Cloud
Created:
2015-10-27
Updated:
2024-09-03
Sites:
Campus Cloud Infrastructure (CCI) - Private Cloud