LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2019, 01:58 PM   #1
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Rep: Reputation: Disabled
tmpfs mounting


Hi! I usually am able to find good resources on the redhat website but my recent error is not well documented, or, I am unable to find a resolution. I recently upgraded from rhel 7.6 to 7.7 and at boot seconds before the login page the following error is displayed:

tmpfs bad mount option huge

What is the cause of this and can I fix this?

Thanks All!

Last edited by carman; 08-09-2019 at 09:00 PM. Reason: Removed a second question
 
Old 08-09-2019, 09:17 PM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,492

Rep: Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921
tmpfs does have a mount option "huge", but the documentation says that it should be "huge=never", "huge=always" etc. I am not sure what exactly it is about, but I guess it improves performance for big files.

I would check what is in /etc/fstab. Perhaps a syntax error that leads to this message. I would also check if /tmp is mounted as a tmpfs filesystem (which is an in-memory filesystem) and see what happens when I manually mount it using the options in /etc/fstab.

To resolve this, you could correct any syntax error in /etc/fstab or simply remove the huge option from it. You could also configure your system not to use tmpfs.
 
1 members found this post helpful.
Old 08-09-2019, 09:51 PM   #3
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Original Poster
Rep: Reputation: Disabled
tmpfs mounting error

Here's my fstab, I think it's ok, I took out the uuid numbers and computer name those are correct.
Code:
#
# /etc/fstab
# Created by anaconda on Sun Jul  7 14:30:11 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/[this is correct]-root /                       xfs     defaults        0 0
UUID=[this is correct] /boot                   xfs     defaults        0 0
UUID=[this is correct]         /boot/efi               vfat    umask=0077,shortname=winnt 0 0
UUID=[this is correct] /MTJhome ext4 defaults 0 0
/dev/mapper/[this is correct]-home /home                   xfs     defaults        0 0
/dev/mapper/[this is correct]-swap swap                    swap    defaults        0 0

Last edited by carman; 08-09-2019 at 10:05 PM. Reason: took out computer name
 
Old 08-09-2019, 11:27 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,148

Rep: Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935Reputation: 2935
Not supported on RHEL kernels unless they have back-ported - which they commonly do. Push a bug report to RHEL.
 
1 members found this post helpful.
Old 08-10-2019, 09:08 AM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,492

Rep: Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921
Since it is not mounted via fstab, I guess the mount options are in the system mount unit for /tmp (https://www.freedesktop.org/software...emd.mount.html). I would check there.
 
1 members found this post helpful.
Old 08-10-2019, 11:15 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,048

Rep: Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893
Assuming you have subscription and as as suggested I would contact RH for help.

Is /tmp mounted as tmpfs? Look at the output of the command:
systemctl status tmp.mount

There are many tmpfs filesystems and it may not be /tmp. Look at the output of the command
df -hP

I don't know if there are any differences between RH 7 and CentOS 7 but here is one of my CentOS 7 systems as an example.
Code:
/dev/mapper/centos-root   50G  7.5G   43G  15% /
devtmpfs                 5.8G     0  5.8G   0% /dev
tmpfs                    5.8G     0  5.8G   0% /dev/shm
tmpfs                    5.8G  9.7M  5.8G   1% /run
tmpfs                    5.8G     0  5.8G   0% /sys/fs/cgroup
/dev/sda1               1014M  225M  790M  23% /boot
/dev/mapper/centos-home  877G   27G  851G   4% /home
tmpfs                    1.2G  4.0K  1.2G   1% /run/user/42
tmpfs                    1.2G   20K  1.2G   1% /run/user/1001
There could be several locations where the error could be located with the default being /usr/lib/tmpfiles.d. See the man pages for tmpfiles.d for more details.

https://developers.redhat.com/blog/2...iles-on-rhel7/
 
1 members found this post helpful.
Old 08-10-2019, 10:28 PM   #7
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Assuming you have subscription and as as suggested I would contact RH for help.

Is /tmp mounted as tmpfs? Look at the output of the command:
systemctl status tmp.mount
I do have a red hat subscription but I use the developer version as I use it for school and cadence simulations, so I don't think I can ask for help, I can report a bug on bugzilla but I'm not exactly sure what the problem is yet.
Code:
● tmp.mount - Temporary Directory
   Loaded: loaded (/usr/lib/systemd/system/tmp.mount; disabled; vendor preset: disabled)
   Active: inactive (dead)
    Where: /tmp
     What: tmpfs
     Docs: man:hier(7)
           http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
Says it's inactive, should this be a concern?

Quote:
Originally Posted by michaelk View Post
There are many tmpfs filesystems and it may not be /tmp. Look at the output of the command
df -hP

There could be several locations where the error could be located with the default being /usr/lib/tmpfiles.d. See the man pages for tmpfiles.d for more details.
Code:
Filesystem                              Size  Used Avail Use% Mounted on
devtmpfs                                7.7G     0  7.7G   0% /dev
tmpfs                                   7.7G   42M  7.7G   1% /dev/shm
tmpfs                                   7.7G  9.7M  7.7G   1% /run
tmpfs                                   7.7G     0  7.7G   0% /sys/fs/cgroup
/dev/mapper/rhel_desktop--rimlh1t-root   50G   17G   34G  33% /
/dev/loop0                               89M   89M     0 100% /var/lib/snapd/snap/core/7270
/dev/sda2                              1014M  275M  740M  28% /boot
/dev/sdb1                               917G  4.4G  866G   1% /MTJhome
/dev/sda1                               200M  9.8M  190M   5% /boot/efi
/dev/mapper/rhel_desktop--rimlh1t-home  391G   61G  331G  16% /home
tmpfs                                   1.6G   28K  1.6G   1% /run/user/1000
I'm not sure what I should be looking for, I see that run and shm and cgroup are all on tmpfs, but is that okay?

Lastly:
Should I be worried about computer names and privacy when posting these outputs?

Thanks!

Last edited by carman; 08-10-2019 at 10:33 PM. Reason: Extra Question
 
Old 08-11-2019, 04:57 AM   #8
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,492

Rep: Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921
Quote:
Originally Posted by carman View Post
I do have a red hat subscription but I use the developer version as I use it for school and cadence simulations, so I don't think I can ask for help, I can report a bug on bugzilla but I'm not exactly sure what the problem is yet.
Code:
● tmp.mount - Temporary Directory
   Loaded: loaded (/usr/lib/systemd/system/tmp.mount; disabled; vendor preset: disabled)
   Active: inactive (dead)
    Where: /tmp
     What: tmpfs
     Docs: man:hier(7)
           http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
Says it's inactive, should this be a concern?
I suppose it means that it has not been mounted. Also, it is disabled, which means that there won't be any attempt to activate it when the system starts. Thus I think this is not going to lead anywhere, but you could check how this mount is defined by looking at /usr/lib/systemd/system/tmp.mount (it's a text file, probably not longer than 15-20 lines).

There might be other mount units, perhaps one of them has this huge option. You can find them with
Code:
systemctl list-unit-files --type mount
 
1 members found this post helpful.
Old 08-11-2019, 05:56 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,048

Rep: Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893
No worries and nothing posted could actually identify your computer.

Nothing wrong. It just means /tmp is not using tmpfs and still part of the /(root) filesystem.

At first glance the tmpfs filesystems look normal but don't know the exact differences between centos and rhel.
 
1 members found this post helpful.
Old 08-16-2019, 02:50 PM   #10
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I suppose it means that it has not been mounted. Also, it is disabled, which means that there won't be any attempt to activate it when the system starts. Thus I think this is not going to lead anywhere, but you could check how this mount is defined by looking at /usr/lib/systemd/system/tmp.mount (it's a text file, probably not longer than 15-20 lines).
Here's the text file for tmp.mount:
Code:
[Unit]
Description=Temporary Directory
Documentation=man:hier(7)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/tmp
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target

[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime

# Make 'systemctl enable tmp.mount' work:
[Install]
WantedBy=local-fs.target
Does the code above mean it's supposed to mount? Also I'm running this as a desktop, do I need strictatime?
Quote:
Originally Posted by berndbausch View Post
There might be other mount units, perhaps one of them has this huge option. You can find them with
Code:
systemctl list-unit-files --type mount
Running this code I didn't see any with a huge mount option; is it possible that tmp is trying to mount on tmpfs but since the huge option is not good it just disables it?

Thanks again for all the help!

Last edited by carman; 08-16-2019 at 02:55 PM. Reason: for clarity
 
Old 08-17-2019, 12:17 AM   #11
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Original Poster
Rep: Reputation: Disabled
So I also took a look at the boot.log file in the /var/log directory and strangely enough I didn't see the error. I did however see the error that network.service wouldn't startup, although I was able to determine that it didn't work because I wasn't connected to the LAN, instead I'm using wifi.
 
Old 08-17-2019, 01:35 AM   #12
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,492

Rep: Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921Reputation: 921
While we have not found out where the huge comes from, you could enable the tmp mount. The effect, I think, is that /tmp will be mounted as a RAM filesystem when your computer boots up:
Code:
# systemctl enable tmp.mount 
# reboot
Alternatively, you could put a line for /tmp in /etc/fstab.

Or, if you don't want to have a RAM-based /tmp, just leave things as they are.

Other than that, I think that the error message you see whizzing by doesn't cause any harm.

Last edited by berndbausch; 08-17-2019 at 01:36 AM. Reason: style
 
1 members found this post helpful.
Old 08-17-2019, 08:23 PM   #13
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
While we have not found out where the huge comes from, you could enable the tmp mount. The effect, I think, is that /tmp will be mounted as a RAM filesystem when your computer boots up:
Code:
# systemctl enable tmp.mount 
# reboot
Alternatively, you could put a line for /tmp in /etc/fstab.

Or, if you don't want to have a RAM-based /tmp, just leave things as they are.

Other than that, I think that the error message you see whizzing by doesn't cause any harm.
I'd really like to figure out the problem, it seems to be slowing down my boot process; I have a laptop with a new ssd and 16gb of ram, should be a 5-10sec startup, instead it's about 20-30 (To the login screen).
 
Old 08-17-2019, 10:19 PM   #14
carman
LQ Newbie
 
Registered: Aug 2019
Posts: 11

Original Poster
Rep: Reputation: Disabled
When I ran
Code:
dmesg
I get:
Code:
[    1.550991] usbcore: registered new interface driver rtsx_usb
[    1.589692] tmpfs: Bad mount option huge
[    1.595608] [drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-22).
What do you all think? Is this related to the dev-hugepages.mount?
 
Old 09-19-2019, 05:24 AM   #15
secan
LQ Newbie
 
Registered: Sep 2019
Posts: 2

Rep: Reputation: Disabled
Same issue here too, on CenOS 7.7. I've found that the "huge" mount option of tmpfs is only supported from Linux 4.7.0 (which I suppose is the Kernel version). Taking into consideration that RHEL 7.7 & CentOS 7.7 rely on the same kernel version 3.10.x, most likely the current kernel doesn't recognizes the mount option. A workaround would be to remove the huge option line.

huge=huge_option (since Linux 4.7.0)
Set the huge table memory allocation policy for all files in
this instance (if CONFIG_TRANSPARENT_HUGE_PAGECACHE is
enabled).

The huge_option value is one of the following:

never Do not allocate huge pages. This is the default.

always Attempt to allocate huge pages every time a new page is
needed.

within_size
Only allocate huge page if it will be fully within
i_size. Also respect fadvise(2)/madvise(2) hints

advise Only allocate huge pages if requested with
fadvise(2)/madvise(2).

deny For use in emergencies, to force the huge option off
from all mounts.

force Force the huge option on for all mounts; useful for
testing.

If the issue due to my findings, most likely it will be patched in the future by RHEL & CentOS teams.

Did anyone found any workaround to solve this?
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reducing writes to SSD: mounting /var (and others) on RAM disks (tmpfs). sysfce2 Slackware 7 08-26-2011 02:00 AM
/etc/fstab "tmpfs /tmp tmpfs defaults 0 0" ramfs?! HOW? xcislav Linux - General 2 06-04-2011 03:03 AM
help w/ linuxrc and mounting tmpfs after netboot rrlangly Linux - General 1 05-25-2010 06:36 PM
LXer: Speed up Firefox by mounting the profile in tmpfs (RAM) [Linux only] LXer Syndicated Linux News 0 05-04-2009 09:11 AM
Mounting /var/log as a tmpfs mr666white Linux - Laptop and Netbook 2 12-06-2004 08:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration