The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
23 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
19 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: ...
3
votes
1answer
212 views

What permissions do I need to write to a card reader?

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
75 views

what is the etymology of `loop device`

What is the etymology of the term loop device Description: Wikipedia: loop device
0
votes
1answer
28 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
57 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
36 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
70 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
56 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
43 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
221 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
21 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
81 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
69 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
49 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
26 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
40 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
165 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
44 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 ...
28
votes
4answers
2k 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
153 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 ...
6
votes
7answers
590 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
243 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
48 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
272 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
166 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
119 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
1k 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
827 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
540 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
45 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
47 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
230 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
108 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
946 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
158 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
4k 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 ...
4
votes
1answer
538 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
94 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
3
votes
1answer
545 views

Finding all partitions with filesystems

I'm writing a script that will copy all of the files on a device to a directory. The problem is that some of the devices have multiple partitions and some of the partitions don't have filesystems to ...
3
votes
3answers
5k views

Persistent blockdev setra read ahead setting

I've got some SSDs mounted up on /dev/sda1 and /dev/sdb1 on a SLES 11 SP2 server, and I was able to tweak the read ahead setting with blockdev --setra: sudo blockdev --setra 4096 /dev/sda sudo ...
2
votes
0answers
132 views

Block Devices & Partitions

I partitioned a microSD card (mmcblk1) into two partitions mmcblk1p1 and mmcblk1p2. If use a dedicated card reader I am able to see the entire SD card and its partitions using various disk management ...
3
votes
1answer
1k views

Obtain device name and mount point if partition label is known

How to obtain the partition device name and mount point when the file system label is known? There are several possibilities: Linux File system label to device name The device name can be obtained ...
4
votes
1answer
543 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 ...
21
votes
3answers
10k 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 ...
14
votes
8answers
6k views

How to determine which sd* is usb? [duplicate]

Possible Duplicate: How to know if /dev/sdX is a connected USB or HDD? The output of ls /dev/sd* on my system is - sda sda1 sda2 sda3 sda4 sda5 sda6 sda7 sdb sdc sdc1 sdc2 ...
8
votes
2answers
8k views

What are character special and block special files in a unix system?

How are character special files and block special files different from regular files in a Inix-like system? Why are they called “character special” and “block special” respectively?
8
votes
1answer
188 views

How to re-size partitions in a complete hard drive image?

I have taken a complete image of a hard drive using: dd if=/dev/sda of=/home/user/harddriveimg bs=4M It would seem to me, that I should be able to re-size the partitions within it after suitably ...
2
votes
2answers
127 views

Why I have two /dev/sdx entries with a single disk?

In my laptop (running Linux) I have only one SSD, connected to the SATA3 port. Why I have two sdx entries in /dev directory? In particular I see /dev/sda and /dev/sdb, and /dev/sda is the SSD: # ...
3
votes
1answer
414 views

Does the (source) device in a tmpfs type mount mean anything?

I just went into /etc/fstab (Linux) and changed my line for /tmp (on which a specific ext4 partition was previously mounted) to tmpfs. This was clearly a bit silly, but I wasn't thinking. Anyway, I ...