LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-17-2021, 09:27 AM   #1
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,937

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Question Is this an optimum fstab setup for a SSD?


Hi.

I'm running Debian 11. I used auto partitioning with full encryption (LUKS).

What would be an ideal fstab for a Samsung 850 EVO 2TB 2.5in SATA SSD?

-----

My current fstab:

Code:
/dev/mapper/DXXXX1--vg/root ext4 noatime,commit=600,errors=remount-ro 0 1
UUID=3XXXXXXc-0XXb-4XX3-bXX7-9XXXXXXXXXX1 /boot ext2 noatime 0 2
/dev/mapper/DXXXX1--vg-swap_1 none            swap    sw              0       0
-----

I've already ran these {unsure if all 4 commands were needed}:
Code:
sudo systemctl enable fstrim.timer && sudo systemctl start fstrim.timer
Code:
sudo systemctl daemon-reload
Code:
sudo update-grub
Code:
sudo update-initramfs -u -k all
-----

Thanks.

Last edited by linustalman; 12-17-2021 at 09:39 AM.
 
Old 12-17-2021, 09:55 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,169

Rep: Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948
Misdirected reply.

Last edited by wpeckham; 12-17-2021 at 01:05 PM.
 
Old 12-17-2021, 10:28 AM   #3
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,918

Rep: Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783Reputation: 2783
Quote:
Originally Posted by wpeckham View Post
It is good to know that to obtain this TROJAN you would have to go outside of the REPO system and blindly install random software from IRC links.

How many people would DO that?
This appears to be a response to "News: Malware targetting arch on pinephone" ?

 
Old 12-17-2021, 01:06 PM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,169

Rep: Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948
Quote:
Originally Posted by boughtonp View Post
This appears to be a response to "News: Malware targetting arch on pinephone" ?

It was. No idea how that happened! Correcting now...
 
Old 12-17-2021, 01:42 PM   #5
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: LMDE 6
Posts: 1,236

Rep: Reputation: 441Reputation: 441Reputation: 441Reputation: 441Reputation: 441
Optimum is debateable. Most of the information on all kinds of special settings for ssds was when they were in their infancy. These days even with nothing fancy they will statistically outlast the average computer. The fstrim is necessary but anything else likely isn't. They won't hurt, but won't be a game changer either.

I just do defaults on most disks. And defaults,errors=remount-ro for root.

Last edited by jmgibson1981; 12-17-2021 at 01:44 PM.
 
1 members found this post helpful.
Old 12-18-2021, 09:28 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,169

Rep: Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948
"Optimum" will depend upon your storage usage and data as much as your FS options.
That said, I would start with a more SSD aware format in preference to EXT4: F2FS or BTRFS perhaps.

EXT4 is a good general choice when you do not know detail about your storage ahead, so popular with maintainers as a default. BTRFS is solid for a single drive case (a little iffy for RAID 5/6), and F2FS is made specifically FOR solid state and performs better than other options for most SSD cases.

Last edited by wpeckham; 12-18-2021 at 09:37 AM.
 
1 members found this post helpful.
Old 12-18-2021, 09:30 AM   #7
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,937

Original Poster
Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Question

Do the space types matter?

Would this:

Code:
/dev/mapper/DXXXX1--vg-swap_1 none            swap    sw              0       0
...also work like this:

Code:
/dev/mapper/DXXXX1--vg-swap_1 none swap sw 0 0
 
Old 12-18-2021, 09:32 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,217

Rep: Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952
Quote:
Originally Posted by linustalman View Post
Do the space types matter?

Would this:

Code:
/dev/mapper/DXXXX1--vg-swap_1 none            swap    sw              0       0
...also work like this:

Code:
/dev/mapper/DXXXX1--vg-swap_1 none swap sw 0 0
yes, they are identical. This is just to make it more readable.
 
1 members found this post helpful.
Old 12-18-2021, 09:45 AM   #9
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,169

Rep: Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948Reputation: 2948
Quote:
Originally Posted by linustalman View Post
Do the space types matter?

Would this:

Code:
/dev/mapper/DXXXX1--vg-swap_1 none            swap    sw              0       0
...also work like this:

Code:
/dev/mapper/DXXXX1--vg-swap_1 none swap sw 0 0
There is a man page that discusses this file, the fields, the options (although it refers you to the file system pages for detail on options specific to the file system), and the formatting. Recommended!
 
Old 12-18-2021, 09:45 AM   #10
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,937

Original Poster
Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Quote:
Originally Posted by pan64 View Post
yes, they are identical. This is just to make it more readable.
Ok, thanks.
 
Old 12-22-2021, 01:17 AM   #11
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,937

Original Poster
Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Should I replace the "/dev/mapper/" parts with "UUID=..."?
 
Old 12-22-2021, 09:19 AM   #12
biker_rat
Member
 
Registered: Feb 2010
Posts: 416

Rep: Reputation: 250Reputation: 250Reputation: 250
Add discard after noatime?
 
Old 12-24-2021, 02:39 AM   #13
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,937

Original Poster
Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Post

Quote:
Originally Posted by biker_rat View Post
Add discard after noatime?
Hi BR. Someone in Reddit said to drop the defaults option as it does nothing other than act as a placeholder for when there's nothing else in the options field.
 
Old 12-24-2021, 02:41 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,217

Rep: Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952Reputation: 7952
Quote:
Originally Posted by linustalman View Post
Hi BR. Someone in Reddit said to drop the defaults option as it does nothing other than act as a placeholder for when there's nothing else in the options field.
Would be better to read the man page.
 
1 members found this post helpful.
  


Reply

Tags
fstab, samsung 850 evo, ssd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimum SSD and HDD setup on a new Linux PC Joydeck Linux - Newbie 13 02-26-2020 06:57 AM
To SSD or not to SSD jlinkels Linux - Hardware 14 10-02-2012 07:36 AM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 01:46 AM
Optimum partition sizes (fdisk?) for multiple boot setup digital8doug SUSE / openSUSE 8 08-30-2006 01:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration