I'm running RHEL 7.2 in Amazon Web Services and am trying to make my /tmp
use an attached 10 GB volume /dev/xvdh
. Data does not need to persist, but I have to have a bigger volume just for tmp, because of a customer requirement. Here's the entry in my fstab
.
/dev/xvdh /tmp xfs defaults,nofail 0 2
When I run sudo mount -a
, I don't get any errors, and yet, when I reboot, I don't see this mounting when I run lsblk
, as seen below.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 10G 0 disk
├─xvda1 202:1 0 1M 0 part
└─xvda2 202:2 0 10G 0 part /
xvdb 202:16 0 8G 0 disk /grid/01
xvdc 202:32 0 8G 0 disk /grid/02
xvdd 202:48 0 8G 0 disk /grid/03
xvde 202:64 0 8G 0 disk /grid/04
xvdf 202:80 0 8G 0 disk /grid/05
xvdg 202:96 0 20G 0 disk /var/log
xvdh 202:112 0 10G 0 disk
Got any pointers? The drive definitely exists...
I was asked to add the output of mount
, here it is:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=484472k,nr_inodes=121118,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 (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)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
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/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/xvda2 on / type xfs (rw,relatime,attr2,inode64,noquota)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
/dev/xvdb on /grid/01 type xfs (rw,relatime,attr2,inode64,noquota)
/dev/xvde on /grid/04 type xfs (rw,relatime,attr2,inode64,noquota)
/dev/xvdd on /grid/03 type xfs (rw,relatime,attr2,inode64,noquota)
/dev/xvdg on /var/log type xfs (rw,relatime,attr2,inode64,noquota)
/dev/xvdf on /grid/05 type xfs (rw,relatime,attr2,inode64,noquota)
/dev/xvdc on /grid/02 type xfs (rw,relatime,attr2,inode64,noquota)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=101548k,mode=700,uid=1000,gid=1000)
here's the output of df /tmp
:
/dev/xvda2 10473452 1603440 8870012 16% /
Edit: Like Edison says...
Well, I found another way that won't work. Per this thread, I tried masking this file /usr/lib/systemd/system/tmp.mount
, but my mapping for /tmp
still wouldn't work on reboot. So then I tried renaming the file, also didn't work. I restored the file and removed the mask.
ls -l / | awk '/tmp/{print $1}'
after you manually mount/tmp
? – Kira Jan 04 '16 at 21:41drwxrwxrwt
are the permissions when I run that command. – FoxDeploy Jan 04 '16 at 21:47mount
anddf /tmp
. – Gilles 'SO- stop being evil' Jan 05 '16 at 00:01nofail
option suppresses error messages. Try removing it and rebooting and see if there are error messages while booting. – Mark Plotnick Jan 05 '16 at 00:08/tmp
a symlink (and if so to what)? Is thetmp.mount
unit active (systemd status tmp.mount
)? – Gilles 'SO- stop being evil' Jan 05 '16 at 10:25tmp.mount
service, and now the mapping is working! I'll check and verify that it persists through a reboot! – FoxDeploy Jan 05 '16 at 14:32