Skip to content

Latest commit

 

History

History
115 lines (89 loc) · 3.79 KB

mount_options.md

File metadata and controls

115 lines (89 loc) · 3.79 KB
title authors owners creation-date last-updated status
LVM-LocalPV Mount Options
@pawanpraka1
@kmova
2021-06-16
2021-06-16
Implemented

LVM-LocalPV Mount Options

Table of Contents

Summary

This proposal charts out the workflow details to support mount options for various filesystems.

Motivation

Goals

  • As a user, I need storage to be mounted inside the applications with specific options.

Non-Goals

  • Supporting mount options that are natively don't support by filesystem(s).

Proposal

Implementaion Details

LVMLocalPV Node CSI driver is responsible for mounting LVM Volumes on application specific paths during NodePublishVolume request gRPC. At a high level, Kubelet will perform the following operations when pod schedules on node

  • Kubelet will identify CSI-Driver responsible for mounting volume and issues NodePublishVolume request for mounting volume into application specific path. Along with the request, Kubelet also sends the payload which contains mount specific information(which are gathered from multiple places ex: mount options & fsType are read from storageclass, volume information like capabilities are read from PV resource).
  • Now, after receiving the request CSI-Driver reads following information from NodePublishVolume request
    • Filesystem information
    • Target path(application specific path) i.e mount path
    • Volume attributes(Which got populated to PV during volume creation time)
    • Volume Capabilities(Block mode/Filesystem mode)
    • Mount Options and perform mount operation using K8s mount-utils library.

Note:

  • How kubelet gets event on pod scheduling and what it does after receiving a successful response from NodePublishVolume request is out of scope in this workflow.
  • For more information about mount options are available here.
  • There won't be any validations on mount options either from K8s side (or) from LocalPV-LVM side. If user doesn't specify invalid values mount operation will be errored and the reason can be seen in describe of the application pod.

Usage details

  1. User/Admin can specify mount options in StorageClass under mountOptions field
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-lvmpv-xfs
provisioner: local.csi.openebs.io
allowVolumeExpansion: true
parameters:
  storage: "lvm"
  vgpattern: "^lvmvg$"
  fsType: ext4
mountOptions:
- barrier=0
- commit=10
- data=journal

Test Plan

A test plan will include following test cases:

  • Provision application without specifying mount options and verify that application should be able to consume a volume.
  • Provision application with various mount options according to user chosen filesystem(ext[3|4], xfs, btrfs) and verify whether mount options behavior from the application.
  • Provision application with invalid mount options and verify that application should remain in the containerCreating state.

Graduation Criteria

All testcases mentioned in Test Plan section need to be automated

Drawbacks

NA

Alternatives

NA