geom-tutorial
GEOM TutorialPoulHenning Kampphk@FreeBSD.orgOutline● Background and analysis.● The local architectural scenery● GEOM fundamentals.● (tea break)● Slicers (not a word about libdisk!)● Tales of the unexpected.● Q/A etc.UNIX Disk I/O● A disk is a one dimensional array of sectors.– 512 bytes/sector typical, but not required.● Two I/O operations: read+write– Sectorrange: First sector + count.– RAM must be mapped into kernel.● I/O request contained in struct buf/bio● Schedule I/O by calling strategy()● Completion signaled by biodone() callback.GEOM does what ?● Sits between DEVFS and devicedrivers● Provides framework for:– Arbitrary transformations of I/O requests.– Collection of statistics.– Disksort like optimizations.– Automatic configuration– Directed configuration.“You are here”Userland applicationPhysio() FilesystemBuffer cacheVM systemTo DEVFS GEOMlooks like a regularDEVFSdevice driverDisk device drivers use thedisk_*() API to interface toGEOM GEOMDevice driverThe GEOM design envelope.● Modular.● Freely stackable.● Auto discovery.● Directed Configuration.● POLA● DWIM● No unwarranted politics.“Modular”● You cannot define a new transformation and insert it into Veritas volume manager, AIX LVM, Vinum or RaidFrame.● They are all monolithic and closed. – “A quaint feature from the seventies”.Freely stackable.● Put your transformations in the order you like.– Mirror ad0 + ad1, partition the result.– ...