Questions tagged [disk]

Questions about disk drives under the UNIX and Linux systems. See also the "filesystems" tag.

Check also the tags and .

856 questions
361
votes
11 answers

How can I monitor disk io?

I'd like to do some general disk io monitoring on a debian linux server. What are the tools I should know about that monitor disk io so I can see if a disk's performance is maxed out or spikes at certain time throughout the day?
camomileCase
  • 3,835
  • 3
  • 14
  • 7
144
votes
14 answers

List partition labels from the command line

Is there a command that will list all partitions along with their labels? sudo fdisk -l and sudo parted -l don't show labels by default. EDIT: (as per comment below) I'm talking about ext2 labels - those that you can set in gparted upon…
sdaau
  • 6,668
  • 12
  • 57
  • 69
86
votes
6 answers

How can I safely remove a SATA disk from a running system?

I sometimes need to plug a disk into a disk bay. At other times, I have the very weird setup of connecting a SSD using a SATA-eSATA cable on my laptop while pulling power from a desktop. How can I safely remove the SATA disk from the system? This…
Lekensteyn
  • 20,173
  • 18
  • 71
  • 111
64
votes
5 answers

Are file edits in Linux directly saved into disk?

I used to think that file changes are saved directly into the disk, that is, as soon as I close the file and decide to click/select save. However, in a recent conversation, a friend of mine told me that is not usually true; the OS (specifically we…
JuanRocamonde
  • 751
  • 1
  • 5
  • 9
58
votes
2 answers

Eject / safely remove vs umount

I'm using Ubuntu 12.04, and when I rigth click on a my flash drive icon (in the Unity left bar) I get two options that have me confused: eject and safely remove. The closer I came to an answer was this forum thread, which concludes that (for a…
LGenzelis
  • 701
  • 1
  • 6
  • 8
55
votes
5 answers

What's the difference between creating mdadm array using partitions or the whole disks directly

Can someone please explain to me, what the difference is between creating mdadm array using partitions or the whole disks directly? Supposing I intend to use the whole drives. Imagine a RAID6 created in two ways, either: mdadm --create /dev/md0…
Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
54
votes
4 answers

How to get hard disk information on linux terminal?

We can get CPU information using lscpu command, is there any command to get hard disk information on Linux terminal, in a similar way?
Varun
  • 551
  • 1
  • 4
  • 3
52
votes
1 answer

Why is most the of disk IO attributed to jbd2 and not to the process that is actually using the IO?

When monitoring disk IO, most of the IO is attributed to jbd2, while the original process that caused the high IO is attributed a much lower IO percentage. Why? Here's iotop's example output (other processes with IO<1% omitted):
Sparkler
  • 1,039
  • 2
  • 13
  • 18
44
votes
15 answers

How can I speed up secure erasing of a disk?

I need to securely erase harddisks from time to time and have used a variety of tools to do this: cat /dev/zero > /dev/disk cat /dev/urandom > /dev/disk shred badblocks -w DBAN All of these have in common that they take ages to run. In one case …
markgraf
  • 2,849
  • 1
  • 8
  • 20
43
votes
1 answer

How to get total read and total write IOPS in Linux?

How do I get read and write IOPS separately in Linux, using command line or in a programmatic way? I have installed sysstat package. Please tell me how do I calculate these separately using sysstat package commands. Or, is it possible to calculate…
shas
  • 2,578
  • 4
  • 17
  • 31
28
votes
6 answers

UUID Of A drive that won't show up in /dev/disk/by-uuid or blkid

I have a USB drive that is not receiving a UUID. When I look at the contents of the /dev/disk/by-uuid it doesn't exist there. The dev point that the partition lives in is on /dev/sdb. I am able to see sdb under /dev/disk/by-path. Also, when using…
monksy
  • 723
  • 2
  • 8
  • 15
27
votes
3 answers

Can I create a software RAID 1 with one device

I have a single disk that I want to create a mirror of; let's call this disk sda. I have just bought another identically-sized disk, which we can call sdb. sda and sdb have one partition called sda1 and sdb1 respectively. When creating a raid, I…
whoami
  • 3,750
  • 7
  • 27
  • 26
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

What does `dd if=/dev/zero of=/dev/sda` do

Edited: do not run this to test it unless you want to destroy data. Could someone help me understand what I got? dd if=/dev/zero of=/dev/sda bs=4096 count=4096 Q: Why specifically 4096 for count? dd if=/dev/zero of=/dev/sda bs=512 count=4096…
J H
  • 837
  • 1
  • 11
  • 14
25
votes
4 answers

Is there a good drive torture test tool?

I have been having odd and rare filesystem corruption lately that I suspect is the fault of my SSD. I am looking for a good drive torture test tool. Something that can write to the whole disk, then go back and read it looking for flying writes,…
psusi
  • 17,007
  • 3
  • 40
  • 51
1
2 3
57 58