The block-device tag has no wiki summary.
0
votes
1answer
49 views
how to gpio interrupt registering/handling and accessing them from user space in linux [closed]
I am newbie for the linux device drivers please guide me how to do this..
suppose I have connected a switch to one of the controller pin and whenever the switched is press the LED connected to other ...
2
votes
1answer
54 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 ...
1
vote
3answers
232 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
41 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 ...
1
vote
0answers
145 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 ...
13
votes
3answers
628 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 ...
7
votes
8answers
495 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
...
0
votes
2answers
790 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
139 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
82 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
133 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
175 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
244 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 ...
1
vote
0answers
40 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
230 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?
2
votes
2answers
640 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 ...
5
votes
1answer
212 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
1k 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
832 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
603 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
826 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
247 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 ...
4
votes
2answers
1k 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 ...
4
votes
1answer
1k 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 ...
18
votes
6answers
1k 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
1k 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
147 views
2
votes
5answers
982 views
sda and sdb block specials point to same device and get mixed up (hardware RAID doesn't work after new installation of 12.04)
I just installed the latest Ubuntu 12.04 and obviously it screws something up. I'm not sure if this has anything to do with the fact that I have a Raid 1 but at the moment, I have sda and sdb which ...
2
votes
1answer
109 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
323 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 ...
1
vote
3answers
3k 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
1answer
158 views
Bind specific usb out
How can I bind specific usb out to specific /dev/sd* value?
Each time that I plugged in some device in specific usb out it binds to different /dev/sd* location. How can I avoid it to set mounting ...
3
votes
4answers
867 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. ...
4
votes
1answer
189 views
Unmounting HTC device takes forever
Not sure if should post this on Android SE because I don't think this is directly related to the Android OS. On my system I manually mount and umount my HTC device with these options in /etc/fstab:
...
9
votes
4answers
411 views
Is there a way to sync only one partition?
Is there a way to sync only one partition instead of all partitions?
Something like "sync /dev/sdc1".
0
votes
1answer
192 views
block device usage and several mount points
There is some weird thing I don't understand:
I have 2G block.img file with an ext4 filesystem inside. There is a 2G test.txt file in block.img. test.txt consists of letters 'a'.
Then I mount ...
2
votes
2answers
689 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
350 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 ...
2
votes
2answers
458 views
How do I get losetup -a to behave?
# losetup /dev/loop0 /tmp/tmpuUwgbn
# losetup -a
# losetup -f
/dev/loop1
# losetup /dev/loop0
/dev/loop0: [0806]:33654 (/tmp/tmpuUwgbn)
# ls -la /tmp/tmpuUwgbn
-rw------- 1 root root 0 2011-08-24 ...
11
votes
2answers
719 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
2answers
1k views
Mounting multiple img files as single loop device
Is there a way to take an disk img file that is broken up into parts and mount it as a single loop device?
3
votes
2answers
166 views
raid 1/LVM at the level of directories (aka mknodding a directory)
I just experienced data loss, so I am interested in some form of data duplication.
I was thinking of mdadm and companions to raid 1 through software.
However, I just want a given, not too big ...
2
votes
2answers
220 views
Questions on using command mount
When using command mount for a device, I was wondering about the following questions:
Since device file is a parameter to
mount, how does one know what the
device file for a device is in
general?
Do ...
2
votes
3answers
1k 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 ...
5
votes
1answer
507 views
How to determine if disk is compact flash or standard hard drive
I need to determine in a shell script if a given block device (e.g. /dev/sda) is a compact flash disk or a regular hard drive. Google did not help me out for once, and while udevadm info --query=all ...
3
votes
4answers
646 views
How to get size of a block special file?
I need to be able to determine the size of a block special file.
For example, given /dev/sda, I need a command that will provide the size of the device. (By size I mean capacity, since this is a ...
6
votes
3answers
3k views
Prevent a USB external hard drive from sleeping
Does anyone know if there is an elegant way to tell an external usb drive not to spin down after a period of inactivity? I've seen cron based solutions that write a file every minute, but nothing ...
8
votes
2answers
416 views
Prevent disk renumbering on reboot in OSX
I have 3 physical drives in my Mac Pro with OSX 10.6.4. Occasionally after rebooting the machine, the disk numbering changes such that the /dev/disk# does not reference the same drive as it did before ...