A permanent data storage device used for storing and retrieving digital information using rapidly rotating discs (platters) coated with magnetic material in a rigid form factor (as opposed to floppy disks).

learn more… | top users | synonyms (1)

60
votes
12answers
187k views

How do I find out what hard disks are in the system?

I need to know what hard disks are available, including ones that aren't mounted and possibly aren't formatted. I can't find them in dmesg or /var/log/messages (too much to scroll through). I'm hoping ...
54
votes
10answers
28k views

How do I know if dd is still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
44
votes
2answers
3k views

What NOT to put on an SSD?

I bought an SSD and I am going to set up my desktop system with a completely fresh Linux installation. SSDs are known to be fast, but they have a disadvantage: The number of writes (per block?) is ...
28
votes
3answers
15k 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 ...
21
votes
6answers
7k 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 ...
21
votes
3answers
784 views

How can I limit the output speed of stdout?

I'm running CentOS 5.7 and I have a backup utility that has the option of dumping its backup file to stdout. The backup file is rather large (multiple gigabytes). The target is an SSHFS filesystem. To ...
17
votes
2answers
1k views

What does mv do in case of errors?

I've just tried to move a big tree from one disk to another, which was too small. Now, I'm left with something I can't really understand - it looks like some files were indeed moved away from the ...
15
votes
6answers
19k views

How to see disk details like manufacturer in Linux

With sfdisk -s I can see the disk capacity as follows: $ sfdisk -s /dev/cciss/c0d0: 143338560 total: 143338560 blocks How do I see disk details like disk manufacturer? I tried hdparm, but got an ...
14
votes
4answers
6k views

GPT or MBR: How do I know?

How can I tell whether my harddrive is laid out using an MBR or GPT format?
13
votes
5answers
11k views

How to find which process is regularly writing to disk?

How can I find which process is constantly writing to disk? I like my workstation to be close to silent and I just build a new system (P8B75-M + Core i5 3450s -- the 's' because it has a lower max ...
13
votes
3answers
5k views

Differences between volume, partition and drive

What do these terms mean exactly? partition volume drive On Windows, one may say drive C: or partition C:. On Linux I'm not sure what should be used for partitions because they don't have a name.
13
votes
1answer
2k views

Is disabling barriers for ext4 safe on a laptop with battery?

The manual page says about the barrier option for ext4: Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance ...
12
votes
7answers
5k views

What's the best way to format a HDD in Linux in order to leave no trace?

I'm running Debian and need a way to format the entire hdd in order to not leave any trace on it because I want to donate it to a friend. So what will be the best way in order to format it? If I ...
11
votes
7answers
804 views

Can I label a disk device rather than a partition?

I know about the e2label and friends program for attaching a label to a disk partition e.g. e2label /dev/sda1 bla What I want to do is something different: I want to create a label for a hard ...
11
votes
2answers
6k views

How to Throttle per process I/O to a max limit?

I'm looking for a way to limit a processes disk io to a set speed limit. Ideally the program would work similar to this: $ limitio --pid 32423 --write-limit 1M Limiting process 32423 to 1 megabyte ...
11
votes
3answers
982 views

saving data from a failing drive

An external 3½" HDD seems to be in danger of failing — it's making ticking sounds when idle. I've acquired a replacement drive, and want to know the best strategy to get the data off of the dubious ...
11
votes
1answer
954 views

What is the difference between “extended” partition and “logical” partition

What is the difference between "extended" partitions and "logical" partitions on my hard disk? What's the need for each? I am using Linux
10
votes
4answers
5k views

Convert image of a partition into image of a disk with partition table

I have an image of an existing partition generated with dd if=/dev/sdXN of=image.bin. Now I want to use this image as the basis for a virtual machine. I know how to convert the image into a format ...
10
votes
1answer
4k views

Using a LVM partition as a Virtualbox drive

Is it possible to use a LVM partition as a Virtualbox disk? I can't find any option to use a device as a Virtualbox disk, only disk images.
9
votes
2answers
3k views

Why can an unpriviliged user execute the `sync` command?

Currently on Ubuntu Linux, but I noticed this on other OS's too. Apparently any user can execute the sync command, but why is this? I can only see the disadvantage: system slow down due to unnecessary ...
9
votes
3answers
300 views

Is there a risk of data corruption if suspended laptop runs out of battery?

I often tend to just put my laptop on suspend using xfce4-power-manager, and although usually the battery is sufficiently charged up until the next time (when I plug in the charger), sometimes I ...
8
votes
5answers
6k views

How to know if /dev/sdX is a connected USB or HDD?

How can I know if /dev/sdX is a local HDD or usb key ? best doing this without root privileges. OK , udevadm helped a lot: For local HDD: udevadm info --query=all --name=sdb | grep ID_BUS E: ...
7
votes
5answers
601 views

Can I see what HDD I have installed? [duplicate]

I use lspci for pci devices and lsusb to list the usb hardware devices, is there something similar to list my SATA HDD model ?
7
votes
1answer
715 views

In what sense does SATA “talk” SCSI? How much is shared between SCSI and ATA?

This is nothing new to me at least, that SATA actually "talks" SCSI, hence why these SATA devices show up as SCSI devices in Linux. A related question has been asked before, e.g. Why do my SATA ...
7
votes
3answers
352 views

How do you tell what hard drive a file is on?

On Debian, I have multiple hard drives, how do I know where /var/www is? Bonus: How do I check the capacity and consumed capacity and of my drives?
7
votes
6answers
3k views

Sync writes very slow. Ubuntu 10.10, 32 bits, ext4

I am running ActiveMQ on my Macbook Pro that runs Ubuntu 10.10, 32 bits with an ext4 partition. Linux iker-laptop 2.6.35-23-generic-pae #40-Ubuntu SMP Wed Nov 17 22:32:51 UTC 2010 i686 GNU/Linux If ...
7
votes
3answers
7k views

How can I benchmark my HDD?

I've seen commands to benchmark one's HDD such as this using dd: $ time sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 && sync" Are there better methods to do so than this?
7
votes
3answers
493 views

Harddrive I/O per Pid

is there any way to see the disk I/O per pid/process ? Monitorix shows me the following and correct me if I´m wrong, but it looks like that the harddrive is slowing down the whole system: UPDATE #1 ...
7
votes
4answers
331 views

Protecting Devices from dd and fdisk Commands

I'm wondering if there is some way to prevent certain certain devices from becoming the output file of the dd command and the target of the fdisk command. I'm currently using the two operations to set ...
7
votes
2answers
1k views

How to time grep commands accurately?

I want to compare the speed of these two commands: grep pattern1 files* grep pattern2 files* Unfortunately, the first grep reads much of files* into memory buffers, so the second grep runs ...
7
votes
5answers
5k views

Backup whole hard disk Linux

I am looking for a method to backup a whole disk in case something is screwed up... I don't even know what to install on some special devices of the server, and every time it is not the same. ...
7
votes
1answer
590 views

How to re-size virtual disk with installed Linux system?

I've got hard system configuration there and I don't want to re-install it again but I need more space now. Current system space is 30GB. Seems like it's not possible to re-size disk so what I need ...
6
votes
2answers
3k views

Does a bad sector indicate a failing disk?

My Ubuntu 13.10 system has been performing very poorly over the last day or so. Looking at the kernel logs, it appears that the <1yr old 3TB SATA disk is having issues with a particular sector: ...
6
votes
2answers
221 views

Reduce bad block retry / wait times in Ubuntu

How can I reduce the IO wait time and retry times so that the OS doesn't continually try to write to a failing drive? I have an system that I use to make copies of demo content that gets loaned out ...
6
votes
1answer
460 views

Why are there 2048 sectors of free space between each logical partition?

I know about the advanced format and setting 2048 free sectors at the beginning of a disk. But I just converted a partition table of my disk from MS-DOS to GPT, and I noticed this: Before: Number ...
6
votes
1answer
515 views

HDD allocation fstab

In my PC running Ubuntu 12.04 LTS I have installed three SATA hard drives. Two of them are installed near a cooler. I want to physically switch two drives (one that is not near the fan should be moved ...
6
votes
3answers
251 views

Which command to force a drive to spin up?

I've looked through the manual for hdparm, sdparm. I know there are arguments to spin down the drive, with -y and -Y. I also know there are arguments to control the power saving features, such as -S ...
6
votes
3answers
2k views

How to clone a NTFS partition (WinXP) from a damaged disk to a new one?

I'm an Italian Windows programmer. I know almost nothing of Linux, so please be patient if the question is dumb and pardon my bad english. I need to clone a NTFS partition from a damaged, near to die ...
6
votes
3answers
7k 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 ...
5
votes
2answers
2k views

Hight iowait while the wMB/s is low

I was indexing a MySQL table. It makes a high load on that computer. It seems due to a high iowait. But it also shows that the wMB/s is only 2.87. Isn't even a common SATA HDD able to handle more ...
5
votes
3answers
587 views

What would happen if a hard drive failed while the Linux kernel was running?

I've always been curious of what would happen if a hard drive failed while the Linux kernel was running. Since the kernel image itself is loaded completely into RAM, I don't imagine there would be any ...
5
votes
4answers
2k views

Finding out what is spinning up harddrive

I am the owner of a NAS, running some Linux distribution. It comes with a web administration frontend, where I can manage several services, user rights and also when it should go to sleep. My problem ...
5
votes
3answers
4k views

Recovering an ext4 filesystem with corrupt journal

I have a hard drive that seems to have developed some kind of hardware problem in the journal. This prevents the drive from being loaded. Running mount -r -t ext4 /dev/sda5 /mnt/root results in the ...
5
votes
1answer
2k views

Does my hard-drive have bad sectors or not?

I got a new drive and I'm confused if smartctl detects bad sectors or not. Both short and extended self-tests completed without error. But the Error Log indicates Uncorrectable error in data for 96 ...
5
votes
2answers
2k views

Is this ddrescue command doing anything?

In the course of trying to recover data from a failing hard drive, I am running the command ddrescue. The command has been running for 9 days, and I thought from the sound of disk activity that maybe ...
5
votes
1answer
2k views

“echo 1 > /sys/block/sdX/device/delete” on all disks except predetermined list

I have a list of scsi disks that I need to remove. The list is considered random at best and changes from time to time. I want to remove everything except a predefined list that I have created. Let's ...
5
votes
1answer
329 views

Is it worth using vdmfec for backups to external SATA/IDE hard drives?

I have some SATA/IDE hard drive enclosures that I use for backups. The drives for formatted with VFAT, since I need to be able to share them with Windows and OS/X machines. The backup scripts pipe ...
5
votes
2answers
1k views

How to create a snapshot of a physical disk?

I have Windows 7 installed on one of my disks. I want to boot this Windows system in my Xen HVM, but I do not want the changes to be permanent. So I want to create a snapshot of my Windows 7 ...
5
votes
2answers
1k views

Diskless workstations

For various reasons I need a setup with one server, and two diskless workstations. The workstations are to be "fat clients", which means I want to enable them to use their own CPU, memory, etc, for ...
5
votes
2answers
258 views

How do I check if a particular hard disk is dynamic?

What commands do I have to check the dynamic or basic type disk/volumes of the Windows partitions? Topic of interest because: Warning: Don't install linux on a Windows Dynamic disk! Bug Report: ...