The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
0answers
7 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
24 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 ...
2
votes
1answer
18 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
31 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
914 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
46 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
456 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
73 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
27 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
116 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
94 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
81 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 - ...
11
votes
3answers
673 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
384 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 ...
1
vote
1answer
332 views

Please help me understand 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
39 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 ...
4
votes
2answers
168 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
97 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 ...
2
votes
1answer
519 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
120 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
2k 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 ...
3
votes
1answer
336 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
88 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
2
votes
1answer
366 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
4k 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 ...
1
vote
0answers
119 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
813 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
419 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 ...
17
votes
3answers
7k 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 ...
13
votes
8answers
4k 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 ...
6
votes
2answers
6k 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
179 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
117 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
347 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 ...
1
vote
2answers
439 views

Writing data on particular sectors or blocks

Not sure if it's better suited for superuser of serverfault boards, let me know. I have a drive which I repartitioned with fdisk. Initially there was only one big partition, now there are a number ...
3
votes
3answers
582 views

When and why do block devices need to be partitioned? [duplicate]

Possible Duplicate: The merits of a partitionless filesystem So I've got a block device, say /dev/sda or /dev/loop0. Clearly if I want to boot from the former, or I want to subdivide it ...
2
votes
0answers
63 views

xdelta3 fails to decode on block device

I'm trying to use xdelta3 to bring a remote block device into sync with a local one. I'm able to easily generate a xdelta3 patch file using the command: xdelta3 -e -B 33554432 -v -9 -I 0 -s ...
6
votes
1answer
511 views

Run shell script when new volume mounted

I'm interested in running an rsync script whenever any new volume is mounted on my Debian box. What are some potential triggers / strategies for listening for a new volume mount?
4
votes
2answers
1k views

What is /dev/xvde1?

I'm having to do with an OpenShift RHEL Linux installation running on Amazon EC2. In the filesystem, there is a device file named /dev/xvde1 mounted to / ... and a device file named /dev/xvde2 mounted ...
4
votes
2answers
2k views

Where is the GUID Partition Table stored on a device?

A friend of mine used my USB stick to install a new version of OS X on his mac. Now that I got it back, I wanted to wipe it (I use Linux myself). However, I'm having a bit of trouble doing so. The ...
8
votes
1answer
511 views

What driver is behind a certain device file?

Given a device file, say /dev/sdb, is it possible to determine what driver is behind it? Specifically, I want to determine what driver my storage devices are using. fdisk -l lists 2 devices: /dev/sda ...
2
votes
2answers
2k views

Mixing 4k/512 drives with ZFS (FreeNAS)

I have the following drives: Seagate Barracuda ST3200054AS WDC WD20EADS-00S2B0 Samsung HD204UI As far as I understand, the first are ordinary 512 drives while the last is 4096 (Advanced format). ...
6
votes
3answers
2k views

How to read the in-memory (kernel) partition table of /dev/sda?

I accidentally overwrote my /dev/sda partition table with GParted (full story on AskUbuntu). Since I haven't rebooted yet and my filesystem is still perfectly usable, I was told I might be able to ...
5
votes
3answers
1k views

Does /init (or /linuxrc) script creates temporary device nodes in /dev?

Considering that GRUB executes following lines: kernel /vmlinuz root=/dev/sda1 ro initrd /initrd On boot, how does the Linux kernel finds out about /dev/sda1 device node? I know that ...
6
votes
2answers
2k views

Find filesystem of an unmounted partition from a script

I'm writing a custom automated install using AIF (Arch Installation Framework), and I need to find the filesystem on a partition given a partition. So far I have this: grok_partitions () { local ...
2
votes
0answers
422 views

How to check/test internal card reader speed

I got new SD card claimed to be 10 class of speed, but internal Disk utility in linux after test showed up only 6th class of speed. How can I check my card reader speed to be sure that it's not the ...
5
votes
3answers
3k views

Mapping between logical and physical block device names

I cannot figure out the mapping between different logical and physical block device names. The output of "cat /proc/diskstats" is : 104 0 cciss/c0d0 ... 104 1 cciss/c0d0p1 ... 104 2 ...
5
votes
1answer
2k 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 ...
21
votes
6answers
4k views

How do I correlate /dev/sd devices to the hardware they represent?

A drive is beginning to fail and I only know the device by its /dev/sdb device file designation. What are the ways that I can use to correlate that device file to an actual hardware device to know ...
3
votes
4answers
2k views

From df device name to physical drive name (vendor / type)

Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as vendor / type. /dev/sda3 915.4G 34.9G 880.0G 4% /share/HDA_DATA /dev/sdd3 ...