---
# System prepended metadata

title: Sayli kcs

---

# Sayli kcs

### Title

### Issue
- Isuue 1
- Issue 2
~~~
Error snippet goes here
~~~
- Issue 3
### Environment
- Red Hat OpenShift Container Platform
    - 3.11

### Resolution 
#### There are 2 parts to `resizing` a volume containing a xfs file system:

------------------------------------
PART I : Expand the filesystem
------------------------------------

Choose either one of the below Option A or B as per the requirement:

* **Option A:** If space is free in VG, then extend the LV and resize XFS filesystem. 

~~~
$ lvextend -L +125G /dev/vgdata/lvdata              // Here I am extending the LV device /dev/vgdata/lvdata by 125 G.

$ xfs_growfs  <mount-point> -D <size>                //  Then I can extend the filesystem.
~~~

**NOTE:** The `-D size` option extend the file system to the specified size (expressed in file system blocks). Without the -D size option, xfs_growfs will extend the file system to the maximum size supported by the device.

* **Option B:** If there is no free space in VG, then add space in VG.

~~~
$ pvcreate /dev/sdN1          - Created a PV
$ vgextend vgdata /dev/sdN1           - Added PV to VG   
$ lvextend -L +125G /dev/vgdata/lvdata 
$ xfs_growfs  <mount-point> -D <size> 
~~~    

------------------------------------
PART II: Expanding in-use PVCs
------------------------------------

Expanding in-use PVCs is available as `alpha since 1.11` and as `beta since Kubernetes 1.15.` The `ExpandInUsePersistentVolumes` feature must be enabled as follows:

This feature can be enabled `clusterwide` or used for `nodes`. Choose either one of the below Option A or B to enable them respectively:


- **Option A:** Cluster-wide Settings.

    - To enable the feature gates for entire cluster, add feature-gates to `apiServerArguments` and `controllerArguments` in file`/etc/origin/master/master-config.yaml` as follows :

~~~
$ vim /etc/origin/master/master-config.yaml

-----------------8<------------------
kubernetesMasterConfig:
    apiServerArguments:
        feature-gates:
        - ExpandInUsePersistentVolumes
  ...
    controllerArguments:
        feature-gates:
        - ExpandInUsePersistentVolumes
-----------------8<------------------

- Restart the OpenShift Container Platform master service to apply the changes.

$ master-restart api api
$ master-restart controllers controllers
~~~

-  **Option B:** Node Specific.

- - **Step 1:** To enable the feature gates for node hosts, edit the appropriate node configuration map:
~~~
$ oc get cm -n openshift-node -n openshift-node 
$ oc edit cm node-config-infra -n openshift-node  // for example: This will set the feature gates only for the specific node type. 
-----------------8<------------------
kubeletArguments
     feature-gates:
     - ExpandInUsePersistentVolumes
-----------------8<------------------
~~~
- - **Step 2:** Restart the OpenShift Container Platform service for the changes to take effect:
~~~
$ systemctl restart atomic-openshift-node.service
~~~
- - **Step 3:** Once set up, run the following command on masters to check if it has been correctly set.
~~~
$ ps aux | grep apiserver
$ ps aux | grep feature-gates
~~~

- The  command `systemctl restart atomic-openshift-node.service` will basically restart the kubelet on the node. This will cause any running pods/containers on that node to `restart`. In case the `node is not drained` and the `application pods aren't rescheduled` on another node before executing the command, it may lead to `application downtime`. If this is a concern, consider [draining the node](https://docs.openshift.com/container-platform/3.11/admin_guide/manage_nodes.html#evacuating-pods-on-nodes) before making changes
### Root Cause
- RCA goes here

### Diagnostic Steps
- Investigations goes here