Brief introduction of linux block device

1. Simple classification of block devices: SCSI block devices and LVM logical volume block devices;

 

2. Two Linux kernel functions are needed to create a block device: alloc_disk ; add_disk ;

  alloc_disk : used to allocate an instance of a gendisk structure;

  add_disk : Register the structure instance to the system;

  The specific implementation of the SCSI disk is in the file sd.c (driver / scsi / sd.c);

 

3. Network Block Device ( NBD )

  NBD itself is a CS (Client-Sever) architecture program;

 

4. do_nbd_request , this function is the core of NBD block device, which converts a block request into a network request and sends it to the NBD server for processing

 

5. DRDB is called Distributed Relicated Block Device (Distributed Relicated Block Device)

  Queue processing routine: drbd_make_request

Guess you like

Origin www.cnblogs.com/yg-Mark/p/12714040.html
Recommended