Questions tagged [block-device]

25 questions
19
votes
1 answer

USB detected but not found in /dev

I have a Parabola Linux (based on 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…
gmask
  • 191
  • 1
  • 1
  • 3
7
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
  • 983
  • 6
  • 18
  • 34
4
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,195
  • 1
  • 9
  • 19
3
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
  • 719
  • 2
  • 15
  • 27
2
votes
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
  • 497
  • 4
  • 21
2
votes
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
  • 1,103
  • 4
  • 13
  • 35
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
  • 781
  • 2
  • 14
  • 27
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,909
  • 1
  • 11
  • 6
1
vote
0 answers

btt in blktrace tool does not report any data in android

I have collected trace data in file parse.bin with blktrace in android. Then I use btt to parse the cellocted data as below: /ssd/blktrace/btt/btt -i parse.bin But it does not report any data. The report is as below: ==================== All…
Jun
  • 11
  • 2
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

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
  • 68,623
  • 13
  • 106
  • 163
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
  • 317
  • 1
  • 2
  • 13
0
votes
0 answers

Can I mount an empty qcow2 image?

I am trying to mount my image.qcow2 to nbd device on my linux machine using the following command: guestmount -a test.qcow2 -i --ro /mnt/test_qcow/ but I get the following error: guestmount: no operating system was found on this disk If using…
1
2