Questions tagged [block-device]

22 questions
18
votes
1 answer

USB detected but not found in /dev

I have a Parabola (arch)/Linux installation with Kernel 4.9.6. When I insert a usb external hard disk I can see it in lsusb as Bus 002 Device 055: ID 0411:01de BUFFALO INC. (formerly MelCo., Inc.) External Hard Drive HD-PCTU3 [Buffalo…
gmask
  • 181
  • 1
  • 1
  • 3
6
votes
2 answers

Scan image file or disk for pattern and return its location

Say I have a block device or an image file. And say I also have a sequence of bytes or a string or some search pattern. How can I get the positions of the occurrences of such a pattern or string? Are there any tools for that?
Melab
  • 797
  • 5
  • 16
  • 30
3
votes
1 answer

How to read tmpfs as a block device in linux?

A typical linux machine mounts a tmpfs to store temporary files: $ df Filesystem Size Used Avail Use% Mounted on /dev/sda1 953M 702M 203M 78% / tmpfs 1.5G 111M 1.5G 0% /tmp ... On a live machine, how…
Duke Nukem
  • 1,095
  • 1
  • 8
  • 16
2
votes
1 answer

How to auto-mount loop-devices with partitions

I am testing some filesystem driver code and would like to do so outside of the kernel. The simplest and safest method for doing this is from userspace. So, I have created a file of some length dd if=/dev/zero of=testfs bs=10M count=50 Then I…
sherrellbc
  • 597
  • 2
  • 13
  • 26
2
votes
2 answers

`e2fsck -n` + how to know if need to run e2fsck in order to fix corrupted blocks?

We want to check the filesystem on the disks as /deb/sdc ... /dev/sdg on each Red Hat Linux machine. The target is to find what are the disks that require e2fsck ( as e2fsck -y /dev/sdb etc.) According to man page -n Open the filesystem…
King David
  • 561
  • 1
  • 7
  • 20
1
vote
1 answer

Block and char device over network on linux

It there a generic way to share a block or character device over network? All related questions solved with specific answer like: if you want to share disk between host, use NFS, SMB, iSCSI, or AoE. If you want to share TV tuner or WebCam, stream…
Dankó Dávid
  • 1,761
  • 1
  • 10
  • 5
1
vote
1 answer

How to make a swappable in-memory block device in Linux without tmpfs?

One can make a ramdisk in Linux by modprobe brd rd_nr=1 rd_size=$SizeInKB (creates uncompressed /dev/ram0) or by modprobe zram && echo $SizeInBytes >| /sys/block/zram0/disksize (creates compressed /dev/zram0). These types of ramdisk are both unable…
Juergen
  • 356
  • 2
  • 18
1
vote
1 answer

What's the minimum number of lba I can trim (sg_unmap) from a device?

I run this command: sg_unmap -v -l 0 -n 1 DEVICE and it doesn't fail but it also doesn't do anything. when I increase it to n=8 then it's trimming 8 lbas why it's working like that? I couldn't figure it out from the help file. Is there a relation…
Lio
  • 11
  • 1
1
vote
0 answers

Why BlockDeviceMapping does not create UUID?

In Linux machines, block devices have UUID Below is the CloudFormation template: "BlockDeviceMappings": [ { "DeviceName" : "/dev/sdf", "Ebs" : { "VolumeSize" : "20", …
1
vote
0 answers

Share data between host and guest with QEMU

I have a Centos7 host on wich i emulate a Concurrent-DOS guest with QEMU, and i have to share data between the two environnements. I am actually using FTP to send file to and from each other, but it is not fast enough for my needs. I would like to…
Stephane
  • 11
  • 2
1
vote
1 answer

How to achieve full speed with AWS EBS volume

I'm testing EBS volumes, trying to figure out how to achieve the advertised speed. Amazon says io1 volumes can do 1000MBps or 64,000 IOPS at 16K. I'm not seeing any higher than 600MBps. This is an m5n.2xlarge instance (with Nitro card) with a…
Elliott B
  • 941
  • 2
  • 10
  • 28
1
vote
1 answer

Properties of ZFS ZVOL

I'm starting to teach myself how ZFS works - so I may have fundamental misunderstandings here - if so, please let me know. Is a ZVOL a block device, or does it simply behave in a manor similar to a block device ? I can resize a ZVOL using a command…
davidgo
  • 62,907
  • 11
  • 91
  • 144
1
vote
0 answers

File-based loop device with writing support and dynamic size

Usually loop device (v-node disk) is based on a file with pre-allocated size (e.g. an image of a floppy drive or ISO disk). The device is then treated as a block device and can be formatted with any filesystem supported by the operating system, e.g.…
Greg
  • 307
  • 1
  • 2
  • 13
0
votes
1 answer

How to let xz show percentage progress when compressing block device in Linux?

When I use xz to compress a block device (e.g. /dev/sda1), --verbose shows the current size read from input file (128 MiB below). However, it does not show the percentage of input file read (--- % on the left). Is it possible to give xz a hint about…
Eric Stdlib
  • 135
  • 1
  • 7
0
votes
0 answers

Same file system but different hardware abstraction confusion

I still don't fully grasp how file systems work deep down. For example, I have both a hard disk drive and a Flash USB stick connected to my Linux or Windows computer. I'm presented with options of different file system types to format with, for…
Engineer999
  • 161
  • 1
  • 1
  • 7
1
2