You are not logged in.

#1 2015-09-14 15:40:38

stecco
Member
Registered: 2013-07-16
Posts: 40

[SOLVED] - SSD's fstab

Hi there I've freshly re-installed arch on my Lenovo Yoga 3 pro. I've no experience with ssd in general, and my pc has it.

this is my fstab, automatically generated

                                         

# /dev/sda8
UUID=4f13e042-7ff9-48c5-adad-2e022f6b91ff       /               ext4            rw,relatime,data=ordered        0 1

# /dev/sda9
UUID=5b7dd3e3-aa90-4c3d-a71a-016f2cc4b50e       /home           ext4            rw,relatime,data=ordered        0 2

# /dev/sda2 LABEL=SYSTEM_DRV
UUID=1699-6388          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

This is the configuration that I would try

                                         

# /dev/sda8
UUID=4f13e042-7ff9-48c5-adad-2e022f6b91ff       /               ext4            rw,noatime,discard,data=ordered 0 1

# /dev/sda9
UUID=5b7dd3e3-aa90-4c3d-a71a-016f2cc4b50e       /home           ext4            rw,noatime,discard,data=ordered        0 2

# /dev/sda2 LABEL=SYSTEM_DRV
UUID=1699-6388          /boot           vfat            rw,noatime,discard,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

but at the boot screen I read "Failed to start Remount Root and Kernel File System" unless I omit the option discard from the / line, and I do not understand why.
A guy from the italian forum suggested me this fstab, that also apparently worked without errors

# /dev/sda8
UUID=4f13e042-7ff9-48c5-adad-2e022f6b91ff       /               ext4            rw,,data=ordered,noatime,discard,commit=100,barrier=0    0 1

# /dev/sda9
UUID=5b7dd3e3-aa90-4c3d-a71a-016f2cc4b50e       /home           ext4            rw,data=ordered,noatime,discard,commit=100,barrier=0     0 1

# /dev/sda2 LABEL=SYSTEM_DRV
UUID=1699-6388          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro     0 2

shm     /dev/shm        tmpfs   nodev,nosuid,size=4G                            0       0
none    /tmp            tmpfs   nodev,nosuid,noatime,size=2G,mode=1777          0       0
tmpfs   /var/log        tmpfs   defaults,noatime,mode=0755                      0       0
tmpfs   /var/spool      tmpfs   defaults,noatime,mode=1777                      0       0
tmpfs   /var/tmp        tmpfs   defaults,noatime,mode=1777                      0       0

but he could not explain what these lines did:

shm     /dev/shm        tmpfs   nodev,nosuid,size=4G                            0       0
none    /tmp            tmpfs   nodev,nosuid,noatime,size=2G,mode=1777          0       0

among you anyone have any ideas? smile

I conclude by adding that I have 8G of RAM (which is an enormity, I'd use it for any cache of browsers or similar if you recommend) and that Arch is happily dual boot with windows10.

I hope soon to receive your advice and examples of working configurations!

Last edited by stecco (2015-09-17 09:10:43)

Offline

#2 2015-09-14 15:46:52

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,751
Website

Re: [SOLVED] - SSD's fstab

Move /etc/fstab to your home folder then reboot and post the output of:

cat /proc/mounts

EDIT: Changed command.

Last edited by Head_on_a_Stick (2015-09-14 15:47:54)

Offline

#3 2015-09-14 19:56:36

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

wait a sec... are you talking about fstab with this configuration, the second one in my previous post?

                                        

# /dev/sda8
UUID=4f13e042-7ff9-48c5-adad-2e022f6b91ff       /               ext4            rw,noatime,discard,data=ordered 0 1

# /dev/sda9
UUID=5b7dd3e3-aa90-4c3d-a71a-016f2cc4b50e       /home           ext4            rw,noatime,discard,data=ordered        0 2

# /dev/sda2 LABEL=SYSTEM_DRV
UUID=1699-6388          /boot           vfat            rw,noatime,discard,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

Offline

#4 2015-09-14 20:06:20

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,751
Website

Re: [SOLVED] - SSD's fstab

It doesn't matter which one, just let your system boot up *without* a file at /etc/fstab and look at /proc/mounts to see how systemd has mounted your filesystem. [1]

[1] http://www.freedesktop.org/software/sys … rator.html

Offline

#5 2015-09-14 20:37:28

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

Ok now I can't log in as non root user.... here with an ubuntu live. You could have at least warn me!!!

however:

# cat /proc/mounts
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=4044012k,nr_inodes=1011003,mode=755 0 0
run /run tmpfs rw,nosuid,nodev,relatime,mode=755 0 0
/dev/sda8 / ext4 rw,relatime,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
systemd-1 /boot autofs rw,relatime,fd=22,pgrp=1,timeout=120,minproto=5,maxproto=5,direct 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
tmpfs /tmp tmpfs rw 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
tmpfs /run/user/120 tmpfs rw,nosuid,nodev,relatime,size=809352k,mode=700,uid=120,gid=120 0 0
gvfsd-fuse /run/user/120/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=120,group_id=120 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=809352k,mode=700,uid=1000,gid=100 0 0
tmpfs /run/user/0 tmpfs rw,nosuid,nodev,relatime,size=809352k,mode=700 0 0

Offline

#6 2015-09-14 20:44:55

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,751
Website

Re: [SOLVED] - SSD's fstab

stecco wrote:

Ok now I can't log in as non root user.... here with an ubuntu live. You could have at least warn me!!!

Ha, tricked you!
tongue

But seriously, sorry about that -- /home wasn't mounted but I thought it would be (I don't have a separate /home partition).

That was a stupid idea, I am most embarrassed...

Why not use `fstrim` periodically rather than the "discard" option?
https://wiki.archlinux.org/index.php/So … via_fstrim

Last edited by Head_on_a_Stick (2015-09-14 20:47:00)

Offline

#7 2015-09-14 21:06:54

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

No problems for me, luckily I had an ubuntu live ready for this kind of "tricks"!

fstrim??? Could be a good idea for my ssd, but does not explain why the command "discard" does not work on my configuration (the 2nd in the first post) while does on the 3rd...

Offline

#8 2015-09-15 14:33:29

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

Here is the latest news:
This is my fstab updated, I was able to activate the "discard", does not seem to have seen errors on boot and everything seems to work.

# /dev/sda8
UUID=4f13e042-7ff9-48c5-adad-2e022f6b91ff       /               ext4            rw,data=ordered,noatime,discard        0 1

# /dev/sda9
UUID=5b7dd3e3-aa90-4c3d-a71a-016f2cc4b50e       /home           ext4            rw,data=ordered,noatime,discard        0 2

# /dev/sda2 LABEL=SYSTEM_DRV
UUID=1699-6388          /boot           vfat            rw,noatime,discard,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro    0 2

And I set the I/O scheduler for the entire system via the elevator=noop kernel parameter.

I'm also experimenting with other little things to exploit my 8G of RAM and to preserve my ssd:
I installed psd (https://wiki.archlinux.org/index.php/Pr … ync-daemon) and I activated overlay by adding the following lines to /etc/sudoers (in the wiki was not explained crearly,... or maybe I didn't find it smile)

stecco ALL=(ALL) NOPASSWD: /usr/bin/mount,/usr/bin/umount,/usr/bin/psd-overlay-helper

Now I wish to move also the compiling working directory to tmpfs (https://wiki.archlinux.org/index.php/Makepkg#tmpfs) but reading the wiki I did not understand all the steps that must be made.
Same situation for /tmp and /var directories: what I found in the wiki is a bit 'vague... Should I mount that on tmpfs too? And which other subfolders?


I'm waiting here for your advice!!

EDIT
Maybe I got it.
Regarding moving  the compiling working directory to tmpfs, just commented out the BUILDDIR=/tmp/makepkg line and modify fstab adding something like

tmpfs   /tmp/makepkg    tmpfs   exec 0 0

according to the purple note in the wiki page.

That's because, quoting archwiki,

Arch uses a tmpfs /run directory, with /var/run and /var/lock simply existing as symlinks for compatibility. It is also used for /tmp by the default systemd setup and does not require an entry in fstab unless a specific configuration is needed

Please correct me if I'm wrong!!!!

Last edited by stecco (2015-09-15 16:05:47)

Offline

#9 2015-09-15 16:03:24

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [SOLVED] - SSD's fstab

What was wrong with your first try at using the discard option then? I cannot see any difference between those two fstab versions.

/tmp is a tmpfs in arch by default. Look at the output of `mount`


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#10 2015-09-15 16:14:11

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

dice wrote:

What was wrong with your first try at using the discard option then? I cannot see any difference between those two fstab versions.

Me too!!! >:(

I don't understand.... maybe the position?? After data=ordered instead of before?

And, if it may be of interest

$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4044012k,nr_inodes=1011003,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda8 on / type ext4 (rw,noatime,discard,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
systemd-1 on /boot type autofs (rw,relatime,fd=27,pgrp=1,timeout=120,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda9 on /home type ext4 (rw,noatime,discard,data=ordered)
tmpfs on /run/user/120 type tmpfs (rw,nosuid,nodev,relatime,size=809352k,mode=700,uid=120,gid=120)
gvfsd-fuse on /run/user/120/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=120,group_id=120)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809352k,mode=700,uid=1000,gid=100)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

And... did you see my previous edit?

Last edited by stecco (2015-09-15 16:17:29)

Offline

#11 2015-09-15 16:18:01

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [SOLVED] - SSD's fstab

I don't see your /dev/sda2 mounted which according to your fstab should be at /boot.

Last edited by dice (2015-09-15 16:22:40)


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#12 2015-09-15 16:29:06

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

Bravo, dice. The error was in the option noatime, i think. I've changed again in relatime and now I can see it.

$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4044012k,nr_inodes=1011003,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda8 on / type ext4 (rw,noatime,discard,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
systemd-1 on /boot type autofs (rw,relatime,fd=31,pgrp=1,timeout=120,minproto=5,maxproto=5,direct)
tmpfs on /tmp type tmpfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda2 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,discard)
/dev/sda9 on /home type ext4 (rw,noatime,discard,data=ordered)
tmpfs on /run/user/120 type tmpfs (rw,nosuid,nodev,relatime,size=809352k,mode=700,uid=120,gid=120)
gvfsd-fuse on /run/user/120/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=120,group_id=120)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809352k,mode=700,uid=1000,gid=100)
overlaid on /run/user/1000/stecco-google-chrome type overlay (rw,nosuid,nodev,noexec,relatime,lowerdir=/home/stecco/.config/google-chrome-backup,upperdir=/run/user/1000/stecco-google-chrome-rw,workdir=/run/user/1000/.stecco-google-chrome)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

Maybbe vfat doesn't support it

Offline

#13 2015-09-15 19:01:23

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: [SOLVED] - SSD's fstab

stecco wrote:

EDIT
Maybe I got it.
Regarding moving  the compiling working directory to tmpfs, just commented out the BUILDDIR=/tmp/makepkg line and modify fstab adding something like

tmpfs   /tmp/makepkg    tmpfs   exec 0 0

according to the purple note in the wiki page.

That's because, quoting archwiki,

Arch uses a tmpfs /run directory, with /var/run and /var/lock simply existing as symlinks for compatibility. It is also used for /tmp by the default systemd setup and does not require an entry in fstab unless a specific configuration is needed

Please correct me if I'm wrong!!!!

You do not need an fstab entry for this, for consistent builddir in /tmp/makepkg you only need to edit the /etc/makepkg.conf file

Offline

#14 2015-09-15 22:33:21

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

Thanks Tutti, but maybe have I to mkdir /etc/makepkg folder instead?

Offline

#15 2015-09-15 23:44:35

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [SOLVED] - SSD's fstab

stecco wrote:

Thanks Tutti, but maybe have I to mkdir /etc/makepkg folder instead?

No. Why would you want to do this?


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#16 2015-09-17 08:31:16

stecco
Member
Registered: 2013-07-16
Posts: 40

Re: [SOLVED] - SSD's fstab

I don't now dice... I thought it because basically I'm a newbie: I'd ls the /tmp folder and I didn't see a makepkg folder so I thoght I'd to make it!

However, thanks to everyone: seems that I solved my issues!!

Last edited by stecco (2015-09-17 09:11:16)

Offline

Board footer

Powered by FluxBB