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

learn more… | top users | synonyms

110
votes
28answers
36k views

Tracking down where disk space has gone on Linux?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time ...
44
votes
7answers
83k views

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 ...
22
votes
3answers
17k views

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 ...
15
votes
8answers
11k 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 ...
13
votes
2answers
1k views

How to detect if a disk is seeking?

I can use a variety of tools to measure the volume of disk I/O currently flowing through the system (such as iotop and iostat) but I'm curious if it's possible to easily detect if a disk is seeking a ...
13
votes
3answers
751 views

Horrible situation - file systems mounted simultaneously by multiple independent OS instances

How do I get out of this situation safely? Details are as follow: A xen server has got block devices allocated to VMs. But these devices have also been mounted inside Xen. In fact 44 of these ...
11
votes
3answers
2k views

How to get total number of bytes/sectors/blocks written to disk since booting?

I'm considering and update from HDD to SSD. But since Flash cells can only sustain limited writes. I want to know how much data my computer write during normal operation. So I can determine how long ...
9
votes
3answers
429 views

Physically break into box? (Memory & disk)

I have a VPS. I might be able to encrypt my partition but I havent tried. My VPS company I believe can reset my root password although the only SSH key I see is my own. With all my data I have it ...
8
votes
5answers
4k views

Given a kernel ATA exception, how to determine which physical disk is affected?

I woke up this morning to a notification email with some rather disturbing system log entries. Dec 2 04:27:01 yeono kernel: [459438.816058] ata2.00: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x6 ...
7
votes
4answers
6k views

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 ...
6
votes
2answers
697 views

Does the position of partition on disk affect speed?

If I put /var as first partition, then /home and /, will the partition for /var have better performance than if I put other partitions close to head of the disk? Will the disk sector position matter? ...
6
votes
4answers
358 views

Are short-lived files flushed to disk?

My program creates many small short-lived files. They are typically deleted within a second after creation. The files are in an ext4 file system backed by a real hard disk. I know that Linux ...
6
votes
1answer
86 views

???? files in ls -l output

I see ghost files in red colour inside some of my directories: [drey@cyan|23:54|~/downloads]ls -la ls: cannot access teamviewer9_linux.deb: No such file or directory total 1318096 drwxrwx--- 1 root ...
6
votes
2answers
208 views

FreeBSD 10 trace disk activity

Is there any way to find some process which is periodically writing to disk (according to hdd led) on FreeBSD 10 with ZFS (maybe turn ZFS into verbose logging mode)? lsof and other instantly ...
5
votes
3answers
398 views

Why is dd not protected against writing on the active disk ?

I use dd a lot. I live in a contant fear of making a mistake one day, for example writing on sda (computer disk) instead of sdb (USB disk) and then erasing everything I have on my computer. I know dd ...
5
votes
2answers
572 views

How to create a fixed size Linux ramdisk which does never swap to disk?

I want to create a fixed size Linux ramdisk which never swaps to disk. Note that my question is not "why" I want to do this (let say, for example, that it's for an educative purpose or for research): ...
5
votes
2answers
519 views

How do I refresh the magnetic state on a disks with backups?

I have a couple of large disks with backup/archive material on them. They're ext4. Regarding the ones of those that will be stored for a couple of years without reading the whole disc again I've been ...
5
votes
2answers
4k views

Linux Mint freezes on startup

Premise I am running Linux Mint on my sister's computer. Everything was working fine, but than one day she turned it on and she got a strange message she didn't understand. I think it was some kind ...
4
votes
3answers
4k views

Is it safe to resize partition on /?

I currently have a 600gb disk, with Ubuntu installed, 600gb of which is given to the Ubuntu OS: Filesystem Size Used Avail Use% Mounted on /dev/sda1 592G 16G 547G 3% / udev ...
4
votes
2answers
168 views

Determine which process is taking most of disk bandwidth?

When the HDD indicator is blinking (for a long period), how could I know which process is taking most disk bandwidth?
4
votes
1answer
149 views

How to find out which file is affected by a bad sector?

Consider you've been informed about a bad sector like this: [48792.329933] Add. Sense: Unrecovered read error - auto reallocate failed [48792.329936] sd 0:0:0:0: [sda] CDB: [48792.329938] Read(10): ...
4
votes
1answer
623 views

Edit file on image created with dd [duplicate]

I've a bootable USB with Debian. Normally I clone the disk with dd, write the image on a new USB disk, mount this disk on my filesystem and edit some files. Is it possible to edit files on the image ...
4
votes
1answer
10k views

/dev/sdb: No such file or directory (but /dev/sdb1 etc. exist)

I'm not sure what is wrong here but when running fdisk -l I don't get an output, and when running fdisk /dev/sdb # I get this fdisk: unable to open /dev/sdb: No such file or directory I'm ...
4
votes
1answer
42 views

dd, seek with one block size, write with another block size

Background Info: Copying some .bin files to an SD card (to be read by an embedded device, no filesystem) Commissioning the card requires some segments to be wiped (i.e. zero'd), and others to have ...
4
votes
2answers
783 views

How does Linux md-RAID handle disk read errors?

There are 2 cases: the read command times out at kernel level (30 seconds by default), the drive reports its unability to read a given sector before the kernel lose patience (the case I'm ...
3
votes
4answers
412 views

How can I zero files out inside a VMware image file so that their space can be reclaimed?

is there a command on Linux to remove a file but zeroing it's contents first? so if i do, something like this: rm -rf /var/cache/pacman/pkg/* it would overwrite each file on that directory with 0 ...
3
votes
3answers
650 views

Disk size management

I am using Fedora 16. My /dev/sda2, mounted on / (root) with something like 50G got filled 100%: [foampile@~ 13:13:39]> df Filesystem 1K-blocks Used Available Use% Mounted on rootfs ...
3
votes
2answers
3k views

How to Add Extra Disks on KVM based VM

I installed Redhat 6.4 on KVM Server. Right Now there is only One Disk /dev/vda. Now I need to add extra Disk like /dev/vdb I tried adding New Volume but it is not showing when I do fdisk -l How to ...
3
votes
2answers
80 views

How to get size of data that haven't been written to disk yet?

In some programs percentage of copying large files get to 100% very fast and then I'm waiting much more before it goes next step. It's caused by buffer. How to I see amount of data that are going to ...
3
votes
2answers
68 views

Uniquely identifying a drive (not a partition)

I'm writing some automation scripts for full disk backups and I'd like to be fairly precise with which devices are used. I know that one can uniquely identify a partition using UUIDs and blkid, but ...
3
votes
1answer
2k views

What's the easiest way to decrypt a disk partition?

I made a mistake of encrypting the entire LVM physical volume (contains both home, root, and swap) when installing a CentOS 6.4 (2.6.32-358.6.1.el6.x86_64) box. I soon came to realize that moving ...
3
votes
1answer
4k views

recovering ext4 partition after dd'ing over start of HD

I accidentally used dd and wrote over the first 208MB of my external disk. What I wrote over is a partition on its own (Debian nestinstaller) so what I see now is not my old (now damaged) ext4 ...
3
votes
1answer
407 views

libata patch to allow disable sata port

My question is related to the patch introduced in this post How to tell Linux Kernel > 3.0 to completely ignore a failing disk? If the kernel is patched with this code what is the kernel parameter ...
3
votes
1answer
3k views

Expanding the disk size on pfsense under VMWare ESXi

I've been testing pfsense on ESXi for a while. And now I'm almost running out of space. Currently it holds around 30GB and I would like to expand it to 150GB as I'm planning on installing squid for ...
3
votes
2answers
897 views

What could cause a NAS mount to respond slowly?

I've a directory on a NAS mount (from NetApp), that contains ~6300 image files, total size of this directory is ~ 300 MB. I get two different performances of time ls: First time (or after waiting 5-7 ...
3
votes
0answers
244 views

Unable to close a Luks partition

For backup purposes, I have "snapshotted" a LVM partition. This partition was crypted so I have opened this Luks partition (snapshot) in order to do my backup. The problem is that I have forgotten to ...
3
votes
0answers
215 views

Setup Cloudmin on Centos installed in LVM

I installed CentOS 6 with default LVM partition pattern. according to this pattern Can I use Cloudmin and store KVM Disks in LVM as Logical Volume? I think Cloudmin requires creating new logical ...
2
votes
3answers
5k views

Can I create a software RAID 1 with one device

I have a single disk that I want to create a Mirror of, Lets call this disk sda I have just bought another identicle size disk, which we can call sdb. sda and sdb have one partition called sda1 and ...
2
votes
1answer
26 views

how to read any process' /proc/pid/io

I'm trying to monitor disk activity of each process. One way that I found how to do this is to read /proc/pid/io file and compare fields with previous read. That works fine except my monitoring ...
2
votes
1answer
4k views

Unable to create logical partition with Parted

I was fiddling around with parted command on a loopback disk and tried to create some partitions using gpt part table but I keep getting Error: Unable to satisfy all constraints on the partition. when ...
2
votes
4answers
2k views

What is the /dev/disk/by-uuid/ and why does it use all free space on the disk

I have the following Debian that works in Virtual Box: $ uname -a Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux Recently I notice that I don't have any free space: $ df ...
2
votes
1answer
1k views

Mounting another VM's .vdi in VirtualBox

I have two VMs in VirtualBox. For exmaple, VM 1 runs Red Hat, and VM 2 runs Ubuntu. For the Red Hat VM I have redhat.vdi and redhat2.vdi, and for the Ubuntu VM I have ubuntu.vdi and unbuntu2.vdi. ...
2
votes
2answers
1k views

Free space: 0 bytes and files full of data shown as empty

I don't know what's going on. The last evening I left my computer with about 700MB of free space on the system partition and today there is no free space on disk, moreover a lot of files containing ...
2
votes
2answers
138 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: # ...
2
votes
2answers
467 views

How do I navigate to a CD drive?

I'm trying to install Virtualbox Guest Additions in Elementary OS. cd doesn't seem to work with cd VBOXADDITIONS_4.2.6_82870. Update: I did what @ivica recommended, and here's what I'm getting: I ...
2
votes
3answers
228 views

Any programs suitable for making a database over disk-content?

I have quite a lot of external hard-drives, and often have a hard time finding what I'm looking for - not to mention not storing the same file several times on different drives or finding free space ...
2
votes
1answer
183 views

Keeping disk caches when hibernating

Is there a way to keep disk caches when hibernating Linux? I understand and agree that dropping them is the best option all-around. But my system is unresponsive after resume and I would like to give ...
2
votes
2answers
1k views

Can't format external drive

I am trying to format an external drive, but getting the error /dev/sdb1 is apparently in use by the system; will not make a filesystem here! Based on the internet, I have to run cat ...
2
votes
2answers
792 views

RHEL 5.5 - Need to refresh /dev/disk/by-label links

I've added a fibrechannel disk to a RHEL 5.5 server. The disk is present and shows under /dev/sdxx - But I need to give udev a kick and have it refresh the /dev/disk/by-label/LABEL links; this is ...
2
votes
1answer
338 views

Difference between “blockdev --flushbufs” and “sync” on Linux?

Is there a difference in practice between running blockdev --flushbufs and sync(1) on Linux? (apart from blockdev flushing for a specific device, and sync being system-wide). sync(1) manpage says it ...