No diskutil verbs to create/modify APFS volume reserve/quota values on existing APFS volumes

Originator:cwindus
Number:rdar://34096467 Date Originated:2017-08-26
Status:New Resolved:
Product:macOS + SDK Product Version:10.13
Classification:Feature request Reproducible:Always
 
Area:
Disk Utility

Summary:
The `diskutil apfs` has no verbs or documentation indicating how to add or modify the 'reserved space' or quota of an existing APFS volume.

For example, it does not appear possible to create reserved space or specify a quota  for the `/Volumes/Macintosh HD` APFS volume that is created by the OS installer without removing the volume and re-creating it.

Steps to Reproduce:
1) Launch the Terminal.app from /Applications/Utilities
2) `man diskutil`
3) Find the corresponding section for APFS and related verbs
4) Look for documentation/verbs on modifying an existing volume to add/remove/modify a reserved space allocation or quota

Expected Results:
`diskutil apfs` should have a means to modify/add/remove a quota or reserved space allocation.

Observed Results:
There is no documented means, or any verb found in the `man diskutil` page for modifying existing APFS volumes _without_ deleting the volume first.

Deleting a volume is not always a desired step in modifying APFS volumes - for example, modifying the APFS volume containing `Macintosh HD` to have a quota and or reserve of nGB appears to require the APFS volume be deleted first.

`diskutil apfs` should have a verb (perhaps `modifyVolume`) and two additional parameters for the `modifyVolume` verb such as `-quota` and `-reserve`. 

For example, if a volume has been created using:
`diskutil apfs addVolume disk1 Data -quota 50G -reserve 10G`

To remove the quota and reserve:
`diskutil apfs modifyVolume disk1s5 Data -quota 0 -reserve -0`

To modify the quota and reserve to different sizes:
`diskutil apfs modifyVolume disk1s5 Data -quota 40G -reserve 15G`

To add a quota and reserve to an existing APFS volume (assuming `Macintosh HD` volume is on disk1s1):
`diskutil apfs modifyVolume disk1s1 "Macintosh HD" -quota 50G -reserve 30G`

It may not be strictly necessary to include the Volume name in the `modifyVolume` parameters.

Version:
macOS 10.13/17A352a

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!