Questions tagged [block-device]

A data storage device that supports reading/writing data in fixed-size blocks, sectors, or clusters.

428 questions
289
votes
10 answers

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 http://pkgs.repoforge.org/lshw/ is suitable for my CentOS. I…
user4951
  • 10,329
  • 28
  • 71
  • 92
192
votes
3 answers

How to list disks, partitions and filesystems in Linux?

In Windows, if you type LIST DISK using DiskPart in a command prompt it lists all physical storage devices, plus their size, format, etc. What is the equivalent of this in Linux?
Mia
  • 1,931
  • 2
  • 11
  • 4
104
votes
3 answers

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 Unix-like system? Why are they called “character special” and “block special” respectively?
Geek
  • 6,548
  • 15
  • 46
  • 70
91
votes
5 answers

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 is not easily deducible from $PWD which is /test.…
StrongBad
  • 5,151
  • 9
  • 47
  • 73
57
votes
2 answers

What is a block device?

I know many examples of block devices (HDDs, SSDs, files, ...), but I haven't heard a simple definition of it. Especially since files are apparently included in the definition I feel a bit confused...
lindhe
  • 4,096
  • 3
  • 20
  • 34
45
votes
4 answers

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 actually want the optical drive to show up as a…
slm
  • 363,520
  • 117
  • 767
  • 871
40
votes
6 answers

List connected storage devices in 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 MOUNTPOINT /dev/sda 8:0 0 465.8G 0 disk…
Alexej Magura
  • 4,356
  • 7
  • 26
  • 39
38
votes
7 answers

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 which drive to physically replace? Bonus: What if I…
Wesley
  • 13,963
  • 12
  • 35
  • 49
35
votes
9 answers

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 to copy it with the speed of 1mb/s, not faster.…
antonone
  • 612
  • 1
  • 6
  • 13
31
votes
11 answers

How can I protect /dev/sdX against accidental formatting?

I am very often dealing with formatting USB drives, that are registered as /dev/sdX. This includes executing mkfs and fdisk and mount and other commands usually executed as root. However, I fear that accidentally I may mistype one single letter, and…
KamilCuk
  • 850
  • 8
  • 16
29
votes
3 answers

Difference between block size and cluster size

I've got a question concerning the block size and cluster size. Regarding to what I have read about that I assume the following: The block size is the physical size of a block, mostly 512 bytes. There is no way to change this. The cluster size is…
pluckyDuck
  • 463
  • 1
  • 4
  • 7
27
votes
8 answers

How to determine which sd* is usb?

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 How should I determine which drive is which?
Kshitiz Sharma
  • 8,585
  • 21
  • 59
  • 75
27
votes
7 answers

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 cciss/c0d0p2 ... 104 16 cciss/c0d1 ... 253 0…
OutputLogic
  • 421
  • 1
  • 4
  • 8
26
votes
4 answers

How to tell Linux Kernel > 3.0 to completely ignore a failing disk?

I have a Samsung laptop (Chronos s7) with one SATA hard disk on bus ata:1, which is detected as /dev/sda, an 8G SSD on ata:2, /dev/sdb, and various other devices on the rest of SATA interface. The problem is that the SSD disk is soldered to the…
Rmano
  • 3,335
  • 5
  • 21
  • 36
23
votes
3 answers

partitioning using 2 hard disks (SSD and non-SSD) in linux

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 partitioning schema (including swap) in my case? When I…
Askar
  • 1,078
  • 2
  • 11
  • 16
1
2 3
28 29