Nbd

From Halfface
Jump to navigation Jump to search

network block device

install

yum -y install nbd

create nbd device

dd if=/dev/zero of=/ssd/nbd/nbd1 bs=1M count=128
mkfs.ext4 /ssd/nbd/nbd1

configure server

[generic]
  allowlist = true
[nbd1]
  exportname = /ssd/nbd/nbd1

mount nbd

sudo nbd-client -N nbd1 10.111.222.1  /dev/nbd

unmount

sudo nbd-client -d  /dev/nbd1