From: "DERUMIER, Alexandre via pve-devel" <pve-devel@lists.proxmox.com>
To: "w.bumiller@proxmox.com" <w.bumiller@proxmox.com>
Cc: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>,
"pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-storage] lvm: use blkdiscard instead cstream to saferemove drive
Date: Fri, 15 Aug 2025 05:10:58 +0000 [thread overview]
Message-ID: <mailman.103.1755234673.385.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <kkrxayfuo4vhyzqswghw3evwll4b37okjulkxlmwq2ztanlyd6@5td4beeats46>
[-- Attachment #1: Type: message/rfc822, Size: 15986 bytes --]
From: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
To: "w.bumiller@proxmox.com" <w.bumiller@proxmox.com>
Cc: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-storage] lvm: use blkdiscard instead cstream to saferemove drive
Date: Fri, 15 Aug 2025 05:10:58 +0000
Message-ID: <f7d67adf5349e0e58669611eb94960a7f9fee006.camel@groupe-cyllene.com>
I found some doc on blkdiscard on redhat ovirt
https://www.ovirt.org/develop/release-management/features/storage/wipe-volumes-using-blkdiscard.html
"Let lunX be a device and dm-X be its corresponding dm device for a
natural number X. Then lunX is considered to support write same iff the
value of /sys/block/dm-X/queue/write_same_max_bytes is bigger than 0.
A device that supports write same is a device that allows to write a
single data block to a range of several contiguous blocks in the
storage.
That means that instead of writing a 1MB block of zeros 1024 times to
zero a volume of 1GB (as vdsm does with dd today), a single request to
write that 1MB block of zeros to the right range is enough, and the
rest is done by the storage array.
When calling blkdiscard -z <block_device>:
If the block device supports write same, then the kernel quickly zeroes
it using write same.
Else, the kernel zeroes it by writing pages of zeros.
"
(my test was without writesame support, so even wihout it, it's still a
lot faster than cstream).
and for discard with zeroes:
"
Then lunX supports the property that discard zeroes the data ff the
value of /sys/block/dm-X/queue/discard_zeroes_data is 1"
(but here, some san can have bad implementation,so we can't auto
enabled i.
Maybe we should check at minimum that discard_zeroes_data=1 if user
enable saferemove_discard, and fallback to classic zeroing if not ?
-------- Message initial --------
De: Wolfgang Bumiller <w.bumiller@proxmox.com>
À: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
Cc: pve-devel@lists.proxmox.com <pve-devel@lists.proxmox.com>
Objet: Re: [pve-devel] [PATCH pve-storage] lvm: use blkdiscard instead
cstream to saferemove drive
Date: 14/08/2025 14:05:51
On Thu, Aug 14, 2025 at 10:07:59AM +0000, DERUMIER, Alexandre wrote:
> > + saferemove_discard => {
> > + description => "Wipe with discard instead zeroing.",
> > + type => 'boolean',
>
> > > Not sure we need this (not sure when this is actually useful),
> > > but
> > > it's
> > > cheap enough to have around. Should add a `default => 0` for
> > > documentation purposes, though.
>
> Some storage allow overprovisioning. (create a lun bigger than the
> real
> storage size), it can be interesting to discard instead zeroing (to
> free space on storage side).
> as snapshots currently use lvm volume with same size than the main
> volume, it can be interesting to have overprovisioning.
But this does not guarantee that the data is actually erased/zeroed, in
which case I'd just disable the thing altogether (but then again I use
`issue_discards` in lvm.conf to cause `lvremove` to discard the whole
thing... ;-)
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-08-15 5:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 9:24 Alexandre Derumier via pve-devel
2025-08-14 9:37 ` Wolfgang Bumiller
2025-08-14 10:07 ` DERUMIER, Alexandre via pve-devel
[not found] ` <9d5353263ee0aa3ee67d8d331f674f8a00044b1e.camel@groupe-cyllene.com>
2025-08-14 12:05 ` Wolfgang Bumiller
2025-08-14 13:11 ` DERUMIER, Alexandre via pve-devel
2025-08-15 5:10 ` DERUMIER, Alexandre via pve-devel [this message]
2025-08-15 5:47 ` DERUMIER, Alexandre via pve-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mailman.103.1755234673.385.pve-devel@lists.proxmox.com \
--to=pve-devel@lists.proxmox.com \
--cc=alexandre.derumier@groupe-cyllene.com \
--cc=w.bumiller@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox