Questions tagged [block-device]

A block device is a computer data storage device. It organizes data into fixed sized blocks that are typically 512 or 4096 bytes long. Data is indexed by a logical block address. Block storage devices are widely available, including spinning hard drives or solid-state devices. They may be used directly by applications or may have a filesystem or other data structure layered on top of them.

139 questions
0
votes
1 answer

block tracepoints show dev 0,0. Isn't this invalid?

# trace-cmd record $OPTS systemctl suspend # dmesg ... [21976.161716] PM: suspend entry (deep) [21976.161720] PM: Syncing filesystems ... done. [21976.551178] Freezing user space processes ... (elapsed 0.003 seconds) done. [21976.554240] OOM killer…
sourcejedi
  • 3,051
  • 2
  • 24
  • 42
0
votes
1 answer

Accessing block device data beyond reported capacity

I have a SATA block device that reports a capacity that is smaller than its accessible space, and I would like to read and write to it past the reported capacity using the file created by Linux for block devices. So I hope to operate using the…
0
votes
0 answers

Block Devices (/dev/sda) & fopen/fstream

Is there any special that needs to be done or taken into consideration when directly opening a block device (such as a HDD)? Does the normal fopen and/or std::fstream (and their related tell/seek/read/write functions), or do special…
iAdjunct
  • 2,739
  • 1
  • 18
  • 27
0
votes
1 answer

How to make /dev/loop0 gathered as ansible_devices

Let me try to be clearer : ansible localhost -m setup Is not showing any block devices : "ansible_devices": {}, This host is using /dev/nbd0 as its root device. Now I was wondering, for my particular needs, how I could fill this gathered facts…
wsteven
  • 67
  • 1
  • 8
0
votes
0 answers

Block layer switch for protocol specific drivers

I am learning the mysterious block layer, I tried to hook into the generic_make_request function and see for which block device is the request belong to. In my case, I have a /dev/sda scsi device, I can see the direction READ | WRITE, and other…
Haswell
  • 1,573
  • 1
  • 18
  • 45
0
votes
1 answer

block device access on windows docker tool box

docker installed my machine ubuntu 12.04 (Virtual Machine on MAC) windows 7 (native) and Docker images as below .. ubuntu 12.04 base docker image when i run Docker image on Ubuntu 12.04 and insert Micro SD Card then Docker Image can access…
shkim
  • 793
  • 1
  • 5
  • 14
0
votes
1 answer

Freeing memory allocated for Block IO i.e. bio -> bio_destructor in RHEL 7

I want to know HOW memory allocated for BIO gets free specific to RHEL 7. I think, in RHEL 7 , bio->destructor field is removed from the bio structure. So, how exactly the memory will be freed? Thanks in Advance.!
amitam
  • 342
  • 2
  • 13
0
votes
0 answers

Can I write single bit to block device?

Question is about block devices like HDD/SDD etc, not talking about filesystems here. I wonder is it possible to write a SINGLE BIT or exact amount of data (eg. 7 bits) to block device like HDD? I read somewhere (can't tell where) that I could not…
KaP
  • 387
  • 1
  • 2
  • 12
0
votes
0 answers

Linux Kernel -- IRQ (proc file system VS system call)

I working on a Linux kernel project. In my project I modified the kernel so that copy_process is called from one of my modules that responds to writes to a proc file entry. In essence, things look liks: int procfile_write(struct file *file, const…
feeling_lonely
  • 6,665
  • 4
  • 27
  • 53
0
votes
1 answer

sbull ldd3 example driver gets stuck

I'm writing a block device driver and started with the sbull example from here: http://lwn.net/images/pdf/LDD3/ldd3_pdf.tar.bz2 I loaded the sbull driver successfully on my machine with kernel version 3.5.0-23. When I run this code: int main(){ int…
0
votes
2 answers

recognizing file system types from blocks of device

The question is how to recognize what is the file system type that resides on a device (LUN) when I can't mount the device, but I can access(read) to any LBA on the device. I'm looking for something like: NTFS keeps it's file system type on LBA…
Elia
  • 193
  • 1
  • 3
  • 11
0
votes
1 answer

Accessing buffer data from bio struct in Linux

I am working on a Linux kernel module that requires me to check data right before it is written to a local disk. The data to be written is fetched from a remote disk. Therefore, I know that the data from the fetch is stored in the page cache. I also…
Gregory-Turtle
  • 1,657
  • 3
  • 20
  • 30
0
votes
1 answer

Get block device from NSURL

The question says it all. How can I get the block device from an NSURL representing, for example, a removable media? What I would like to get from /Volumes/MyDevice is something like /dev/disk2. I wonder if that is possible without using the IOKit…
Nickkk
  • 2,261
  • 1
  • 25
  • 34
0
votes
1 answer

blk_cleanup_queue() doesn't return on block device deregistration

I'm writing a block device driver for a hot-pluggable PCI memory device on 2.6.43.2-6.fc15 (so LDD3 is out of date with respect to a lot of functions) and I'm having trouble getting the block device de-registration to go smoothly. When the device is…
0
votes
1 answer

Setting up a block level cache with DRBD on Linux

I want to setup a DRBD active/active configuration with two nodes. My application will be doing I/Os directly on the DRBD device. I haven't seen any option to enable caching within DRBD. Is there any linux module that would allow me to setup a cache…
Imran
  • 413
  • 5
  • 14
1 2 3
9
10