Difference between revisions of "HowTo Resize The "root" File System Using LVM"

From NST Wiki
Jump to navigationJump to search
(Demonstration)
(Demonstration)
Line 33: Line 33:
 
= Demonstration =
 
= Demonstration =
 
We will now show a sequence of commands to accomplish resizing the '''root''' file system by '''2GB'''. Our NST system is a Virtual Machine (VM) running under the '''[https://www.vmware.com/products/fusion VMware Fusion]''' Hypervisor. Behind the scenes we created a new virtual disk of size '''2GB'''. On a physical system we could of used a whole disk or a disk partition for this demonstration.
 
We will now show a sequence of commands to accomplish resizing the '''root''' file system by '''2GB'''. Our NST system is a Virtual Machine (VM) running under the '''[https://www.vmware.com/products/fusion VMware Fusion]''' Hypervisor. Behind the scenes we created a new virtual disk of size '''2GB'''. On a physical system we could of used a whole disk or a disk partition for this demonstration.
 +
 +
The '''root''' file system size is currently '''17.50GB'''. Our goal is to increase the '''root''' file system to a total of '''19.50GB'''.

Revision as of 08:03, 26 May 2016

Overview

This page demonstrates how to resize the root file system by increasing it's size by 2GB using the Logical Volume Manager (LVM). The follow environment exists:

[root@nst22 ~]# ssm list;
-----------------------------------------------------------
Device        Free      Used      Total  Pool   Mount point
-----------------------------------------------------------
/dev/sda                       20.00 GB         PARTITIONED
/dev/sda1                     500.00 MB         /boot
/dev/sda2  0.00 KB  19.51 GB   19.51 GB  nst22
-----------------------------------------------------------
-------------------------------------------------
Pool   Type  Devices     Free      Used     Total
-------------------------------------------------
nst22  lvm   2        2.00 GB  19.51 GB  21.50 GB
-------------------------------------------------
------------------------------------------------------------------------------------
Volume           Pool   Volume size  FS      FS size       Free  Type    Mount point
------------------------------------------------------------------------------------
/dev/nst22/root  nst22     17.51 GB  xfs    17.50 GB    5.88 GB  linear  /
/dev/nst22/swap  nst22      2.00 GB                              linear
/dev/sda1                 500.00 MB  ext4  500.00 MB  288.89 MB  part    /boot
------------------------------------------------------------------------------------
  • The root file sytem is of type xfs
[root@nst22 ~]# mount | grep root;
/dev/mapper/nst22-root on / type xfs (rw,relatime,attr2,inode64,noquota)

Demonstration

We will now show a sequence of commands to accomplish resizing the root file system by 2GB. Our NST system is a Virtual Machine (VM) running under the VMware Fusion Hypervisor. Behind the scenes we created a new virtual disk of size 2GB. On a physical system we could of used a whole disk or a disk partition for this demonstration.

The root file system size is currently 17.50GB. Our goal is to increase the root file system to a total of 19.50GB.