-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Describe the bug
When trying to create a snapshot with exact bytes specified, it fails with error
rpc error: code = OutOfRange desc = requested size 1136238592 is smaller than source logical volume: 1136656384
during this check. Probably this is happens because of LVM which rounds up the storage, because i see the following message in the logs
Rounding up size to full physical extent <1.06 GiB
To Reproduce
Steps to reproduce the behavior:
- Create PVC
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: simple-pvc
spec:
volumeMode: Filesystem
storageClassName: topolvm-provisioner
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1136234735
- Create pod
apiVersion: v1
kind: Pod
...
volumes:
- name: mypvc
persistentVolumeClaim:
claimName: simple-pvc
- Create Snapshot
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
name: simple-snap
spec:
volumeSnapshotClassName: topolvm-provisioner
source:
persistentVolumeClaimName: simple-pvc
Expected behavior
Snapshot succeed
Additional context
When creating PVC with size 1136234735
, LV gets created with size 1136656384
, probably because of LVM rounding
pluser