If your example fstab entry is accurate, you have specified a valid size as 2g
. But the dmesg
output shows 2.0G
. I don't know what's up with that. Did you make a mistake? There are lots of other ways to specify the size. Try specifying it in bytes, since it's the default. That would be 2147483648
or so I believe.
mount
man page:
Mount options for tmpfs
size=nbytes
Override default maximum size of the filesystem. The size is given in bytes, and rounded up to entire pages. The default is half of the memory. The size parameter also accepts a suffix % to
limit this tmpfs instance to that percentage of your physical RAM: the default, when neither size nor nr_blocks is specified, is size=50%
nr_blocks=
The same as size, but in blocks of PAGE_CACHE_SIZE
nr_inodes=
The maximum number of inodes for this instance. The default is half of the number of your physical RAM pages, or (on a machine with highmem) the number of lowmem RAM pages, whichever is the
lower.
The tmpfs mount options for sizing (size, nr_blocks, and nr_inodes) accept a suffix k, m or g for Ki, Mi, Gi (binary kilo (kibi), binary mega (mebi) and binary giga (gibi)) and can be changed on
remount.
And just to make sure, you have enough memory right? Just in case the error is incorrect... the default is to use 50% of your memory as a maximum.
EDIT:
I noticed you edited your question and changed the fstab line from 2g
to 2.0G
. Was that the problem? You haven't reported back. Did trying 2g
or bytes work?