I have an existing VM with an application installed and would like to move /tmp to a separate partition.
I did the following
1) add new disk
2) create partition on that disk (cfdisk)
3) create xfs filesystem on that partition (mkfs.xfs /dev/sdb1)
4) tested a manual mount - works
5) added tmp directory on that new filesystem with chmod 1777 (I also tried without tmp folder)
6) edited fstab and added /tmp to /etc/fstab
Code: Select all
/dev/mapper/centos-root / xfs defaults 1 1
UUID=eaae7e0c-f069-4071-8852-708cefbc9bc1 /boot xfs defaults 1 2
UUID=f408b19f-ceb3-45af-a59d-23fe93851e07 /tmp xfs defaults 1 2
/dev/mapper/centos-swap swap swap defaults 0 0
8) created new /tmp in single mode (tried first without)
the result of all my tries it that /tmp is not mounted automatically which results in a readonly root-filesystem
If I do "mount -a", it mounts correctly but it does not work during boot.
Code: Select all
uname -a
Linux application1 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Code: Select all
failed to start dynamic system tuning daemon
Code: Select all
# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=933444k,nr_inodes=233361,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,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)
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/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/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/centos-root on / type xfs (ro,relatime,seclabel,attr2,inode64,noquota)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
sunrpc on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
Code: Select all
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 38G 27G 11G 72% /
devtmpfs 912M 0 912M 0% /dev
tmpfs 921M 4.0K 921M 1% /dev/shm
tmpfs 921M 8.7M 912M 1% /run
tmpfs 921M 0 921M 0% /sys/fs/cgroup
/dev/sda1 497M 119M 379M 24% /boot
Code: Select all
# mount -a
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 38G 27G 11G 72% /
devtmpfs 912M 0 912M 0% /dev
tmpfs 921M 4.0K 921M 1% /dev/shm
tmpfs 921M 8.7M 912M 1% /run
tmpfs 921M 0 921M 0% /sys/fs/cgroup
/dev/sda1 497M 119M 379M 24% /boot
/dev/sdb1 1021M 33M 989M 4% /tmp
Thanks,
Thorben