Bug#851492: [systemd] tmpfs size mount option not correct when expressed in %

Sven Joachim svenjoac at gmx.de
Sun Jan 15 21:17:04 GMT 2017


On 2017-01-15 16:14 +0100, Pascal Dormeau wrote:

> Systemd does not mount tmpfs file systems with the correct size when
> the size is expressed in % of physical RAM in /etc/fstab.
>
> I guess it does not read at all the % character, and the size is read in
> bytes. size=5% or size=10% results into file systems with a 4 k
> size (man mount says "The size is given in bytes, and rounded up  to
> entire  pages").

This is confirmed by "systemctl show tmpfs.mount".

Where=/tmp
What=tmpfs
Options=rw,nosuid,nodev,relatime,size=4k
Type=tmpfs
TimeoutUSec=1min 30s
ControlPID=0
DirectoryMode=0755
SloppyOptions=no
LazyUnmount=no
ForceUnmount=no
Result=success
UID=4294967295
GID=4294967295
Slice=system.slice
ControlGroup=/system.slice/tmp.mount
MemoryCurrent=18446744073709551615
CPUUsageNSec=18446744073709551615
TasksCurrent=0
Delegate=no
CPUAccounting=no
CPUWeight=18446744073709551615
StartupCPUWeight=18446744073709551615
CPUShares=18446744073709551615
StartupCPUShares=18446744073709551615
CPUQuotaPerSecUSec=infinity
IOAccounting=no
IOWeight=18446744073709551615
StartupIOWeight=18446744073709551615
BlockIOAccounting=no
BlockIOWeight=18446744073709551615
StartupBlockIOWeight=18446744073709551615
MemoryAccounting=no
MemoryLow=0
MemoryHigh=18446744073709551615
MemoryMax=18446744073709551615
MemorySwapMax=18446744073709551615
MemoryLimit=18446744073709551615
DevicePolicy=auto
TasksAccounting=yes
TasksMax=4915
UMask=0022
LimitCPU=18446744073709551615
LimitCPUSoft=18446744073709551615
LimitFSIZE=18446744073709551615
LimitFSIZESoft=18446744073709551615
LimitDATA=18446744073709551615
LimitDATASoft=18446744073709551615
LimitSTACK=18446744073709551615
LimitSTACKSoft=8388608
LimitCORE=18446744073709551615
LimitCORESoft=0
LimitRSS=18446744073709551615
LimitRSSSoft=18446744073709551615
LimitNOFILE=4096
LimitNOFILESoft=1024
LimitAS=18446744073709551615
LimitASSoft=18446744073709551615
LimitNPROC=13329
LimitNPROCSoft=13329
LimitMEMLOCK=65536
LimitMEMLOCKSoft=65536
LimitLOCKS=18446744073709551615
LimitLOCKSSoft=18446744073709551615
LimitSIGPENDING=13329
LimitSIGPENDINGSoft=13329
LimitMSGQUEUE=819200
LimitMSGQUEUESoft=819200
LimitNICE=0
LimitNICESoft=0
LimitRTPRIO=0
LimitRTPRIOSoft=0
LimitRTTIME=18446744073709551615
LimitRTTIMESoft=18446744073709551615
OOMScoreAdjust=0
Nice=0
IOScheduling=0
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
TimerSlackNSec=50000
CPUSchedulingResetOnFork=no
NonBlocking=no
StandardInput=null
StandardOutput=inherit
StandardError=inherit
TTYReset=no
TTYVHangup=no
TTYVTDisallocate=no
SyslogPriority=30
SyslogLevelPrefix=yes
SyslogLevel=6
SyslogFacility=3
SecureBits=0
CapabilityBoundingSet=18446744073709551615
AmbientCapabilities=0
DynamicUser=no
RemoveIPC=no
MountFlags=0
PrivateTmp=no
PrivateDevices=no
ProtectKernelTunables=no
ProtectKernelModules=no
ProtectControlGroups=no
PrivateNetwork=no
PrivateUsers=no
ProtectHome=no
ProtectSystem=no
SameProcessGroup=yes
UtmpMode=init
IgnoreSIGPIPE=yes
NoNewPrivileges=no
SystemCallErrorNumber=0
RuntimeDirectoryMode=0755
MemoryDenyWriteExecute=no
RestrictRealtime=no
KillMode=control-group
KillSignal=15
SendSIGKILL=yes
SendSIGHUP=no
Id=tmp.mount
Names=tmp.mount
Requires=-.mount system.slice
RequiredBy=systemd-timesyncd.service local-fs.target systemd-resolved.service
WantedBy=basic.target
Conflicts=umount.target
Before=umount.target basic.target systemd-timesyncd.service systemd-resolved.service local-fs.target
After=system.slice -.mount local-fs-pre.target
RequiresMountsFor=/
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Description=/tmp
LoadState=loaded
ActiveState=active
SubState=mounted
FragmentPath=/run/systemd/generator/tmp.mount
SourcePath=/etc/fstab
UnitFileState=generated
UnitFilePreset=enabled
StateChangeTimestamp=Sun 2017-01-15 22:07:46 CET
StateChangeTimestampMonotonic=6594662
InactiveExitTimestamp=Sun 2017-01-15 22:07:46 CET
InactiveExitTimestampMonotonic=6587234
ActiveEnterTimestamp=Sun 2017-01-15 22:07:46 CET
ActiveEnterTimestampMonotonic=6593838
ActiveExitTimestampMonotonic=0
InactiveEnterTimestampMonotonic=0
CanStart=yes
CanStop=yes
CanReload=yes
CanIsolate=no
StopWhenUnneeded=no
RefuseManualStart=no
RefuseManualStop=no
AllowIsolate=no
DefaultDependencies=yes
OnFailureJobMode=replace
IgnoreOnIsolate=yes
NeedDaemonReload=no
JobTimeoutUSec=infinity
JobTimeoutAction=none
ConditionResult=yes
AssertResult=yes
ConditionTimestamp=Sun 2017-01-15 22:07:46 CET
ConditionTimestampMonotonic=6584057
AssertTimestamp=Sun 2017-01-15 22:07:46 CET
AssertTimestampMonotonic=6584058
Transient=no
Perpetual=no
StartLimitIntervalSec=10000000
StartLimitBurst=5
StartLimitAction=none
InvocationID=c1fb609db44541d2a31fd50a5822c6ac




More information about the Pkg-systemd-maintainers mailing list