The tag has no wiki summary.

learn more… | top users | synonyms

3
votes
3answers
87 views

Does dd copy everything, including all metadata and all “empty” blocks

Suddenly something was messed up with my partitions, or just one partition. I have a default Ubuntu installation, on a Kingston SSD, with the root file system encrypted with LUKS, (using AES I think). ...
3
votes
1answer
28 views

Is there any way to prevent a bad drive from disappearing from /dev?

I'm trying to recover a partition on a bad drive with ddrescue. I run: $ sudo ddrescue -r -1 -v /dev/sdd3 OUT.img dd_rescue_logfile and it seems to do great for a while, but after about an hour, ...
4
votes
5answers
4k views

Comparison of raw block devices

Is there a utility (or some shell magic) that allows me to compare two block devices? Details: I have one large (0.5 TB) RAID device that I've backed up to a slightly larger SATA device using dd. ...
0
votes
0answers
37 views

DRBD device names and numbers

I am trying to deploy a DRBD setup. I am using two virtual machines running CentOS 6.6. It is quite unclear to me how should the drbd configuration file should look like. I am using the following ...
2
votes
2answers
532 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 ...
1
vote
5answers
17k views

SD card corrupt and stuck at 32MB, any way to fix it?

Using the Linux area since I'm using Linux apps and utilities. My phone crashed (several times) and managed to corrupt my microSD card. It no longer appears to have partitions and shows as 32MB ...
1
vote
0answers
21 views

List partition type GUID's for all disks from command line?

I need to list the partition type GUID's from the command line. Note: This is not the same as the partition UUID. Basically I'm needing to search for all disks that have the Ceph OSD type GUID: ...
2
votes
0answers
31 views

How to use blktrace to monitor the eMMC Flash access pattern?

I'm trying to simulate a FTL(Flash Translation Layer) algorithm and evaluate its performance. What I need is a trace file of a flash access(containing information about block and page access). I'm ...
1
vote
0answers
14 views

Remove orphaned rados block device

I'm testing ceph at the moment. Today I decided to start over with my cluster and deleted the old one to setup a new one. I forgot to unmap and delete a mapped rbd device from another host. Now I see ...
0
votes
0answers
21 views

one nautilus device went missing, why? and how to fix?

nautilus devices are provided by /usr/lib/gvfs/gvfs-udisks2-volume-monitor, I've already restarted it but one device is still missing. I also tried strace on it, but it only outputs info about mounted ...
1
vote
0answers
132 views

Map a Linux VM's block device to its vmdk file on the vmware datastore

For development and staging purposes, I must frequently create clones of individual virtual harddisks (vmdk container) and move/deploy them into some other system. While I have been able to hack a ...
0
votes
1answer
84 views

How to benchmark memory in an embedded linux device?

Is there a generic utility to benchmark external memory device (eMMC, DDR) throughput on an embedded device (e.g. raspberry pi)? memtester, bonnie, bonnie++, memtest, dd? I've been running into ...
6
votes
2answers
428 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 for which all forms of access, for example reads and writes, go directly to my ...
0
votes
2answers
31 views

Can we predict the next registered SCSI mass storage device name

I need to anticipate the device name (sdX) that the next mass storage device (sda, sdb, sdc, …) will receive from the SCSI driver. If I remove one device and connect another one, I noticed that the ...
0
votes
1answer
56 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 ...
5
votes
1answer
3k views

Udev rule is not being used?

I'm setting up udev to handle my external USB hard drive when it gets plugged in and removed (no mounting yet). So far, I've made two new rules in /etc/udev/rules.d/10-local.rules to log ...
0
votes
0answers
20 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
80 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
77 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 ...
6
votes
1answer
2k 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 ...
0
votes
2answers
33 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 ...
2
votes
3answers
1k 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 ...
41
votes
3answers
30k views

How to know if a disk is an SSD or an HDD

I want to know whether a disk is a solid-state drive or hard disk. lshw is not installed. I do yum install lshw and it says there is no package named lshw. I do not know which version of ...
4
votes
1answer
2k 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
2answers
309 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 ...
3
votes
1answer
289 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 ...
2
votes
1answer
72 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?
2
votes
2answers
160 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 ...
13
votes
1answer
700 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 ...
2
votes
2answers
2k 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 ...
5
votes
2answers
1k 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 ...
4
votes
1answer
118 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
99 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
191 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
52 views

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

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 ...
35
votes
4answers
7k 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 ...
1
vote
1answer
50 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?
1
vote
2answers
338 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 - ...
1
vote
1answer
41 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
450 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 ...
5
votes
1answer
598 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, ...
2
votes
1answer
1k 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 ...
2
votes
0answers
96 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 ...
3
votes
1answer
98 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
466 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
125 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?
4
votes
2answers
208 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 ...
7
votes
1answer
2k views

GNU/Linux: overlay block device / stackable block device

GNU/Linux has union mount that overlays dirs. So you can mount a writeable dir on top of a read-only dir. When the writeable dir is unmounted the read-only dir is untouched. I am looking for the same ...
-1
votes
1answer
36 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?