[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wiping an unencrypted SSD in preparation for encryption



On Fri, Jun 11, 2021 at 05:55:02AM -0700, David Christensen wrote:
> On 6/10/21 11:49 PM, Reco wrote:
> > On Thu, Jun 10, 2021 at 11:43:12PM -0700, David Christensen wrote:
> > > I don't bother with the 'discard' option in /etc/fstab, but perhaps I
> > > should.  The fstab(5) and mount(8) manual pages are unclear if
> > > 'discard' applies to swap or ext4.
> > 
> > swapon(8):
> > 
> >     -d, --discard[=policy]
> > 	  Enable  swap  discards ... The /etc/fstab mount options discard,
> > discard=once, or discard=pages may also be used to enable discard flags.
> > 
> > 
> > Therefore 'discard' can be applied to both ext4 and swap.
> 
> Thank you for the clarification regarding trim and swap.
> 
> Where do you see the information for ext4?

You just have to know where to look - ext4(5):

discard/nodiscard
	Controls  whether  ext4  should issue discard/TRIM commands to the
underlying block device when blocks are freed.  This is useful for SSD
devices and sparse/thinly-provisioned LUNs, but it is off by default
until sufficient testing has been done.


How exactly this ended in manpages section 5 (which is "File formats and
conventions eg /etc/passwd") is anyone's guess.

Reco


Reply to: