The Linux Storage Stack Diagram
image/svg+xml
The Linux Storage Stack Diagram
2014/10/17
Thomas-Krenn.AG
http://www.thomas-krenn.com/en/wiki/Linux_Storage_Stack_Diagram
EN
Linux
Storage
Block Layer
Werner Fischer and Georg Schönberger
Applications (processes)
VFS
Request-baseddevice mapper targets
dm-multipath
Physical devices
HDD
SSD
DVDdrive
MicronPCIe card
LSIRAID
AdaptecRAID
QlogicHBA
EmulexHBA
malloc
BIOs (block I/Os)
sysfs(transport attributes)
SCSI upper level drivers
/dev/sda
scsi-mq
...
/dev/sd*
SCSI low level drivers
megaraid_sas
aacraid
qla2xxx
...
libata
ahci
ata_piix
...
lpfc
Transport classes
scsi_transport_fc
scsi_transport_sas
scsi_transport_...
/dev/vd*
virtio_blk
mtip32xx
/dev/rssd*
The Linux Storage Stack Diagramhttp://www.thomas-krenn.com/en/wiki/Linux_Storage_Stack_DiagramCreated by Werner Fischer and Georg SchönbergerLicense: CC-BY-SA 3.0, see http://creativecommons.org/licenses/by-sa/3.0/
ext2
ext3
btrfs
ext4
xfs
ifs
iso9660
...
NFS
coda
Network FS
gfs
ocfs
smbfs
...
Pseudo FS
Specialpurpose FS
proc
sysfs
futexfs
usbfs
...
tmpfs
ramfs
devtmpfs
pipefs
network
nvmedevice
The Linux Storage Stack Diagram version 4.10, 2017-03-10outlines the Linux storage stack as of Kernel version 4.10
mmap(anonymous pages)
iscsi_tcp
network
/dev/rbd*
Block-based FS
read(2)
write(2)
open(2)
stat(2)
chmod(2)
...
Pagecache
mdraid
...
stackable
Devices on top of “normal”block devices
drbd
(optional)
LVM
BIOs (block I/Os)
BIOs
BIOs
Block Layer
multi queue
blkmq
Softwarequeues
Hardwaredispatchqueues
...
...
hooked in device drivers(they hook in like stackeddevices do)
BIOs
Maps BIOs to requests
deadline
cfq
noop
I/O scheduler
Hardwaredispatchqueue
Requestbased drivers
BIObased drivers
Requestbased drivers
ceph
struct bio
- sector on disk
- bio_vec cnt
- bio_vec index
- bio_vec list
- sector cnt
Fibre Channelover Ethernet
LIO
target_core_mod
tcm_fc
FireWire
ISCSI
Direct I/O(O_DIRECT)
device mapper
network
iscsi_target_mod
sbp_target
target_core_file
target_core_iblock
target_core_pscsi
vfs_writev, vfs_readv, ...
dm-crypt
dm-mirror
dm-thin
dm-cache
tcm_qla2xxx
tcm_usb_gadget
USB
Fibre Channel
tcm_vhost
Virtual Host
/dev/nvme*n*
SCSI mid layer
virtio_pci
LSI 12GbsSAS HBA
mpt3sas
bcache
/dev/nullb*
vmw_pvscsi
/dev/skd*
skd
stecdevice
virtio_scsi
para-virtualizedSCSI
VMware'spara-virtualizedSCSI
target_core_user
unionfs
FUSE
/dev/mmcblk*p*
dm-raid
/dev/sr*
/dev/st*
pm8001
PMC-SierraHBA
SD-/MMC-Card
/dev/rsxx*
rsxx
IBM flashadapter
/dev/zram*
memory
null_blk
ufs
userspace
ecryptfs
Stackable FS
mobile deviceflash memory
nvme
overlayfs
userspace (e.g. sshfs)
mmc
rbd
zram
dm-delay
/dev/nbd*
nbd
/dev/ubiblock*
ubi
/dev/loop*
loop