Systemd Read-only Filesystem

923 views
Skip to first unread message

tra...@sharpspring.com

unread,
Feb 19, 2015, 12:56:38 PM2/19/15
to coreo...@googlegroups.com
Just getting my feet wet with CoreOS and running into some beginner's issues. I'm working through this document on the CoreOS website:

https://coreos.com/docs/launching-containers/launching/getting-started-with-systemd/

After trying to add hello.service to /etc/systemd/system, I see that the filesystem is mounted read-only. The aforementioned guide mentions that the filesystem should be read/write. Is this something that has changed recently, and how do I go about adding unit files with the new scheme?

Secondly, I'm really interested in modifying docker's behavior. In particular, I want to change its TMPDIR as the 500M provided by CoreOS is too small to deploy my git repository to the docker image I'm building. Any pointers on how to accomplish this specific task would be highly appreciated.

Alex Polvi

unread,
Feb 19, 2015, 1:09:58 PM2/19/15
to tra...@sharpspring.com, coreos-user

On Thu, Feb 19, 2015 at 9:56 AM, <tra...@sharpspring.com> wrote:
/etc/systemd/system

This should not be read-only. Could you respond with what commands you are trying to run and the output of "df". Thanks.

-Alex

Travis Whitton

unread,
Feb 19, 2015, 1:13:19 PM2/19/15
to coreo...@googlegroups.com, tra...@sharpspring.com
localhost system # cd /etc/systemd/system
localhost system # touch test.service
touch: cannot touch 'test.service': Read-only file system

Running via vagrant...

$ cat Vagrantfile
Vagrant.configure(2) do |config|
  config.vm.box = "coreos"
  config.vm.network "private_network",
          ip: "172.12.8.10"
end

localhost system # cat /etc/os-release
NAME=CoreOS
ID=coreos
VERSION=254.0.0
VERSION_ID=254.0.0
BUILD_ID=
PRETTY_NAME="CoreOS 254.0.0 (Official Build) dev-channel amd64-generic test"
ANSI_COLOR="1;32"

localhost system # df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs         1008M  277M  732M  28% /
devtmpfs        489M     0  489M   0% /dev
tmpfs           500M     0  500M   0% /dev/shm
tmpfs           500M  196K  499M   1% /run
tmpfs           500M     0  500M   0% /sys/fs/cgroup
/dev/sda3      1008M  277M  732M  28% /
tmpfs           500M     0  500M   0% /tmp
tmpfs           500M     0  500M   0% /media
/dev/sda6       108M   80K   99M   1% /usr/share/oem
/dev/sda9        16G  682M   15G   5% /media/state
/dev/sda9        16G  682M   15G   5% /home
/dev/sda9        16G  682M   15G   5% /opt
/dev/sda9        16G  682M   15G   5% /srv
/dev/sda9        16G  682M   15G   5% /var

localhost system # mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=500720k,nr_inodes=125180,mode=755)
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 /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
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)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
/dev/sda3 on / type ext4 (ro,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/sda6 on /usr/share/oem type ext4 (rw,nodev,relatime,commit=600,data=ordered)
/dev/sda9 on /media/state type ext4 (rw,relatime,commit=600,data=ordered)
/dev/sda9 on /home type ext4 (rw,relatime,commit=600,data=ordered)
/dev/sda9 on /opt type ext4 (rw,relatime,commit=600,data=ordered)
/dev/sda9 on /srv type ext4 (rw,relatime,commit=600,data=ordered)
/dev/sda9 on /var type ext4 (rw,relatime,commit=600,data=ordered)

Alex Polvi

unread,
Feb 19, 2015, 1:15:49 PM2/19/15
to Travis Whitton, coreos-user, travis

On Thu, Feb 19, 2015 at 10:13 AM, Travis Whitton <tinymo...@gmail.com> wrote:
VERSION=254.0.0

This is the issue. This is a very old version. Please update your vagrant by using the latest version here:


Latest releases are here: https://coreos.com/releases/

-Alex

Travis Whitton

unread,
Feb 19, 2015, 1:22:32 PM2/19/15
to coreo...@googlegroups.com, tinymo...@gmail.com, tra...@sharpspring.com
Makes sense, thanks for the help!
Reply all
Reply to author
Forward
0 new messages