Questions tagged [disk]

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

260
votes
9answers
626k 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 ...
40
votes
2answers
59k 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 an answer was ...
5
votes
1answer
8k views

Systemd backed tmpfs | How to specify /tmp size manually

I mount /tmp on tmpfs using: sudo systemctl enable tmp.mount sudo systemctl start tmp.mount But this way /tmp takes up all the free RAM: $ df -h /tmp Filesystem Size Used Avail Use% Mounted ...
89
votes
12answers
166k 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 - ...
26
votes
8answers
64k 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 ...
8
votes
2answers
9k 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 ...
2
votes
1answer
442 views

Why is usb-drive not visible with `lsblk` after having been ejected from Thunar?

If I put a USB-drive in, it will automount. I can see it with lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 1 7,5G 0 disk └─sdb1 8:17 1 7,5G 0 part /media/user/usb-...
2
votes
1answer
719 views

What are the pros and cons of badblock's two non-destructive tests?

I use badblocks to test my 32GB class-10 microSD card that I use to boot my RPi. I already have a functioning file system on it, so I don't want to scan it with the -w option (destructive read-write ...
6
votes
1answer
2k 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): .....
6
votes
4answers
8k 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
2answers
100 views

Installing Linux on hard disk that will be used by another computer with different hardware

I was given a laptop with a totally dead display. I do not want to pay to replace the broken display, but I would like to use the laptop as a server and connect to it via SSH to control it. I have ...
1
vote
2answers
723 views

How to check disks at startup (alternative to chkdsk c: /f on Windows) [duplicate]

How to check my two disks at startup (they're in BIOS RAID 1)? I am on Linux Mint 17.2. computer user # blkid /dev/sda1: UUID="6042-870C" TYPE="vfat" /dev/sda2: UUID="2ef42e6f-4987-46e5-aca9-...
1
vote
1answer
1k views

Long Boot Time (SSD), black screen with blinking cursor, “gave up waiting on suspend/resume device”

Have a Debian-based Linux that has been hardware cloned a few times. There are long boot delays even though it has an SSD. Originally, there had been a little slowly spinning icon saying it was ...
5
votes
1answer
6k 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 move ...
4
votes
4answers
4k views

Btrfs RAID1: How to replace a disk drive that is physically no more there?

I have a btrfs RAID1 system with the following state: # btrfs filesystem show Label: none uuid: 975bdbb3-9a9c-4a72-ad67-6cda545fda5e Total devices 2 FS bytes used 1.65TiB devid 1 ...
0
votes
1answer
1k views

Cannot mount partition - does not start on physical sector boundary?

I have just moved a 3TB disk from an external USB enclosure to inside a computer and I cannot see the only one ext4 partition which is supposed to be there. The disk has extremely important data that ...
-1
votes
1answer
97 views

how to identify if raid1 or raid mirror configure on OS disk

we want to verify if raid1 is configured on out linux machine so we found the answer on - https://serverfault.com/questions/110843/how-to-determine-if-a-centos-system-is-raid-1 but from the output - ...
63
votes
5answers
73k 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 ...
19
votes
3answers
31k views

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 ...
3
votes
1answer
5k views

How to shrink, clone an entire Linux disk and boot it?

I had an Ubuntu 14.04 running on a 1024 GB disk (disk A), which only used up to 130 GB spaces. I want to clone it to a 256 GB SSD disk ( disk B ). But failed. I used gparted to shrink the partitions ...
1
vote
1answer
8k 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....
0
votes
2answers
188 views

Linux block devices naming

I am a bit confused with how linux hard drive/ storage device, block files are named. My questions are: How are IDE devices and partitions named? How are EIDE devices and partitions named? How are ...
12
votes
1answer
7k 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. ...
5
votes
3answers
4k views

How to get disk name that contains a specific partition

If I know that a partition is for example /dev/sda1 how can I get the disk name (/dev/sda in this case) that contains the partition ? The output should be only a path to disk (like /dev/sda). It ...
5
votes
1answer
2k 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 ...
4
votes
3answers
7k 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
940 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 ...
0
votes
2answers
190 views

What does disk label mean?

What does the concept of disk label mean? Does it mean the same as partition table type (MBR, GPT, loop, etc)? (as I suspected from the following output of parted, and in my previous post) Or does ...
6
votes
2answers
37k views

How to shrink a XFS filesystem? [closed]

We have a RHEL 7 server with 2 disks (sda and sdb). Our /, /var/log and swap are on sda, /var is on sdb. We use LVM and XFS. sda is too big (160 GB) and we would like to shrink it to 40 GB. We can ...
6
votes
2answers
3k views

how can I sync a specific device? [duplicate]

Is there a way to sync a specific device in Linux? This would be used to ensure that, e.g., writes to a USB thumb drive have taken place without waiting for queued writes from a video processing job ...
5
votes
1answer
649 views

dmsetup luksFormat creating an alignment inconsistency

When unlocking a newly-formatted LUKS volume, I received a warning in the kernel log: kernel: device-mapper: table: 253:14: adding target device sdk1 caused an alignment inconsistency: ...
3
votes
2answers
173 views

Linux disk space

I've been looking around and I found out that you can find your disk space with df -hT. So I did use it to get the disk space (in total) and how much is left. But the thing is, I wonder if there are ...
3
votes
3answers
120 views

in which cases it will be problematic to configure UUID in fstab

We are thinking about to change all Linux fstab configuration to work with UUID instead the current configuration Some of the disks are with non RAID and some of the disks are with RAID10 I searched ...
3
votes
3answers
1k 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
641 views

How to set per process disk quota?

I want to set disk quota (limit maximum space used in the file system) that a particular process can use under Linux. There seems to be plenty ways to limit disk quota for a user, but not at a per ...
2
votes
2answers
5k 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 ...
2
votes
2answers
612 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
4answers
147 views

Hearing the hard drive when nothing is supposed to use it

Sometimes I hear the hard drive physically working when nothing is supposed to be using it. Is there a way for me to see what is activating it ?
2
votes
1answer
4k views

resize2fs fail to resize partition to full capacity?

Added a new disk (/dev/vdb) of 2TB with existing data from the previous 1TB disk. I used fdisk /dev/vdb to extend its only partition /dev/vdb1 to full capacity of 2TB from previous 1TB. And then I ...
1
vote
2answers
515 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
0answers
277 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 > ...
1
vote
1answer
154 views

Checking for a failed drive in a ZFS pool

I'm testing a large ZFS pool at the minute and am documenting the process for replacing a failed drive before our environment moves into production. I've built the ZFS volume 'diskpool', which is 3 ...
1
vote
1answer
865 views

What is the disk size limit for mdadm?

What, if any, is the disk size limit for mdadm? I've been using mdadm to manage disk arrays for our Mac network for a number of years now. Our storage requirements have grown to the point I'm ...
1
vote
0answers
140 views

mount + verify disk status + disk isnt read/write [closed]

we check the sdb disk to see if this is rw but we get "ew" , what is the meaning of that? mount | grep sdb /dev/sdb on /montoptree/sdb type ext4 (ew,noatime, data=ordered)
1
vote
1answer
6k 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
1answer
628 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
1answer
149 views

How to copy the old disk data ?

I have a server, the old CentOS system is broken, then I use a new disk as a new CentOS system. Now I can use my server now with the new system on new disk. but I want to copy the data from old disk....
0
votes
0answers
132 views

Need to install new distro in LUKS disk

I have a disk encrypted with LUKS and running OpenSuse. I want to to install Fedora in the / partition. The /home is a different partition on the LUKS disk. How can I mount the / so the Fedora ...
-1
votes
1answer
181 views

linux + tool that can identify RAID configuration [duplicate]

I am searching for a long time tool that can runs as CLI on linux machine and identify which RAID configuration is defined on the disk or disks ( according to the list from lsblk ) the reason for ...
-1
votes
2answers
74 views

Linux + how to capture the OS disk device [closed]

we want to capture the disk device that belong to the OS ( Linux ) since each linux machine have list of disks that are not the OS , we want to capture the disk that belong to the OS so by fdisk ...