NVMe over-provisioning

Hi,

I would like to over-provision my NVMe drive on which I install Qubes OS.
AFAIU it is not possible to do that by hdparm. Also the NVMe drive supports only one namespace, so that method is not usable either.

I understand that simply not filling up the drive too much does the same but I would prefer to have a “safe space” that will guarantee that, so I don’t have to take care to monitor free space all the time.

What would be the right method to over-provision the NVMe drive by 25%, for example? (ideally, during Qubes OS re-installation which I am about to do).

You can shrink your LVM assigned space by 25%, which will guarantee that no allocation will ever touch that extra space in the drive, or even do that an shrink that entire partition too, for a harder constraint.

Could you please explain how to do this? I am still new to Qubs OS and so far I have always used Automatic installation mode. When reinstalling I simply click the “Delete all” button to remove existing storage structures.

It’s really not a qubes change as much as an LVM change. You can do it from a Dom0 terminal, following this guide (or similar):How to Extend/Reduce LVM's (Logical Volume Management) in Linux - Part II. Now, there is a bit of an extra complexity due to the encryption, but it is certainly doable. Alternatively, if you don’t mind reinstalling, you can do manual allocation and not allocate the entire free space.

Re. the link you give - won’t that destroy info on the drive?

Alternatively, if you don’t mind reinstalling, you can do manual allocation and not allocate the entire free space.

I was asking for that option in my previous reply. Could you explain that as for a non-expert, please?

Thanks.

If there is free space in your LVM pool, you can safely shrink it following the instructions there and not lose data (but always perform a backup first, of course). The other option (reinstalling from scratch), can achieve the same if you create your own partition scheme and allocate a smaller partition for the LVM pool. It is a bit of an advanced topic, but you can have a good guide here: Custom installation | Qubes OS. The size of the LVM pool usually covers all free space in your drive, but if you select custom, you can make it smaller and leave free space that will never be used by the OS.

Please read it and let me know if you need help with any part of those instructions.

1 Like

I can’t believe that myself but I did it using this guide :slight_smile:
Thank you!

1 Like