Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount option for ephemeral disk (alternative to cron scheduling fstrim) #2534

Open
gberche-orange opened this issue Jul 4, 2024 · 1 comment

Comments

@gberche-orange
Copy link

Is your feature request related to a problem? Please describe.

As a bosh operator, in order to reclaim space on ephemeral thin-provisioned disk, I need bosh to support specifying the mount option to discard

https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vsan.doc/GUID-C75E80AE-2DA8-4314-98E5-B7F8CE98E1BF.html

Deleting or removing files frees space within the file system. This free space is mapped to a storage device until the file system releases or unmaps it. vSAN supports reclamation of free space, which is also called the unmap operation.
vSAN also supports the SCSI UNMAP commands issued directly from a guest operating system to reclaim storage space. vSAN supports offline unmaps and inline unmaps. On Linux OS, offline unmaps are performed with the fstrim(8) command, and inline unmaps are performed when the mount -o discard command is used.

Currently, bosh only supports controlling mount options on persistent disks:

https://bosh.io/docs/manifest-v2/#instance-groups

persistent_disk_mount_options [Array of strings, optional]: Mount options when mounting persistent disk. Example: ["noatime"].

whereas ephemeral disk mount points can not be changed:

# mount | grep /var/vcap/data
/dev/sdb1 on /var/vcap/data type ext4 (rw,relatime)

Describe the solution you'd like

A new property ephemeral_disk_mount_options which I can set to ['discard']

Describe alternatives you've considered

Scheduling a cron to periodically execute fstrim

Additional context
Add any other context or screenshots about the feature request here.

@rkoster
Copy link
Contributor

rkoster commented Jul 4, 2024

This sounds like a useful feature, happy to review a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for Changes | Open for Contribution
Development

No branches or pull requests

2 participants