2
votes
1answer
16 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 ...
28
votes
4answers
908 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 ...
6
votes
7answers
455 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
71 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
26 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
93 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
80 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 - ...
2
votes
1answer
382 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 ...
4
votes
2answers
166 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 ...
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
334 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 ...
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 ...
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 ...
3
votes
3answers
579 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 ...
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 ...
8
votes
1answer
510 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 ...
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 ...
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 ...
4
votes
1answer
197 views

Can unformatted partitions have UUIDs?

Can a partition have a UUID without a filesystem?
2
votes
1answer
159 views

Check which network block devices are in use

How can I tell if a /dev/nbd* device is in use? Will "lsof" tell me? Or is there a better way? Is there an equivalent to "losetup -a" which will tell me the next free one?
1
vote
1answer
452 views

Multipath device name doesn't display correctly

I'm playing with iscsi and I'm trying to figure out why the vendor/product names aren't showing up correctly. I've restarted all the appropriate services along with a reboot. Listed below are the ...
3
votes
2answers
986 views

Linux Mint: drives' map changing at reboot brings fstab error

I've set up fstab to auto mount media drives on a Linux Mint machine. The OS is installed on a IDE/ATA Disk while 3 SATA disks hold data to share. The BIOS has the ATA disk as first boot device. All ...
3
votes
2answers
772 views

How can I test whether a block device is read-only from /sys or /proc?

On a CentOS6 system I have /dev/block/sr0 (read only) and /dev/block/sda (read/write). How can I find out programmatically which devices are read-only? There is a ro file in there, but it's '0' for ...
11
votes
2answers
1k views

Weight-based block IO control for VMs

I use KVM to manage my virtual machines. I am trying to limit the resources provided for VMs. I am able to limit the CPU and memory allocated for VMs using libvirt/cgroups. Now I want to control the ...
7
votes
3answers
2k views

Mounting multiple img files as single loop device

Is there a way to take a disk img file that is broken up into parts and mount it as a single loop device?
5
votes
3answers
2k views

Detecting that a device is mounted to a particular folder?

As part of revamping my backup scheme, I'm now adding rotating external hard drives, keeping one safely off-site at all times while the other is receiving backup data. Naturally, to ensure that my ...