Questions tagged [block-device]

Block devices are a specific type of Unix device node, typically representing storage devices such as hard drives, CD-ROMs, etc.

Block devices are a specific type of Unix device node which the operating system reads from and/or writes to in blocks of data -- typically a multiple of 512 bytes.

Some common block devices are hard drives and CD-ROM systems.

Traditionally block devices have been cached by the operating system. As this caching can lead to undesirable behavior a "raw" block device is typically also provided.

73 questions
43
votes
5 answers

Intentionally cause an I/O error in Linux?

Is there anyway, with Linux, to purposely cause a block device to report an I/O error, or possibly simulate one for testing purposes?
Dok
  • 1,110
  • 1
  • 7
  • 13
35
votes
3 answers

Readahead Settings for LVM, Device-Mapper, Software Raid and Block Devices - what wins?

I've been trying to find a straight answer on this one, and it has proved elusive. This question and its answer is close, but does not really give me the specifics I would like. Let's start with what I think I know. If you have a standard block…
Adam C
  • 5,132
  • 2
  • 28
  • 49
17
votes
2 answers

Why is there both character device and block device for nvme?

I am trying to understand the configuration of nvme. But I do not understand why there are two devices: nvme block and nvme character device: crw------- 1 root root 243, 0 Dec 12 16:09 /dev/nvme0 brw-rw---- 1 root disk 259, 0 Jan 14 01:30…
GP92
  • 599
  • 2
  • 6
  • 25
16
votes
7 answers

Is DRBD the only viable block replication solution for Linux?

I've found myself needing redundant storage at a block level. File-level replication (Gluster, GFS, etc) does not work for my use case. It looks like DRBD is the go-to solution for block replication. There don't seem to be too many other sane…
Charles
  • 1,194
  • 2
  • 12
  • 22
8
votes
1 answer

Xen 4.1 host (dom0) with blktap disks ("tap:aio:") not connecting

Problem using blktap with xen-4.1 running Ubuntu Precise stock kernel with dom0 xen-4.1. I get: [ 5.580106] XENBUS: Waiting for devices to initialise: 295s...290s. ... [ 300.580288] XENBUS: Timeout connecting to device: device/vbd/51713 (local…
Manwe
  • 528
  • 3
  • 13
6
votes
2 answers

Units for size in /proc/partitions don't make sense

I have a Seagate 750GB drive. Parted shows the drive as 750GB parted /dev/sdc print Model: ST375064 0AS (scsi) Disk /dev/sdc: 750GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name …
Danny
  • 235
  • 2
  • 10
6
votes
1 answer

Is it possible to calculate where is, physically, a bad block located on a hard disk?

I dd_rescue'd a hard drive, and I know where the bad blocks are. I still have the drive with me, so I can get any information needed from SMART or fdisk. I would like to know if it is possible to see, physically, where these bad blocks are…
6
votes
2 answers

Accessing the partitions on an LVM volume

Suppose you have an LVM volume /dev/vg0/mylv. You have presented this as a virtual disk to a virtualised or emulated guest system. During installation the guest system sees it as /dev/sda and partitions it into /dev/sda{1,2,5,6} and completes the…
projix
  • 219
  • 1
  • 4
6
votes
1 answer

What effect does RAID stripe size have on read-ahead settings?

I'm trying to figure out the correct read-ahead values to set on a RAID10 array, and I'm wondering if the RAID stripe size should factor into my considerations. I've heard conflicting information about this in the past. I once heard that you should…
stbrody
  • 161
  • 1
  • 3
6
votes
3 answers

Seeking distributed, fault-tolerant, networked block storage

I'm looking for a distributed, fault-tolerant network storage system which exposes block devices (not filesystems) on the clients. A client's block device should write simultaneously to several storage nodes A client's block device should not fail…
gucki
  • 788
  • 2
  • 10
  • 28
5
votes
2 answers

Tool to visualize linux block devices (partitions, LVM PVs, LVs, mdadm devices...)

I'm looking for a tool that will scan my GUI-less server and create an easy to digest rough overview of all the block devices and their relationship (disk partitions, mdadm devices, LVM PVs & LVs etc) in some rich visual format (html, pdf, svg,…
ndemou
  • 1,215
  • 2
  • 16
  • 27
5
votes
2 answers

Readahead for /var/lib/mongo is set to 4096KB

I'm trying to set the readahead for mongo 256 or less as recommended, I looked at the documentation for any guidance and I found this: Ensure that readahead settings for the block devices that store the database files are appropriate. For random…
pedrommuller
  • 279
  • 5
  • 13
4
votes
1 answer

Why is my HDD partition a character special device?

I have a bunch of old 1T disks with an mdadm array on them. They had been out of commission for awhile, but yesterday I slotted them into a server running an up to date Debian Jessie. Eventually I got the array back together, but two drives refused…
4
votes
1 answer

Whole block device named xvda1, xvda2 instead of xvda, xvdb

I am working on a VM that was set up for me in a public cloud. It's running under the Xen hypervisor in paravirtualized mode and has two virtual disks. So I expect the virtual disk block devices to be named xvda and xvdb. However, the way this…
Dan Moulding
  • 337
  • 2
  • 6
  • 11
3
votes
1 answer

How to retain blockdev changes after server restart?

I am setting block device read ahead buffer size like so: blockdev --setra 8192 /dev/sda As suggested here. The problem is after restart it goes back to 256 (default). I need it to retain the value i set it to. How can i do this? I'm on Ubuntu…
Michael Rogers
  • 60
  • 1
  • 3
  • 15
1
2 3 4 5