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

learn more… | top users | synonyms

40
votes
11answers
76k views

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 - ...
21
votes
8answers
40k 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 How ...
4
votes
2answers
5k 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 ...
10
votes
2answers
9k views

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 answer was this ...
6
votes
1answer
846 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): .....
2
votes
1answer
85 views

Move free space from end of the drive to first partition with gparted

I am in a frustrating situation - no matter how I try, gparted won't let me assign the empty space to the first partition: The middle partition is blocking me from expanding /dev/sda1. I need to ...
116
votes
8answers
242k 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 ...
36
votes
4answers
42k 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 ...
8
votes
1answer
2k views

reference whole disk (/dev/sda) using UUID

On my system (Debian), I can see the UUID identifier for all of my disks partitions (i.e. /dev/sda1, dev/sda2, ..) ls /dev/disk/by-uuid/ However, I don't see the UUID identifier for /dev/sda itself....
4
votes
3answers
5k 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 ...
3
votes
4answers
660 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
2answers
3k views

How to use DD to clone a partition off a disk image?

I have a disk image, it's a "whole" disk image, e.g., contains multiple partitions, and I want to clone just one of them (not the first one..) onto a partition on an external drive with multiple ...
3
votes
3answers
989 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
1answer
867 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 ...
2
votes
2answers
337 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 ...
1
vote
1answer
231 views

How to find the true disk usage on my Linux box?

I have a linux box on my school's server. When I was trying to install Protocol Buffers, disk usage is reported as exceeded. So I checked my disk usage by two command on my home directory: du -h ...
1
vote
2answers
394 views

Setting up a RAID 1 in Funtoo [closed]

In short Following the guide How to Set Up a RAID 1 Under GNU/Linux, I have setup a RAID 1. Checking the RAID Array for validity in various ways, appeared to be normal. However, after rebooting the ...
1
vote
1answer
637 views

WRITE SAME manually zero

With Debian 8 and VMware 6 I am seeing these logged quite a bit: WRITE SAME failed. Manually zeroing messages. Is this something to be concerned about? From searches, it seems its related to the 3.9 ...
1
vote
2answers
1k views

start qemu by giving it a path to a linux root

Good evening, I installed ArchLinux on a USB stick, and I would like to boot it in qemu. Unfortunately, most examples I found boot an image (iso..). The stick is definitely bootable as if I restart ...
1
vote
0answers
63 views

sysv and unknown partition table?

We have disk about 1985, It has a Unix.But we didn't know type of Unix.I did the following step : dd if=/dev/sdc of./all_of_disk.iso #sdc is the given disk Then : hexdump -C all_of_disk.iso > ...
0
votes
1answer
52 views

How do I create a dd IMAGE from LVM for recovery purposes [duplicate]

How do I backup a LVM partition to an image for recovery purposes? I am trying to run dd on /dev/sda2, but it crashes after ca 8 hours, at around 380G sudo lvmdiskscan /dev/centos/swap [ 3....