A data storage device that supports reading/writing data in fixed-size blocks, sectors, or clusters.

learn more… | top users | synonyms

2
votes
1answer
20 views

Unable to edit the /sys/block/sdX/device/queue_depth file

I'm trying to increase my SSD's queue depth value with the following command: echo 64 > /sys/block/sda/device/queue_depth But I receive the following error: bash: echo: write error: Invalid ...
1
vote
1answer
21 views

linux: Class10 SD card different device and block device size

A have a brand new 16GB class 10 SD card and produce a very strange behavior. After I attached the the card with an USB SD-Card reader, the device appeared as /dev/sdb. I tried to copy a 2GB raw image ...
3
votes
1answer
81 views

How to prevent /sda /sdb changes between boots?

I am going to install Gentoo Linux onto an old hardware, which motherboard is having both IDE and SATA hard drives. I have two IDE and one SATA hard drives connected, and plan to do RAID on them. ...
1
vote
0answers
13 views

Changing readahead value using blockdev command

I am trying to modify read ahead value using blockdev. When I issue this command blockdev --setra xxx /dev/sda - it changes the readahead value of the entire partition in that device, which is fine. ...
1
vote
1answer
19 views

What are the pros and cons of badblock's two non-destructive tests?

I use badblocks to test my 32GB class-10 microSD card that I use to boot my RPi. I already have a functioning file system on it, so I don't want to scan it with the -w option (destructive read-write ...
7
votes
1answer
112 views

Command to generate /dev/disk/-by-path/ name on a system without udev daemon

On most Linux systems udev usually creates symlinks in /dev/disk/by-uuid/ /dev/disk/by-path/ which point to actual device nodes (/dev/sda, /dev/sdb, etc). I don't have udev on my system, and I ...
2
votes
2answers
62 views

No space left on device on CentOS7

My machine which OS is CentOS7 have to backup 50G data into MySQL. But, there is no space left on the device. But there are many spaces on /home. How can I make user that there are enough space for ...
1
vote
0answers
11 views

Files backing loop devices opened without O_EXCL

Loop devices are the primary way (and perhaps the only way) to treat normal files as block devices in Linux. It's strange that backing files aren't protected by O_EXCL flag. Why is that? Why nobody ...
3
votes
1answer
43 views

Why is the block size of a partition smaller than that of the underlying disk?

My understanding is that the block (in the phrase "block size") is like an IO buffer, or minimum IO size for a device. Since partitions are built on top of physical devices, how can they have blocks ...
1
vote
1answer
28 views

How can I access optical drive status information?

I can obtain the status of a connected display with: cat /sys/class/drm/card0-HDMI-A-1/status Is there something analogous for optical drives? I looked around in /sys/ but couldn't find anything that ...
0
votes
0answers
10 views

is `blockdev --flushbufs /dev/mmcblk0p1"` blocking call?

I am using blockdev --flushbufs /dev/mmcblk0p1 in onf the shell script and would like to know if this command doing blocking call or not? I see it from man page that it is ioctl call to the block ...
1
vote
3answers
69 views

How could Linux use 'sda' device file when it hasn't been installed?

I am installing CentOS Linux distribution on a fresh new machine. Just for learning. I am new to Linux. At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should ...
0
votes
0answers
8 views

How “ata_for_each_link” and “ata_for_each_dev” macros works in linux kernel?

I am trying to understanding the SATA device enumeration sequence from the ata_piix.c Host controller driver which resides at /driver/ata/ata_piix.c in linux kernel. During understanding the flow,a ...
0
votes
2answers
43 views

CPU: 13 PID: 15452 Comm: ssd_blk/0 Tainted: G B I E 3.19.0+ #1

I developed a module which works as an emulator for a block device. When I write into the block device, I get this in dmesg and the module crashes. I cannot get any hint about what is going on? ...
1
vote
1answer
41 views

Block device disappears after suspend-resume

After few suspend/resume cycles one of my hdd disappears from the list of devices, here is part of dmesg output that seems to be related to issue: [ 450.005310] sd 5:0:0:0: [sdc] Starting disk [ ...
1
vote
2answers
150 views

What is a block device? [duplicate]

I know many examples of block devices (HDD's, SSD's, files, ...), but I haven't heard a simple definition of it. Especially since files are apparently included in the definition I feel a bit ...
1
vote
0answers
22 views

Tar waiting a long time at end of block device

I had some trouble getting Linux installed to a particular netbook and had to restart it from scratch multiple times. Re-typing the same commands to set up networking and bootstrap the install was ...
1
vote
0answers
44 views

Storage device trouble: IO errors but no bad sectors?

I have a lightly used spinning metal drive (internal) with some VMs on it. I'm running into IO errors while running a VM and upon closer examination I have found a virtual disk file that is reporting ...
2
votes
1answer
59 views

Transfer content of LVM block device ensuring consistency - LVM snapshot?

I need to create off-site full backups of an LVM block device. Thinking the old dd over SSH method. To ensure I have a consistent backup, should I create an LVM snapshot first? So new changed blocks ...
3
votes
0answers
68 views

How to cache block devices (for device mapper)?

problem / observed effect It seems that the page cache ignores block devices which are not opened. And worse: Reads from device mapper (DM) devices which use a cached device are not cached at all ...
2
votes
1answer
100 views

Difference between sd0/sda, hd0/hda

From what I understand, hdx is naming convention for IDE (PATA) drive, sdx is for SCSI (SATA) drive. Sometimes I see sd0 and sda, similary hd0/hda. What are their differences ? When would we use ...
4
votes
2answers
80 views

In which thread does block driver issue commands to block device?

I'm currently reading "Understanding The Linux Kernel" book, as I've understood block I/O request order is like this; user space call => vfs call => I/O scheduler call => block device driver call. ...
1
vote
1answer
182 views

dd, cat & openssl: block size & buffer size

Here it says that when using dd through dm-crypt to overwrite a block device, only the default dd block size should be used because dm-crypt's block size is the same (512 bytes), and increasing dd's ...
1
vote
1answer
113 views

How to find the driver (module) associated with SATA device on Linux?

For one of my applications, I have to understand the the SATA device driver flow. As per my understanding, SATA device driver should be there in the Linux kernel tree. I have referred how to find the ...
1
vote
0answers
13 views

Getting mmc_block to display more than 8 partitions

When you format an SD card or a USB drive with the Chromebook Recovery Utility, it creates twelve partitions. It also leaves the rest of the memory unallocated. I want to be able to use this space as ...
4
votes
1answer
155 views

How does cat 'know' the optimum block size to use?

From reading this, it seems that when copying data to a different hard drive, cat automatically uses the optimum block size (or very near it). I wonder how it determines the optimum block size, and ...
4
votes
1answer
27 views

Get label of Linux storage partition device file

Given the partition device file /dev/sdh1, I need to find out the label of this device. dmesg doesn't mention its label while GParted reveals that it is called H2N_SD: I need to build a way to be ...
3
votes
0answers
32 views

Enumerate valid values for mknod

I have access to an embedded device which has a bunch of block/char files under /dev. However, this is not a satisfying description of the hardware, because since the firmware is shared with small ...
1
vote
1answer
35 views

How do I store the data in disk directly in kernel module? [closed]

I capture the TCP packet in function of netif_receive_skb , I want to store the playload of TCP packet. we can't read/write the file in kernel module, so store in disk directly maybe a way? ...
0
votes
1answer
45 views

How do I detect used harddrive space on a block device?

I want to look at a raw block device (as in /dev/sda) and know how much space is being used on the drive. I don't know what type of file system is on the harddrive, nor do I have any way of figuring ...
1
vote
0answers
255 views

CentOS 7 - Forcing a disk to be /dev/sda

I've been wrestling with this problem for awhile now, and I've hit a wall and need help. In my system, I have 1 drive connected to a SATA port, an SSD. CentOS 7 is installed to this disk. Also in ...
1
vote
2answers
145 views

Is UUID really unique? why can we assign multiple UUIDs to single slice of disk

All the web content and its acronym explains it as Uniquely identifier. But when i try to create another device, lets say swap in my case and assign the UUID, i am able to assign many UUIDs to single ...
4
votes
1answer
422 views

How does Linux handle block devices?

Today I learned that FreeBSD removed support for block devices entirely. While reading their rational for the decision I came across this: Block devices are disk devices for which the kernel ...
3
votes
0answers
313 views

How to change block device names, e.g. /dev/sdc to /dev/sdb?

Example of why this might be desired: I connect a block device, which shows up as /dev/sdb, and mount it. Later that device gets removed without being unmounted. The block device is reconnected, but ...
0
votes
0answers
31 views

RHEL7 : Freeing memory allocated for Block IO i.e. bio -> bio_destructor

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? ...
1
vote
2answers
150 views

How to get disk name that contains a specific partition

If I know that a partition is for example /dev/sda1 how can I get the disk name (/dev/sda in this case) that contains the partition ? The output should be only a path to disk (like /dev/sda). It ...
8
votes
3answers
297 views

Will a usb key have the same name everytime I mount it?

I have a usb key which will be used to save data on it daily, via a bash script. I managed to mount it for a specific user to be able to write folders in it using the command mount /dev/sdc1 ...
3
votes
3answers
382 views

Does dd copy everything, including all metadata and all “empty” blocks

Suddenly something was messed up with my partitions, or just one partition. I have a default Ubuntu installation, on a Kingston SSD, with the root file system encrypted with LUKS, (using AES I think). ...
3
votes
1answer
78 views

Is there any way to prevent a bad drive from disappearing from /dev?

I'm trying to recover a partition on a bad drive with ddrescue. I run: $ sudo ddrescue -r -1 -v /dev/sdd3 OUT.img dd_rescue_logfile and it seems to do great for a while, but after about an hour, ...
0
votes
0answers
257 views

DRBD device names and numbers

I am trying to deploy a DRBD setup. I am using two virtual machines running CentOS 6.6. It is quite unclear to me how should the drbd configuration file should look like. I am using the following ...
1
vote
0answers
71 views

List partition type GUID's for all disks from command line?

I need to list the partition type GUID's from the command line. Note: This is not the same as the partition UUID. Basically I'm needing to search for all disks that have the Ceph OSD type GUID: ...
2
votes
0answers
93 views

How to use blktrace to monitor the eMMC Flash access pattern?

I'm trying to simulate a FTL(Flash Translation Layer) algorithm and evaluate its performance. What I need is a trace file of a flash access(containing information about block and page access). I'm ...
1
vote
0answers
38 views

Remove orphaned rados block device

I'm testing ceph at the moment. Today I decided to start over with my cluster and deleted the old one to setup a new one. I forgot to unmap and delete a mapped rbd device from another host. Now I see ...
0
votes
0answers
40 views

one nautilus device went missing, why? and how to fix?

nautilus devices are provided by /usr/lib/gvfs/gvfs-udisks2-volume-monitor, I've already restarted it but one device is still missing. I also tried strace on it, but it only outputs info about mounted ...
1
vote
0answers
406 views

Map a Linux VM's block device to its vmdk file on the vmware datastore

For development and staging purposes, I must frequently create clones of individual virtual harddisks (vmdk container) and move/deploy them into some other system. While I have been able to hack a ...
0
votes
2answers
614 views

How to benchmark memory in an embedded linux device?

Is there a generic utility to benchmark external memory device (eMMC, DDR) throughput on an embedded device (e.g. raspberry pi)? memtester, bonnie, bonnie++, memtest, dd? I've been running into ...
0
votes
2answers
43 views

Can we predict the next registered SCSI mass storage device name

I need to anticipate the device name (sdX) that the next mass storage device (sda, sdb, sdc, …) will receive from the SCSI driver. If I remove one device and connect another one, I noticed that the ...
0
votes
1answer
113 views

Force Filesystem Reread / Remount

Is it possible to force a complete re-read of a mounted filesystem (EXT4) from disk in a blocking manner? I have a potential situation where independent and external hardware can modify a filesystem ...
0
votes
0answers
23 views

How to obtain block device label [duplicate]

I have a tricky problem. I have a block device connected to SLES11, it is present in /proc/partitions but it is not mounted (not present in /proc/mounts). From C code I want to find the block device ...
1
vote
1answer
614 views

Can you scp a device file?

My flash is partitioned as /dev/mtd0 /dev/mtd1 etc....And I want to scp one of the partitions over to my pc so I can analyze it with a hex editor, but everytime I try to copy it with scp I get -not a ...