Bug 135710 - mount(8): mount -t tmpfs does not follow 'size' option
Summary: mount(8): mount -t tmpfs does not follow 'size' option
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-18 17:50 UTC by Michael Jung
Modified: 2010-09-13 16:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jung 2009-06-18 17:50:01 UTC
mount -o size=6442450944 -t tmpfs tmpfs /mnt

This should create a 6GB file system, but instead I get 

tmpfs                      2097152          4   2097148     0%    /mnt

mount -o size=5368709120 -t tmpfs tmpfs /mnt
should create a 5GB file system but instead I get

tmpfs                      1.0G    4.0K    1.0G     0%    /mnt

Additionally size will accept alpha character without complaining.

How-To-Repeat: use above commands
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2009-06-21 10:45:21 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

reassign to fs team
Comment 2 Remko Lodder freebsd_committer freebsd_triage 2009-06-22 21:52:20 UTC
State Changed
From-To: open->closed

Nathanael gave a pretty good explaination which I follow; the behaviour 
is intended.
Comment 3 Nick Hibma 2010-09-13 15:01:06 UTC
So, what exactly is one to do to set the size to a specific amount? Or =
is it automatic? I cannot find ANY information on this (the size of =
tmpfs).

Nick Hibma
AnyWi Technologies
Comment 4 olli 2010-09-13 16:16:01 UTC
Nick Hibma <nick@anywi.com> wrote:
 > So, what exactly is one to do to set the size to a specific amount?
 > Or is it automatic? I cannot find ANY information on this (the size
 > of tmpfs).

Did you read Nathanael's reply?  I think it explains it all:

http://lists.freebsd.org/pipermail/freebsd-fs/2009-June/006368.html

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"... there are two ways of constructing a software design:  One way
is to make it so simple that there are _obviously_ no deficiencies and
the other way is to make it so complicated that there are no _obvious_
deficiencies."        -- C.A.R. Hoare, ACM Turing Award Lecture, 1980