---
# System prepended metadata

title: containers storage reimplementation details

---

# containers storage reimplementation details

### rootfs
a rootfs is an ordered list of layers, stacked upon each other, often with a RW layer on top that allows for the rootfs to be writable, though not necessarily so.

rootfs trait has a list of layers, a name and ID to refer to it and some metadata

### ManagedRootfs
managed rootfs are a trait of Rootfs that takes in take RootfsManagerData, and return:
run_dir, root_dir

for this particular rootfs, as rootfs is mostly just an ID, and run_dir, root_dir are

where rm is RootfsManagerData and rfs is Rootfs

rm.Root/rm.DriverName/rfs.ID/"userdata"

so we need the information of RootfsManagerData to know these values

### layer
underneath a rootfs are layers. Layers can be RO or RW

the layer trait has: a path, a set of names it can be referred to as, an ID, metadata and whether it's RO or RW

### RootfsManager
container storage manager keeps track of the rootfs and layers, and connects them all to actual storage on the disk.

### RootfsManagerData
RootfsManagerData keeps track of the data portion of the RootfsManager structure.
This data includes 
run_root, graph_root, graph_driver_name (maybe, we're only supporting overlay), graph_driver_options