wiki:block device

block device

a block device is a device that allows arbitrary access to some predefined number of (well-ordered) bytes. So a 10GB disk is basically 10,000,000,000 bytes, along with a way for the computer to address them individually.

Disk partitioning schemes just carve up a single large block device (the disk) into a set of smaller block devices.

Examples of block devices on a modern GNU/Linux system include:

  • /dev/sda -- the first SATA, USB, SCSI, or firewire disk discovered on the system (with most linux kernels >= 2.6.23, regular IDE or parallel ATA disks will also get this label instead of the traditional /dev/hda)
  • /dev/sda1 -- the first partition on the first disk.

what block devices do i have?

You can get a list of all the available block devices on a modern GNU/Linux system with:

cat /proc/partitions

/proc/partitions is poorly named, since with LVM, RAID, and the devicemapper, on many systems today, the majority of the entries in the table there are not partitions at all! But it's a bit of historical legacy which will probably remain for a while.

neat things to do with block devices

Last modified 10 years ago Last modified on Nov 15, 2007, 4:19:53 PM