This makes it possible to create arbitrary tmpfs mounts
using the kickstart part command, for example:
part /tmp --fstype=tmpfs --size=700
part /foo --fstype=tmpfs --maxsize=500 --grow
And as --size only supports integers,
explicit size in % of RAM can be set like this:
part /bar --fstype=tmpfs --fsoptions="size=25%"
So far this works with kickstart,
custom partitioning seems to have some
issues with it and I'm investigating them.
Martin Kolman (1):
Add tmpfs support (#918621)
pyanaconda/kickstart.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--
1.8.3.1
Show replies by date
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/kickstart.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index a736972..5eda373 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -979,7 +979,10 @@ class PartitionData(commands.partition.F18_PartData):
mountpoint=self.mountpoint,
label=self.label,
fsprofile=self.fsprofile,
- mountopts=self.fsopts)
+ mountopts=self.fsopts,
+ size=self.size,
+ grow=self.grow,
+ maxsize=self.maxSizeMB)
if not kwargs["format"].type:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="The
\"%s\" filesystem type is not supported." % type)
@@ -1034,6 +1037,11 @@ class PartitionData(commands.partition.F18_PartData):
msg="Invalid target size (%d) for device %s" %
(self.size, device.name)))
devicetree.registerAction(ActionCreateFormat(device,
kwargs["format"]))
+ # tmpfs mounts are not disks and don't occupy a disk partition,
+ # so handle them here
+ elif self.fstype == "tmpfs":
+ request = storage.newTmpFS(**kwargs)
+ storage.createDevice(request)
else:
# If a previous device has claimed this mount point, delete the
# old one.
--
1.8.3.1