centos_7_nbd
This is an old revision of the document!
~~TOC~~
Network block device (nbd) - CentOS 7
- Install prerequisites:
yum groupinstall "development tools" yum install kernel-devel kernel-headers ncurses-devel yum install xmlto asciidoc python-devel newt-devel perl pesign elfutils-devel audit-libs-devel perl-ExtUtils-Embed.noarch
- Download and install the kernel source:
cd /root yumdownloader --source kernel yum install kernel-3.10.0-229.4.2.el7.src.rpm
- Prepare for building a binary RPM. Make sure you have enough space on the file system:
cd /root/rpmbuild/SPECS/kernel.spec rpmbuild -bp kernel.spec
- Configure the kernel module:
cd /root/rpmbuild/BUILD/kernel-3.10.0-229.4.2.el7/linux-3.10.0-229.4.2.el7.centos.x86_64 make menuconfig
- Go to 'Device Drivers | Block devices' and set 'M' on 'Network block device support' exit saving new kernel config.
- Compile time (get some coffee):
make prepare && make modules_prepare -j4 && make -j4
- Next build the block device modules:
make M=drivers/block
- Check the module:
modinfo drivers/block/nbd.ko
- If all looks good copy it to the running kernels extra folder in /lib/modules/$(uname -r)/extra.
- Load the module:
depmod -a && modprobe nbd
centos_7_nbd.1432301685.txt.gz · Last modified: 2015/05/22 13:34 by admin