Fstab Options

What options do you SSDd users use in fstab? I’m not sure I have mine set up properly.

Can you guys please share your configs so I can compare please.

1 Like

That is mine. It is default. (Archlabs installer)

# /dev/sda2
UUID=6b925d7a-e147-4384-8758-acf3b76453d9	/         	ext4      	rw,relatime	0 1

# /dev/sda1
UUID=7BA7-20CD      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

/swapfile           	none      	swap      	defaults  	0 0
3 Likes

Hmm, yes mine is the default also.

Thanks for sharing.

1 Like

Here is mine on a device using an nvme card.

# Pluggable devices are handled by uDev, they are not in fstab
UUID=4c6e9543-f9be-4563-bc91-777baf7bb61c / ext4 noatime 1 1
UUID=fe0b4719-4fa6-4ad3-8172-a3d5139b715f swap swap defaults 0 0
UUID=93FA-F98B /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0
## 1TB Drive
UUID=3b78b6f6-b54b-4663-ab97-266701fbfb9a /Dropbox    auto nosuid,nodev,nofail,x-gvfs-show 0 0

I just use defaults and let the kernel handle it. Note that relatime has been the default since Linux 2.6.30, which is quite a while ago now, and the noatime option is not needed for longevity (SSDs will outlast most spinning rust drives now) and gives such an absurdly minimal boost to filesystem performance that it’s not even worth taking the time to type the option in (IMO). EDIT: and it breaks mutt.

EDIT2: @manyroads, your swap line should have none for fs_file (the second field).

2 Likes

@Head_on_a_Stick Thank you. I will make the change. As always, your help is most appreciated.

EDIT: The fix has been applied. :slight_smile:

I generally just mount everything where I want then run genfstab -U / and make some minor edits from Ext4 - ArchWiki

# /dev/nvme0n1p2
UUID=c715608b-fffb-403a-8d25-7b1ecfd7457a / ext4 rw,commit=30 0 1

# /dev/nvme0n1p1
UUID=15C4-BC0D /boot vfat rw,noatime 0 2

# swap
/swapfile none swap defaults 0 0

# /dev/sda1 (steam library)
UUID=78bd506c-2f78-4021-b8f4-01fedf0c952f /media/sandisk ext4 rw,commit=30 0 2

# /dev/sdb1 (Downloads, Music, Pictures, and git repos)
UUID=17ebd42a-9beb-4e21-82e7-9e704cc97a31 /media/wdblue ext4 rw,commit=30 0 2

I also systemctl enable fstrim.timer for TRIM

I use defaults, too.