SmartOS ZFS Architecture


Published on

Presented at BayLISA meetup, August 16, 2012

Published in: Technology

SmartOS ZFS Architecture

  1. 1. SmartOS ZFS Architecture Bill Pijewski Software Engineer, Joyent @pijewskiFriday, August 17, 2012
  2. 2. ZFS 101 • ZFS is a copy-on-write filesystem from Sun originally shipped with Solaris 10 • Many innovative features: data compression, snapshot/rollback, ZFS send/receive, SSD integration • Enterprise-grade reliability and data integrity • Two main components relevant here: • ZFS pools • ZFS datasetsFriday, August 17, 2012
  3. 3. ZFS Pools • Aggregate disks into a single storage pool from which “datasets” are allocated • No parted/LVM needed • Mix both spinning disks and SSDs: • L2ARC: extends filesystem buffer cache • ZIL: absorbs synchronous write activityFriday, August 17, 2012
  4. 4. ZFS Datasets • Datasets are a tree of blocks within the storage pool, presented as either: • A filesystem (file interface) • A volume (block interface) • Datasets can be flexibly resized, and volumes can even be thinly provisioned • Administrative controls on datasetsFriday, August 17, 2012
  5. 5. SmartOS Diskless Boot • Instead of installing OS to root disks, SmartOS boots from a USB key • Entire kernel and userland fit in about 200 MB (compressed) • Other software can be installed from pkgsrc • For our cloud, we network boot each system • Single ZFS pool for all virtual machines • Swap device, dump device, zone configuration all live on that single poolFriday, August 17, 2012
  6. 6. Diskless Boot Advantages • Upgrade is as simple as a reboot • All disks are available for zone/VM storage, thereby increasing both performance and capacity • Encourages users to provision a zone for each application, rather than using the GZ • Discourages customization and one-off patching • Easy to “bring your OS with you”Friday, August 17, 2012
  7. 7. Zones and VMs • A zone is a lightweight software-virtualized container • Uses the systemʼs OS platform • Allocated its own ZFS filesystem (more in a sec) • A VM is a hardware-virtualized container for GNU/ Linux, Windows, BSD, etc. • Uses its own ZFS volume • VMʼs filesystem installed into ZFS volume • Both machines have resource controls for CPU, memory, and disk I/OFriday, August 17, 2012
  8. 8. Advantages of ZFS • Snapshots: zone/VM backup and recovery • Space management: reservations and quota flexibly allocate space between zones • Delegated administration: each tenant can administer their own dataset: • Set compression level and other properties • Take snapshots of application data • Generate send streams for replication/backupFriday, August 17, 2012
  9. 9. Advantages of ZFS (2) • Data integrity: verifies data of VM guest filesystems (ext4, XFS, NTFS, etc.) • Multiple storage configurations available: mirrored, RAID-Z2, and others • System fully supported on any storage configurations, can even take a crash dump to a RAID-Z poolFriday, August 17, 2012
  10. 10. Summary • Netboot from USB key, no OS install required • Single ZFS pool for all tenants • Individual controls for each tenantʼs filesystemFriday, August 17, 2012
  11. 11. Questions? FOR MORE INFORMATION VISIT OR www.smartos.orgFriday, August 17, 2012
  12. 12. SmartOS ZFS Architecture Bill Pijewski Software Engineer, Joyent @pijewskiFriday, August 17, 2012