浅谈网络块设备的弹性扩容
2021-08-06韦伟于兆勇李冰利
韦伟 于兆勇 李冰利



摘 要: 近些年各個领域的数据都出现爆炸性的增长, 而市面上为用户提供的存储服务也越来越多,但大多数存在存储容量受限,增加容量时价格昂贵,灾备空间有限等问题。文章研究了Linux的一个内核模块Network Block Device(NBD),并利用NBD来实现远程存储设备在本地服务器上的弹性挂载,从而实现本地服务的弹性扩容。
关键词: Linux内核; 内核模块; 网络块设备; 存储
中图分类号:TP399 文献标识码:A 文章编号:1006-8228(2021)07-28-03
Discussion on the elastic expansion using Network Block Device
Wei Wei, Yu Zhaoyong, Li Bingli
(AVIC The First Aircraft Institute, Xi'an, Shannxi 710089, China)
Abstract: In recent years, the data in various fields are explosively increased, and the storage services available for users have being more and more, but most of them have the problems of limited storage capacity, high price when increasing capacity, limited disaster recovery space and so on. This paper studies Network Block Device (NBD), a kernel module of Linux, and uses NBD to realize the elastic mounting of remote storage devices on local servers, so as to realize the elastic expansion of local services.
Key words: Linux kernel; kernel module; Network Block Device; storage
0 引言
目前,互联网蓬勃发展,大数据时代已悄然来临。各行各业,无时无刻都会有巨大的数据量产生,这些数据也包括个人日常生活产生的数据,与每个人息息相关。
数据是无限的财富,如果应用好这些大数据,将会给企业和个人带来意想不到的收获及惊喜。但是想要更好地分析应用这些数据,首先就要使数据得到便捷安全的存储。目前市面上为用户提供的存储服务有很多,各自都有其不同的特点,但大多数存在存储容量受限,增加容量或者限时价格昂贵,或者单个文件传输大小受到一定限制,灾备空间有限等问题。本文重点研究Linux内核模块中的网络块设备NBD(Network Block Device),利用网络块设备来实现本地服务器上的弹性挂载,从而实现本地服务的扩容。
1 Linux内核
Linux为开源电脑操作系统内核,最早Linux内核是90年代初由Linus发布的,其采取开源社区的形式,全球无数程序员每天都在为内核中无偿的提供思想和代码的帮助,使得Linux内核变得越来越强大,现在已经发展到最新的5.5版本,是一个成熟的商用的操作系统。……
