The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
0answers
16 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
29 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
379 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
46 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
47 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 ...
1
vote
1answer
71 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
25 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
171 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
23 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
75 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
29 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?
2
votes
2answers
301 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
245 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
80 views

what is the etymology of `loop device`

What is the etymology of the term loop device Description: Wikipedia: loop device
0
votes
1answer
68 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
1answer
226 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
83 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
442 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
100 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
75 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
325 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
29 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
132 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
160 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
120 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
36 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
58 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
318 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 ...
29
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
1answer
291 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
809 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
384 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
59 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
587 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
220 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
1answer
160 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 - ...
13
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
765 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 ...
2
votes
1answer
46 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 ...
1
vote
0answers
55 views

GKrellM vs. udev's asynchronous drive mappings on bootup

Well, supposing you had multiple drives (3 in this example), udev would always play dice with them on each system reboot. And now, let's make things a little more quirky by adding one USB flash drive ...
4
votes
2answers
320 views

List all the ways a block device is in use

I want to be sure that a removable hard drive (USB, but this shouldn't matter) is safe to remove. Let's say this drive is sdb. Obviously I need to make sure that there is no mounted filesystem on ...
0
votes
2answers
119 views

ECC on a single block device

I have an SSD that I suspect failing silently now and then. I have run badblocks on it and it is clear that it is not bad sectors but might instead be some race condition in the electronics, in which ...
3
votes
1answer
1k views

Is it possible to change the sector size of a partition for zfs raidz pool in linux?

I've been migrating a zfs raidz pool on linux to new discs via virtual devices which were sparse files. I've used partitions on the discs as the discs are different sizes of 1.9T each. The last disc ...
3
votes
1answer
199 views

Low-level disk access in FreeBSD

I'm developing a utility that needs to do low-level random access of disks (read individual sectors). In Linux I accomplish this by accessing the corresponding block device (e.g. /dev/sda). However, ...
1
vote
3answers
6k views

partitioning using 2 hard disks (SSD and non-SSD) in linux [closed]

I have the following free spaces on 2 disks: SSD - 240G (sda) non-SSD - 240G (sdb) I understand that I should use SSD to install packages and non-SSD just for storing data. What's the best ...
6
votes
1answer
740 views

Find out if a specific device is an USB mass storage

Context I'm automating SD card imaging from an existing dd factory image. The SD card is always connected through an external USB card reader and thus appears in the system as a SCSI block device ...
0
votes
1answer
99 views

What disk is a file / directory stored on? [duplicate]

From the command line (bash) I would like to know what disk a given file is stored in. E.G.: $ [what filesystem is this file in command] /tmp/example/file /dev/sda1