You are not logged in.

#1 2016-10-15 06:34:06

markand
Member
Registered: 2015-04-09
Posts: 28

Recommandations for my SSD NVMe

Hello,

I've just received my brand new thinkpad x1 carbon which comes with a SSD NVMe (256 Go). It's the first time I have a SSD so I'm quite new with them.

I usually mount my / partition with noatime,nodiratime but the genfstab from the installer adds much more options:

/dev/nvme0n1p2      	/         	ext4      	rw,relatime,data=ordered 0 1
/dev/nvme0n1p1      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

Are they really needed?

And for fstrim, I would like to enable the service but I want to be sure my device supports TRIM. I think it does, but I can't verify with hdparm:

$ sudo hdparm -I /dev/nvme0n1

/dev/nvme0n1:
 HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device

lspci returns this about it:

05:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller (rev 01)

Last edited by markand (2016-10-15 06:45:48)

Offline

#2 2016-10-15 07:09:34

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: Recommandations for my SSD NVMe

relatime is a weaker noatime, needed for some software that rely on noatime (see this). data=ordered is explained here, for example. The options you see in vfat are related to the permissions you will see for the files on the vfat partition  (vfat does not support setting permissions, so we give values that will apply for all the files). There are also options related to the coding of international characters (this shouldn't matter as long as file names use ASCII only, which should be the case for /boot; otherwise if you use an utf8 locale in linux you should use iocharset=utf8 instead). The shortname options relate to the handling of long/short names (see man mount) and errors=remount-ro tell the system to remount the partition read-only in case of errors.

As for the trim, can you test the fstrim command manually, with the --verbose option? I would say that if you don't see any errors it should be fine, but I have no idea why your hdparm command does not work.

Offline

#3 2016-10-15 08:07:56

markand
Member
Registered: 2015-04-09
Posts: 28

Re: Recommandations for my SSD NVMe

Thanks for these explanations smile

I've ran fstrim -av and it just printed:

$ sudo fstrim -av
/: 196.5 GiB (211006382080 bytes) trimmed

I was a bit scary when I saw 196.5 GiB. But I guess it works?

I'll enable fstrim service smile

Offline

#4 2016-10-15 10:36:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Recommandations for my SSD NVMe

Just FYI - defining data=ordered is redundant if you add defaults... if you mount without it, the defaults will apply it.

Offline

#5 2016-10-15 13:01:16

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Recommandations for my SSD NVMe

You could probably use 'strictatime,lazytime' with your ext4 partition. I believe in time this will be the default if it isn't already.

See: https://lwn.net/Articles/621046/


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2016-10-15 13:07:23

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Recommandations for my SSD NVMe

@rookie - I don't think it's defaulted yet... if you inspect the output of mount for a partition mounted with defaults, it does not appear.  I suspose it could be silent and applied.  All I know about is /etc/mke2fs.conf but these are options applied when making a partition, not mounting.

Offline

#7 2016-10-15 15:03:06

damjan
Member
Registered: 2006-05-30
Posts: 462

Re: Recommandations for my SSD NVMe

you can also add the discard option for ext4 so you don't need to fstrim periodically.

Offline

#8 2016-10-15 15:09:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: Recommandations for my SSD NVMe

damjan wrote:

you can also add the discard option for ext4 so you don't need to fstrim periodically.

https://wiki.archlinux.org/index.php/So … e#Discards

Offline

Board footer

Powered by FluxBB