Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] FSTAB setup for SSD  (Read 5402 times)

LRC1962

  • Guest
[EN] FSTAB setup for SSD
« on: 2014/06/16, 22:51:08 »
My fstab line for my SSD is
Code: [Select]
UUID=55c8a419-7b97-4f5f-84e8-464aa269543f     /   ext4         defaults,noatime,errors=remount-ro,discard    0    1

You also recommend
Code: [Select]
none /tmp tmpfs defaults,noatime,mode=1777 0 0
none /var/tmp tmpfs defaults,noatime 0 0
none /var/log tmpfs defaults,noatime 0 0
none /var/spool tmpfs defaults,noatime 0 0

My thinking is would any of these work
Code: [Select]
UUID=df2e8e60-1101-4ee2-a7bc-a3d3ab4909d5 /media/disk3part1 ext4 defaults,relatime,errors=remount-ro  0    2   
/tmp            /media/disk3part1/tmp       defaults,noatime,bind 0 0
/var/tmp      /media/disk3part1/var/tmp   defaults,noatime,bind 0 0
/var/log       /media/disk3part1/var/log   defaults,noatime,bind 0 0
/var/spool    /media/disk3part1/var/spool defaults,noatime,bind 0 0
/run/shm    /media/disk3part1/run/shm   defaults,noatime,bind 0 0

Or is there a better way? That way those files could be written to a HD and if something died on you (like the electricity) while you were in the middle of something all would not be lost.
Or would there be a better setup?

EDIT: set codetags (bluelupo, Moderator)
« Last Edit: 2014/06/17, 16:53:59 by LRC1962 »

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: FSTAB setup for SSD
« Reply #1 on: 2014/06/17, 15:10:04 »
According to this article, paragraph 3, it is better not to use the discard mount option which activates trim on the filesystem in real time.  It is better to use fstrim, and you can put that in a cron job if you wish.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

LRC1962

  • Guest
Re: FSTAB setup for SSD
« Reply #2 on: 2014/06/17, 16:52:49 »
Don't have it running yet but I will set that up once I am in it. From other sites I have seen fstrim is best to make sure it actually works 1st before you jump in from say a live drive.
It should be you never can tell for sure.
Thanks for the heads up. Will definitely look into it.

LRC1962

  • Guest
Re: FSTAB setup for SSD
« Reply #3 on: 2014/06/17, 17:02:38 »
Did a trial run on my HD and this setup seems to work.
/etc/fstab

Code: [Select]
#place at end of fstab
/tmp            /media/(HD partition)/tmp         bind         defaults,noatime,bind                         0    0
/var/tmp        /media/(HD partition)/var/tmp     bind         defaults,noatime,bind                         0    0
/var/log        /media/(HD partition)/var/log     bind         defaults,noatime,bind                         0    0
/var/spool       /media/(HD partition)/var/spool   bind         defaults,noatime,bind                         0    0
/var/cache     /media/(HD partition)/var/cache   bind         defaults,noatime,bind                         0    0

Also need to do is symlink /tmp;  /var/tmp; /var/log; /var/spool; /var/cache  to new locations. Tried just regular files and they were just written into.
This was my experience anyway.



(Code tags added by dibl.)
« Last Edit: 2014/06/17, 19:09:50 by dibl »

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: FSTAB setup for SSD
« Reply #4 on: 2014/06/17, 18:09:49 »
I don't see a /run/shm directory anymore.  There is /dev/shm and it is a tmpfs by default.  If you want to use /run/user/ for something like a browser cache, which I do, you don't need to manually list it in /etc/fstab -- it defaults to a tmpfs and your user has a subdirectory with his user number and write privileges.


Run the "mount" command in your root terminal and take a look at these.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

LRC1962

  • Guest
Re: FSTAB setup for SSD
« Reply #5 on: 2014/06/17, 18:32:12 »
According to what I read
Quote
/run is, in general, a temporary filesystem (tmpfs) residing in RAM
. So I took it out presuming it was a ram file. Also if you look at it in a live CD it is a symlink. Although I notice in dolphin it is not.
The quest then becomes at boot does systemd turn it into a regular directory or is it a symlink to ram?
Any thoughts on that dibl

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: FSTAB setup for SSD
« Reply #6 on: 2014/06/17, 19:06:02 »
AFAICT, it is a real directory, mounted and populated at boot time.  But only the top  level, /run is part of the installed system -- there is no trace of any subdirectories under it on your hdd (or ssd).  In this way it is like /tmp and /dev.  You can see this by booting a live CD and then taking a look at your siduction partition.  That is all I know about it -- others on this forum know more.


When you want to post the output of a command, or the contents of a configuration file, it is a big help to the other forum users if you will put code tags around that section.  You can do this by typing [ code ] with no spaces at the beginning of a section, and [ /code ] with no spaces at the end of the section.  There is also a button on the composition page with a "#" on it that will put the tags over highlighted text.   ;)
« Last Edit: 2014/06/17, 19:12:11 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

LRC1962

  • Guest
Re: FSTAB setup for SSD
« Reply #7 on: 2014/06/17, 19:16:10 »
The nice, but complicated thing about linux is you can tweak it till you die. And unlike M$ is very easy on the hardware no matter how you do it.

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.345
    • Land of the Buckeye
Re: FSTAB setup for SSD
« Reply #8 on: 2014/06/17, 19:32:53 »
If you are new to Debian and siduction, your best approach is to leave as much as you can in default configuration, until you figure out what you really need to change to use your system productively.  And whenever you decide you want to edit a system file, always make a "/etc/sysctl.conf.orig" (for example) copy of it before you change it.


FYI, the worst trouble I ever got in with my computer hardware, in the past 15 years, was a Windows XP system running on a RAID1 mirrored pair of hdds.  So, I dunno about "easy on hardware".   ::)
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

LRC1962

  • Guest
Re: FSTAB setup for SSD
« Reply #9 on: 2014/06/17, 20:00:14 »
Forgot to add 'M$, linux'.
1st time I started on linux, xp was telling me the HD was dead. Kept using linux on the drive for another 3-4 years.