Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
SmartOS ZFS Architecture
1. SmartOS ZFS
Architecture
Bill Pijewski
Software Engineer, Joyent
@pijewski
Friday, August 17, 2012
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 datasets
Friday, August 17, 2012
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 activity
Friday, August 17, 2012
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 datasets
Friday, August 17, 2012
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 pool
Friday, August 17, 2012
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. 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/O
Friday, August 17, 2012
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/backup
Friday, August 17, 2012
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 pool
Friday, August 17, 2012
10. Summary
• Netboot from USB key, no OS install required
• Single ZFS pool for all tenants
• Individual controls for each tenantʼs filesystem
Friday, August 17, 2012
11. Questions?
FOR MORE INFORMATION VISIT
www.joyent.com
OR
www.smartos.org
Friday, August 17, 2012
12. SmartOS ZFS
Architecture
Bill Pijewski
Software Engineer, Joyent
@pijewski
Friday, August 17, 2012