You are not logged in.
Hi everyone.
I do some maintenance on my pc and i've a little doubt, i hope someone can reselve it.
So i've hdd+sdd and i make this partition:
:::➤cat /etc/fstab
# /dev/nvme0n1p1
UUID=019F-1740 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/nvme0n1p2
UUID=b579874c-05c8-4bba-b17f-3f9cabfe2102 / ext4 rw,relatime 0 1
# /dev/sda3
UUID=f1869dc1-b903-418e-a4cc-cefe942ada6a /root ext4 rw,relatime 0 2
# /dev/sda4
UUID=1f341ba6-bef1-40b9-a1a4-3ed1d5c4f813 /dev ext4 rw,relatime 0 2
# /dev/sda5
UUID=7e0fb395-b494-425e-908f-060fca6fdcf7 /media ext4 rw,relatime 0 2
# /dev/sda6
UUID=b39599af-fbae-4d8c-9515-9b9e4d889293 /mnt ext4 rw,relatime 0 2
# /dev/sda7
UUID=b9a8f37e-e3bf-4681-80f7-17217ba336a0 /opt ext4 rw,relatime 0 2
# /dev/sda8
UUID=2062db45-2485-4215-86fc-1136305e7000 /var ext4 rw,relatime 0 2
# /dev/sda9
UUID=954bb453-e15f-40c0-82c8-aa4afd4e7d7a /run ext4 rw,relatime 0 2
# /dev/sda10
UUID=7184e7f1-a2d7-49cd-9c20-ae7ca15b2ffa /tmp ext4 rw,relatime 0 2
# /dev/sda11
UUID=87ba625a-f8f7-45fa-b987-8664ac907463 /srv ext4 rw,relatime 0 2
# /dev/sda12
UUID=30a44c49-6761-4e1b-b622-24b91fe236da none swap defaults 0 0
# /dev/mapper/criptone
UUID=a96b98ef-20ca-4bc2-917c-303cc8ea6374 /home ext4 rw,relatime 0 2:::➤lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 16M 0 part
├─sda2 8:2 0 488,3G 0 part
├─sda3 8:3 0 10G 0 part /root
├─sda4 8:4 0 2,5G 0 part
├─sda5 8:5 0 1G 0 part /media
├─sda6 8:6 0 1G 0 part /mnt
├─sda7 8:7 0 2,5G 0 part /opt
├─sda8 8:8 0 10G 0 part /var
├─sda9 8:9 0 1G 0 part
├─sda10 8:10 0 15G 0 part /tmp
├─sda11 8:11 0 1G 0 part /srv
├─sda12 8:12 0 20G 0 part [SWAP]
└─sda13 8:13 0 379,3G 0 part
└─criptone 254:0 0 379,2G 0 crypt /home
nvme0n1 259:0 0 238,5G 0 disk
├─nvme0n1p1 259:1 0 550M 0 part /boot/efi
└─nvme0n1p2 259:2 0 238G 0 part /:::➤findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/nvme0n1p2 ext4 rw,relatime
├─/proc proc proc rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=44,pgrp=1,timeout=0,minproto=5,maxproto=5,
│ └─/proc/sys/fs/binfmt_misc binfmt_misc binfmt_mis rw,nosuid,nodev,noexec,relatime
├─/sys sys sysfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/firmware/efi/efivars efivarfs efivarfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup tmpfs tmpfs ro,nosuid,nodev,noexec,mode=755
│ │ ├─/sys/fs/cgroup/unified cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate
│ │ ├─/sys/fs/cgroup/systemd cgroup cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd
│ │ ├─/sys/fs/cgroup/net_cls,net_prio
│ │ │ cgroup cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio
│ │ ├─/sys/fs/cgroup/cpu,cpuacct cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct
│ │ ├─/sys/fs/cgroup/freezer cgroup cgroup rw,nosuid,nodev,noexec,relatime,freezer
│ │ ├─/sys/fs/cgroup/blkio cgroup cgroup rw,nosuid,nodev,noexec,relatime,blkio
│ │ ├─/sys/fs/cgroup/perf_event cgroup cgroup rw,nosuid,nodev,noexec,relatime,perf_event
│ │ ├─/sys/fs/cgroup/devices cgroup cgroup rw,nosuid,nodev,noexec,relatime,devices
│ │ ├─/sys/fs/cgroup/rdma cgroup cgroup rw,nosuid,nodev,noexec,relatime,rdma
│ │ ├─/sys/fs/cgroup/memory cgroup cgroup rw,nosuid,nodev,noexec,relatime,memory
│ │ ├─/sys/fs/cgroup/cpuset cgroup cgroup rw,nosuid,nodev,noexec,relatime,cpuset
│ │ ├─/sys/fs/cgroup/pids cgroup cgroup rw,nosuid,nodev,noexec,relatime,pids
│ │ └─/sys/fs/cgroup/hugetlb cgroup cgroup rw,nosuid,nodev,noexec,relatime,hugetlb
│ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/debug debugfs debugfs rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config configfs configfs rw,nosuid,nodev,noexec,relatime
├─/dev dev devtmpfs rw,relatime,size=8140072k,nr_inodes=2035018,mode=755
│ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev
│ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/mqueue mqueue mqueue rw,nosuid,nodev,noexec,relatime
│ └─/dev/hugepages hugetlbfs hugetlbfs rw,relatime,pagesize=2M
├─/run run tmpfs rw,relatime,mode=755
│ └─/run/user/1000 tmpfs tmpfs rw,nosuid,nodev,relatime,size=1630944k,mode=700,uid=1000,
├─/boot/efi /dev/nvme0n1p1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=
├─/srv /dev/sda11 ext4 rw,relatime
├─/tmp /dev/sda10 ext4 rw,relatime
├─/media /dev/sda5 ext4 rw,relatime
├─/opt /dev/sda7 ext4 rw,relatime
├─/root /dev/sda3 ext4 rw,relatime
├─/mnt /dev/sda6 ext4 rw,relatime
├─/var /dev/sda8 ext4 rw,relatime
└─/home /dev/mapper/criptone
ext4 rw,relatimesda1 and sda2 is for windows dual boot (Unfortunately i need to use if i want play with some game -.-'').
Anyway, reading tmpfs wiki a doubt arose.
As I understand it tmpfs mounts some partition in ram/swap, so in this case my /dev, /run, and other partition is mounted so. But is better that also /tmp is mounted as tmpfs?
etc/fstab #with tmp as tmpfs
# /dev/nvme0n1p1
UUID=019F-1740 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/nvme0n1p2
UUID=b579874c-05c8-4bba-b17f-3f9cabfe2102 / ext4 rw,relatime 0 1
# /dev/sda3
UUID=f1869dc1-b903-418e-a4cc-cefe942ada6a /root ext4 rw,relatime 0 2
# /dev/sda4
UUID=1f341ba6-bef1-40b9-a1a4-3ed1d5c4f813 /dev ext4 rw,relatime 0 2
# /dev/sda5
UUID=7e0fb395-b494-425e-908f-060fca6fdcf7 /media ext4 rw,relatime 0 2
# /dev/sda6
UUID=b39599af-fbae-4d8c-9515-9b9e4d889293 /mnt ext4 rw,relatime 0 2
# /dev/sda7
UUID=b9a8f37e-e3bf-4681-80f7-17217ba336a0 /opt ext4 rw,relatime 0 2
# /dev/sda8
UUID=2062db45-2485-4215-86fc-1136305e7000 /var ext4 rw,relatime 0 2
# /dev/sda9
UUID=954bb453-e15f-40c0-82c8-aa4afd4e7d7a /run ext4 rw,relatime 0 2
# /dev/sda10
tmpfs /tmp tmpfs rw,nodev,nosuid,size=2G 0 0 #OLD: UUID=7184e7f1-a2d7-49cd-9c20-ae7ca15b2ffa /tmp ext4 rw,relatime 0 2
# /dev/sda11
UUID=87ba625a-f8f7-45fa-b987-8664ac907463 /srv ext4 rw,relatime 0 2
# /dev/sda12
UUID=30a44c49-6761-4e1b-b622-24b91fe236da none swap defaults 0 0
# /dev/mapper/criptone
UUID=a96b98ef-20ca-4bc2-917c-303cc8ea6374 /home ext4 rw,relatime 0 2if yes is correct how i did change fstab?
and why other partition is automatic mounted as tmpsfs if isn't there option in fstab, is a default behavior?
thanks! (sorry my bad english)
Last edited by travelskid (2019-07-01 09:15:57)
Offline
systemd does many things by default, to get an idea what it mounts automagickally run
$ ls -l /usr/lib/systemd/system/*.mountSome comments wrt your setup :
# /dev/sda4
UUID=1f341ba6-bef1-40b9-a1a4-3ed1d5c4f813 /dev ext4 rw,relatime 0 2https://wiki.archlinux.org/index.php/Device_file
It doesn't make sense to have a disk partition for /dev and lslbk shows that partition is not mounted at all.
├─sda3 8:3 0 10G 0 part /root/root is the home folder for user root.
What things do you intend to do as user root that require 10 GiB ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
/root is the home folder for user root.
What things do you intend to do as user root that require 10 GiB ?
I don't do nothing in this folder unless login as root for solving problem or have some configurations as root (for example zshrc, etc..), but when i made partitions i didn't know how big I had to do it, so for any inconvenience i made 10 GiB.
It doesn't make sense to have a disk partition for /dev and lslbk shows that partition is not mounted at all.
Same thing for /dev and /run, when i install Arch i made all possible partition in hdd to preserve ssd writing cycles, but i didn't know that these were mounted in tmpfs
My question still remain... is better that i change /tmp as tmpfs? And in this case /tmp partition will not be used by hard disk?
Offline
by default /tmp is setup as tmpfs, if you want to use a disk partition for /tmp you'll have to block that.
see https://wiki.archlinux.org/index.php/Tm … atic_mount for details
Your main concern appears to be to reduce writes to an ssd .
This used to be a smart approach, but ssd software and technology has improved so far that's no longer necessary (and has been that way for a few years already).
example :
My primary drive is an nvme2 SSD of which the manufacturer states it can handle 150 TB writes.
# smartctl -a /dev/nvme0n1
smartctl 7.0 2018-12-30 r4883 [x86_64-linux-5.1.15-arch1-1-ARCH] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: Samsung SSD 970 EVO 250GB
Serial Number: S465NB0K532910V
Firmware Version: 1B2QEXE7
PCI Vendor/Subsystem ID: 0x144d
IEEE OUI Identifier: 0x002538
Total NVM Capacity: 250,059,350,016 [250 GB]
Unallocated NVM Capacity: 0
Controller ID: 4
Number of Namespaces: 1
Namespace 1 Size/Capacity: 250,059,350,016 [250 GB]
Namespace 1 Utilization: 165,758,976,000 [165 GB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 002538 5581b2955d
Local Time is: Tue Jul 2 18:07:13 2019 CEST
Firmware Updates (0x16): 3 Slots, no Reset required
Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Maximum Data Transfer Size: 512 Pages
Warning Comp. Temp. Threshold: 84 Celsius
Critical Comp. Temp. Threshold: 84 Celsius
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 6.20W - - 0 0 0 0 0 0
1 + 4.30W - - 1 1 1 1 0 0
2 + 2.10W - - 2 2 2 2 0 0
3 - 0.0400W - - 3 3 3 3 210 1200
4 - 0.0050W - - 4 4 4 4 2000 8000
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 29 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 13,914,751 [7.12 TB]
Data Units Written: 7,015,860 [3.59 TB]
Host Read Commands: 159,014,881
Host Write Commands: 75,925,083
Controller Busy Time: 352
Power Cycles: 439
Power On Hours: 331
Unsafe Shutdowns: 32
Media and Data Integrity Errors: 0
Error Information Log Entries: 7
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 29 Celsius
Temperature Sensor 2: 30 Celsius
Error Information (NVMe Log 0x01, max 64 entries)
No Errors Logged
# $ lsblk -f /dev/nvme0n1
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
nvme0n1
├─nvme0n1p1 ext4 c05eefba-c885-41ff-94a7-c4e6394b5e86 32.2G 52% /
├─nvme0n1p2 ext4 b43dedc6-2bdd-48bb-97da-d202f6b9ff73 48.4G 63% /home
└─nvme0n1p3 vfat B19D-6501 1.9G 0% /efi
$ My swapfile is 8 Gib and on the / partition .
I have this drive since early december, so i've written 3.59 TB to it in a bit over 6 months.
Most of this is pobably due to compiling mesa & llvm development versions several times a week.
Compiling big programs means a lot of temporary files are written.
Let's be pessimistic and say I write 10 TB per year.
That still means my ssd has 14+ years left before it can't write anymore.
How old is your sdd and what lifetime writes does the manufacturer state it has ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
It seems really complicated, unhandy and unflexable to have that many partitions. Especially if you don't have good estimates on how much space is needed. You might loose a lot for /home. Since many years I don't even have a separate /home partition anymore, since I have all of my files on a NAS and files on the PCs are only redundant or temporary. And if I mess up so badly that I would need to reinstall / I don't mind to loose all the configs in /home. But I guess it's a question of preference.
Offline