The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
30 views

List all devices connected, FreeBSD

What's the FreeBSD variant of Linux's lsblk and blkid? I want something that provides the same sort of information as lsblk does in the example below: NAME MAJ:MIN RM SIZE RO TYPE ...
1
vote
0answers
6 views

Is inode_readahead_blks independent of read_ahead_kb?

I've been reading through the kernel documentation for block device sysfs tunables and I ran across the description for read_ahead_kb: Maximum number of kilobytes to read-ahead for filesystems on ...
3
votes
1answer
24 views

Create a write-cache loop device for a much larger block device

So, long story short. * I had a 5.5TB RAID5 array with a HP controller. * HP uses a really, really painful RAID5 algorithm (ref: Delayed Parity) * I wrote a new block driver that translates requests ...
1
vote
1answer
33 views

arch linux recognizes the partitions and hard disks wrongly

My arch Linux system does not recognize neither the partition nor the hard disk in which it is installed. it is installed on /dev/sdb1 but it recognizes that as /dev/sdc1 and the initialization goes ...
8
votes
3answers
120 views

How can `dd` be used to right-shift data blocks?

Consider a 100MB raw block device as a simple example. That is 204800 blocks of 512 bytes each for a total of 102760448 bytes. The challenge is to shift the first 98MB (200704 blocks) so there is a ...
1
vote
0answers
26 views

How can I limit or delay the write speed to specify directory?

I want to limit the write speed and limit to specify directory. Make this directory flakey. Make this directory error for can't write data to it. I have user dmsetup to create the device mapper with ...
1
vote
1answer
23 views

Chunked transfer contents of block device over bad network

/dev/sda is the only disk on system. I want to save it to a raw image on another server. I can't do it in one shot, because network disconnects often. Is it possible with e.g. torrent?
2
votes
2answers
197 views

Mount an ISO virtually using /dev/sr0 device

I'm doing a study about how CD-ROM can be mounted virtually and all I could find out was mounting using loop devices. mount -o loop disk1.iso /mount-point This is fairly easy. I understand that ...
2
votes
0answers
30 views

virtual block device

I'm not sure what I should be googling or if FUSE does this (I suspect not). I'd like to create a virtual block device which all access (such as reads/writes) go to my app. I know I can have a file ...
1
vote
1answer
32 views

DVD giving inconsistent size informatin

I have a (read-only, commercial, dual-layer) DVD which I’m trying to create a backup copy of on my computer (because DVDs can be damaged). However, when I try to determine the size of the disc, I get ...
5
votes
3answers
400 views

Why is dd not protected against writing on the active disk ?

I use dd a lot. I live in a contant fear of making a mistake one day, for example writing on sda (computer disk) instead of sdb (USB disk) and then erasing everything I have on my computer. I know dd ...
1
vote
0answers
22 views

Granting access permission to normal user to a logical volume of a volume group [duplicate]

When I need to run a program with direct disk access, like read/write from /dev/sdb, I simply add the user to 'disk' group. In this way we don't need to disclose the root account the the user. However ...
1
vote
2answers
84 views

Does `/proc/partitions` and/or `fdisk -l /dev/sdX` provide me a reliable device size?

I have two 3TB disks, which I hope to be exactly the same size. This means that I can use dd to copy them without being short or in excess of some bytes. Therefore I tried to find out the ...
2
votes
0answers
69 views

Disk page cache size in Linux for integrity purposes

I am trying to bound corruption in a block-based disk format in the presence of plausible machine failures in a Linux-specific application. That is, the file is read and written in application-defined ...
2
votes
1answer
222 views

How Linux kernel 3.x manage ramdisk as block device?

I need a block device in RAM. I built a 3.x kernel and added the RAM block device driver. The number of RAM block device drive is 16 (by default) but when the kernel boots there is no ramx in ...
3
votes
1answer
36 views

How do I change the OS block size

I am using SUSE 11SP3 and formatted the devices with a block size of 4KB using mkfs.ext3. /sys/block/sda/queue/logical_block_size and /sys/block/sda/queue/physical_block_size show the OS is using 512 ...
6
votes
2answers
242 views

how to mount a range of drives in bash?

I use something like this to unmount a range of drives: umount /dev/sd[c-k]2 Is there any way to use same thing with mount? something like this: mount /dev/sd[c-k]2 /[c2-k2]
1
vote
3answers
39 views

Looking at the content of a character device's file [duplicate]

Why is it possible to look at the contents of a block device's file like /dev/sda using cat or a hex editor? Why can I not do the same for a character device like /dev/pts/3?
3
votes
2answers
83 views

Transfering content of block devices

For the purpose of backups, I'd like to transfer (several) whole disk partitions over an ssh link. So the source is a block special device, and the target should be a regular file. Common tools seem ...
-1
votes
1answer
32 views

Reboot and zero drive

Is it possible to issue one command that will both reboot, boot to an external live drive or something similar, and then zero a hard drive?
3
votes
2answers
818 views

how to set block size using blockdev command

Anyone can provide me any test case for the below command: blockdev --setbsz BYTES to set/change the block size. I have tried like below but no luck. $ blockdev --setbsz 2048 /dev/sda5 blockdev: ...
4
votes
1answer
267 views

Give a specific user permissions to a device without giving access to other users

I have a card reader attached on /dev/sdb. What I do is giving all permissions to owner, group and the rest of the world, using: sudo chmod 777 /dev/sdb Can I just use another combination, ...
4
votes
2answers
83 views

what is the etymology of `loop device`

What is the etymology of the term loop device Description: Wikipedia: loop device
0
votes
1answer
106 views

Locating the /dev entry to make partitions on an SD card

I am trying to create partition of SD card, for this I am following this tutorial. When I type the command ll /dev/mmcblk* I got this ls: cannot access /dev/mmcblk*: No such file or directory ...
3
votes
2answers
413 views

bcache on md or md on bcache

bcache allows one or more fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives. If I understand correctly, an SSD* could be ...
1
vote
1answer
125 views

DD with a specific pattern

I was watching this Defcon video and around 4:30 he shows a custom pattern of drive wiping — the drive is filled with a constant text pattern. Whether he is joking or not, is this possible? How would ...
1
vote
1answer
686 views

Prevent USB storage from using different device on reset

I have a hard drive in a USB enclosure that I am doing some data recovery on. The drive is in extremely bad shape and frequently resets on reads. The device registers as /dev/sdb. Sometimes, probably ...
4
votes
2answers
311 views

Finding an USB device path

Recently I saw this command posted on the internet: ls -l /dev/disk/by-label/ It worked, but I'm concerned, does it work on other Linux distros? How can I find USB device on the computer where USB ...
1
vote
2answers
107 views

How to find out the bad block table offset and how to change it in u-Boot

I am facing a similar problem as this: Kernel does not recognize nand bad blocks marked by u-boot I'm using a friendlyARM micro2440 board that contains the s3c2440 ARM processor. u-Boot has found ...
4
votes
2answers
581 views

Determine what device a directory is located on

If I do # cd / # ln -s /home test # cd test # mount --bind $PWD /mnt the entry in /proc/mounts is /dev/sda2 /mnt ext4 rw,noatime,data=ordered 0 0 which is the device that is mounted to /home and ...
0
votes
0answers
36 views

How to set ST_BUFFER_BLOCK in centos6.5

To enable large transfers to tape under Linux (>64 KB per write), i have to set the ST_BUFFER_BLOCKS for that i have to edit the file /usr/src/linux/drivers/scsi/st_options.h and change the ...
0
votes
1answer
166 views

dd and rm -r commands

For me, the following commands do exactly the same thing: dd if=/dev/zero of=/dev/sd1 dd if=/dev/null of=/dev/sd1 rm -r /dev/sd1/* meaning, the result of their application is the same. Or least, ...
1
vote
2answers
211 views

Could not mount UBIFS on SD card

I guess this is not a big problem, still I can't see what's the matter. I'm building Images for an Embedded Linux (2.6.39) ARM9 System with Buildroot 2013.11, which is booting from an SD card. I was ...
3
votes
2answers
201 views

How to tell if a SCSI device is removable?

In DMESG I see: [sdb] Attached SCSI removable disk How does Linux decide what is removable and not removable? Is there a way I can look up if a device is "removable" or not other than the log, for ...
1
vote
1answer
44 views

The libblkid library: any way to use it with blocks in the core memory?

I know how to use the libblkid library to analyze existing block devices. I'd like to use it to analyze a memory extent before I write it to the block device. Something like that: char block[4096]; ...
2
votes
1answer
76 views

The libblkid library: what is the 'blkid_superblocks_get_name' function for?

I'm trying to use the libblkid library to analyze various filesystems on a block device from a C/C++ program, and it works well. However I'm confused with the blkid_superblocks_get_name function from ...
3
votes
1answer
363 views

blockdev --setro doesn't work (for me at least)

I'm sure I don't understood how blockdev works. I going to expose the case here and hope some of you can help me. The case: I have mounted a flash drive and it was mapped to /dev/sdb1. Then I type ...
1
vote
1answer
61 views

Pipe chain with devices

As far as I know, you can have the ability to make pipes between applications, such as this one: $ step1 < input_file | step2 | step3 > result_file And you can access devices such as ...
31
votes
4answers
4k views

How can I mount a block device from one computer to another via the network as a block device?

Is it possible to export a block device such as a DVD or CDROM and make it so that it's mountable on another computer as a block device? NOTE: I'm not interested in doing this using NFS or Samba, I ...
2
votes
2answers
367 views

KVM linux guest, 2nd HDD, LVM partition or whole disk

I've got a RAID 10 arrays on a couple of KVM host machines. The RAID 10 array is one big VG. I usually create a small LV for guest disk image storage then the rest of the VG I carve out as LVs to add ...
7
votes
7answers
1k views

Make disk/disk copy slower

Is there a method of slowing down the copy process on Linux? I have a big file, say 10GB, and I'd like to copy it to another directory, but I don't want to copy it with full speed. Let's say I'd like ...
2
votes
3answers
478 views

How to find out easily whether a block device (or a part of it) is mounted somehow

I want to know what the easiest way is to determine (without root privilege) whether a block device (say sdb) or any part of it is mounted (and which part of it). Checking /proc/mounts for sdb is not ...
0
votes
0answers
65 views

Creating a fixed-size post boot block device from ram

First off: /root# cat /proc/version Linux version 3.12.6 What I'm trying to do is create a block device (no filesystem) out of ram of a fixed (configurable) size (pre-allocated, not ...
3
votes
2answers
865 views

How can I find the actual (dd) size of a flash disk?

When I put a flash disk into a card reader and make an image with dd, I see the actual size of the disk, like 512483328 bytes in the following example: 1000944+0 records in 1000944+0 records out ...
4
votes
2answers
265 views

why does blktrace only write blocks of 8?

I want to understand the I/O pattern a database is writing to disk to decide how many disks to use for best performance. To analyse the I/O pattern I want to use blktrace and I have to grok it first. ...
1
vote
2answers
191 views

how does blktrace work?

I am trying to understand the Linux block layer so I am writing a blog about it: http://www.linuxintro.org/wiki/blktrAce. When calling blktrace like this: blktrace -d /dev/sdg -o - | blkparse -i - ...
16
votes
3answers
2k views

How to tell Linux Kernel > 3.0 to completely ignore a failing disk?

I am asking this question here in the hope that some Linux-kernel guru can have an answer. This question has been asked on AskUbuntu and on SuperUser without answers: thinking better, it is really ...
2
votes
1answer
2k views

Linux VM's disk went read-only = no choice but reboot?

I have several Linux VMs on VMware + SAN. What happened A problem occured on the SAN (failed path) so that for some time, there were I/O errors on the Linux VMs drives. When the path failover had ...
3
votes
1answer
989 views

What's wrong with this udev rule?

I'm reading through this link in trying to make the appropriate rule to make the BSG device nodes have group ownership of wheel and permissions of 0660. This is the rule that I have: [user@mylinux ...
3
votes
1answer
59 views

Command to reread partitions from media

When I insert media (e.g. an SD card) the system (Ubuntu 12.04) reads the partition table and creates all the /dev/*[1234] links to each partition. If I repartition the media I have to physically ...