The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
35 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 ...
1
vote
0answers
42 views

Micro SD shows up as /dev/sde and /dev/sdf on my smart phone [closed]

When I put a MicroSD card into an adapter and plug it into my computer two new devices show up: /dev/sde and /dev/sdf. Why are two devices showing up? I got the answer now: Since one can put a SD and ...
0
votes
0answers
19 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
29 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 ...
0
votes
0answers
37 views

M17: Trying to mount Windows 10 .iso onto partition via terminal, getting “block device ? is write-protected, mounting read-only”. Can I get a help?"

I have Linux Mint 17.1 and am trying to dual boot Windows 10 Technical Preview OR install it on my other hard drive. Extra easy damage-control for you guys- I do not care if I lose any data, as long ...
0
votes
2answers
30 views

Cloning a drive larger than your own

I made this nice backup system to turn drives into vdi's and put them on our network share. Then the next day my boss walks in with 20 new machines to replace our old ones, they have 2TB drives. How ...
3
votes
2answers
244 views

How to get UUID of filesystem given a path?

I am handed a path of a directory or a file. Which utility/shell script will reliably give me the UUID of the file system on which is this directory/file located? By UUID of file system I mean the ...
2
votes
1answer
58 views

Find/replace on block device?

Let's say I have an unmounted block device /dev/sda, and I want to replace all instances of MyPassWord with XXXXXXXXXX. (Hopefully my goal is obvious.) What's the easiest way to do this?
3
votes
1answer
70 views

Write an image to a flash drive under OpenBSD

Under Linux, I can simply do a: dd if=ubuntu-14.04.1-desktop-amd64.iso of=/dev/sdb and boot up the /dev/sdb which is a device for a flash drive. It finishes in 263 seconds. But: If I boot up an ...
13
votes
1answer
574 views

Why does Linux use SCSI drivers for non-SCSI devices? [duplicate]

Looking at what block device commands like lsblk or blkid return it seems that linux HDD support SCSI drivers regardless of the type of the devices, like a USB flash driver that is presented as ...
1
vote
3answers
177 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 ...
3
votes
1answer
72 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
72 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
152 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
33 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
43 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
1k 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 ...
4
votes
0answers
175 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
36 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 ...
6
votes
3answers
422 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 ...
2
votes
2answers
126 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
87 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
736 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
60 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
358 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
86 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
130 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
34 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
2k 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: ...
5
votes
1answer
351 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
86 views

what is the etymology of `loop device`

What is the etymology of the term loop device Description: Wikipedia: loop device
0
votes
1answer
233 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 ...
4
votes
2answers
748 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
217 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
967 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
662 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
232 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
1k 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
43 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
224 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
330 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
351 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
61 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
127 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
456 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
65 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 ...
33
votes
4answers
6k 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
484 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 ...
8
votes
7answers
2k 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 ...