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).
23
votes
7answers
45k 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 ...
22
votes
7answers
7k views
dd: How do I know if it's 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 ...
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 ...
18
votes
3answers
526 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 ...
15
votes
2answers
399 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 ...
13
votes
3answers
652 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 ...
11
votes
5answers
2k 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 ...
11
votes
2answers
290 views
How can I be sure that a directory or file is actually deleted?
I know that most files, when deleted, aren't actually removed from the disk, and can be recovered later.
How can I ensure that a directory I had deleted will actually be removed from the disk? Are ...
11
votes
1answer
559 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
11
votes
1answer
957 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 ...
10
votes
1answer
2k 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
7answers
1k 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 ...
8
votes
2answers
484 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 ...
8
votes
4answers
7k 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 ...
7
votes
5answers
261 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
3answers
332 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
2answers
631 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 ...
6
votes
5answers
2k 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: ...
6
votes
5answers
2k 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 ...
6
votes
1answer
384 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
1answer
414 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
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 ...
5
votes
4answers
2k 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 ...
5
votes
3answers
852 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
2answers
826 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 ...
5
votes
3answers
342 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
1answer
622 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
2answers
595 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
1answer
134 views
Hard drive writes freezing up Gnome
I'm currently running Debian 6.0.5 on my white Macbook 2008 (4,1) and have recently noticed that when I download, move, or decompress a file, Gnome freezes up completely for at least 20 seconds. These ...
5
votes
1answer
278 views
Why doesn't dm-crypt handle write barriers properly?
One of the well-known properties of dm-crypt is that it does not handle write barriers properly and hence it requires turning off on-drive write cache to prevent corruption of filesystems. As far as I ...
5
votes
3answers
462 views
Two EFI disks with Grub2
I bought two SSD disks and as usual I though that installing Windows on a completely separate disk would be the easiest solution, but I can't find any tutorials for dual booting with grub2 (efi). All ...
4
votes
2answers
1k 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 ...
4
votes
2answers
1k views
Names for ATA and SATA disks in Linux
Assume that we have two disks, one master SATA and one master ATA. How will they show up in /dev?
4
votes
4answers
168 views
If I have an SSD and a hard disk in a system, can the SSD act as cache for the hard disk?
Say I have some partitions; one on a SATA drive and one on an SSD. I want to create a "virtual" hybrid disk. Is this possible?
4
votes
3answers
268 views
What would be a good choice for an elastic file system (for adding storage at a later date)?
I'm currently running a Debian 6.0 server with EXT3, but I'd like to move over to Arch. It's being used as a file server right now with a 1TB drive in it (of which 650GB in it is used). What I'd like ...
4
votes
2answers
336 views
Create a partition from a directory
I have a Linux system with only one partition /dev/sda1 on /dev/sda disk with / mount point. Is it possible to create partitions after installation?
e.g. create /dev/sda2 with the mount point /home/
...
4
votes
1answer
76 views
Error(?) in output of the dd command
When I run the following command:
dd if=/dev/sda of=output bs=512 count=1
In the middle of the output, I see this text:
GRUB ^@Geom^@Hard Disk^@Read^@ Error^M
What does it mean?
4
votes
2answers
1k 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 ...
4
votes
1answer
544 views
Salvaging a “broken” hard drive
My girlfriend's macbook's hard drive failed, so I gave her a new one and reinstalled OSX on it. Works fine. However, I wanted to see if I could use her old hard drive for backups/fun.
I was able to ...
4
votes
2answers
223 views
What happens when a hard drive fills up?
What happens when a hard drive gets full with Linux running? Does it lock the system? Or something else, or nothing happens?
I am using Ubuntu Linux.
4
votes
2answers
4k views
Can I fix bad blocks on my hard disk with a single command?
I'm working on fixing the errors in my Hard Disk, It's possible to do that manually but it might take hours.
After typing this command sudo badblocks -b 512 /dev/sda, I got hundreds of results and I ...
4
votes
5answers
2k 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.
...
4
votes
2answers
590 views
Are there any issues using 2TB hard drives with 4k sectors
I'm thinking of purchasing a 2TB hard drive (probably a Seagate F4), but I've read reports of Linux not being compatible with 4k sectors on these drives.
Do I have to do anything specific when I ...
4
votes
1answer
219 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 ...
4
votes
2answers
355 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 ...
4
votes
2answers
391 views
Not enough space on / to install new kernel update
During a recent update I received this:
Installing: kernel-default-2.6.37.6-0.11.1 [error]
Installation of kernel-default-2.6.37.6-0.11.1 failed:
(with --nodeps --force) Error: Subprocess failed. ...
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 ...
3
votes
4answers
1k views
GNU/Linux (Debian): detecting hard-disks mappings?
Let's suppose you have two hard-disks:
one internal (boots GNU/Linux);
one external (USB).
"fdisk -l" detects both, but will not tell you which is /dev/sda and which is /dev/sdb. "lsusb" will tell ...
3
votes
2answers
6k views
How extend linux partition with?(after success to extend : fail to boot computer)
I have Ubuntu and I want to enlarge the disk space of /dev/sda1 from 10GB to 90GB.
gparted Ubuntu 9.04 live cd show:
Partition File System Size
/dev/sda1 ext4 10GB
/dev/sda2 ...

