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

learn more… | top users | synonyms

2
votes
2answers
43 views

Find kernel name for a partition when only the label is known

Condition: find reliably device name where disk label (MasiWeek) and disk size (2 TB) are known Motivation: trying to determine what Ubuntu's GUI button mount does Characteristics of the system Disk ...
2
votes
1answer
19 views

Can I safely run badblocks in read-only mode on a mounted drive?

I have /dev/sda mounted on /, as the root partition. Can I safely run badblocks in read-only mode on this device? Will it show false positives/negatives because it's mounted?
2
votes
1answer
74 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 ...
2
votes
2answers
11k views

How to force drop all partitions and erase disk from terminal?

My question is in fact related to OS X, however I'm using Linux tools to resolve my problem. I'm trying to delete all the partitions on my SSD drive and create new GUID (HFS+) partition table. Native ...
0
votes
1answer
2k views

“Spare” disk in a 2-disk mdadm RAID1 array?

I recently had a RAID1 volume fail. It had three primary partitions in it, all participating in separate, but similarly configured VGs. This configuration comes from the fact that the machine is ...
2
votes
1answer
1k views

Problem creating raw disk image and mounting it in rescue mode to QEMU

I am trying to create booting system from raw disk image. This is what I do: $ dd if=/dev/zero of=system2.img bs=1M count=6000 6000+0 records in 6000+0 records out 6291456000 bytes (6.3 GB) copied, ...
0
votes
0answers
23 views

Ignore all other media/drives when live-booting from USB

I am live-booting a custom debian (built using live-build) and I'm wondering how I might prevent the user (even root if it is possible) from reading or writing to the internal hard drive and other ...
2
votes
1answer
846 views

CentOS 5 - hdparm - how to set DMA mode

I'm running CentOS 5 with a PATA hard drive. I've used hdparm to tune the hard disk for better performance, but there are 2 settings that don't work: hdparm -M 254 /dev/hda gives the error ...
2
votes
1answer
34 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 ...
0
votes
1answer
67 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
1answer
11 views

Since when Disks statistics in `top` command are counted?

I've got these disk statistics shown in top command: $ top | head | tail -n1 Disks: 1095425909/52T read, 1016012571/52T written. It's quiet high number for only 37 day uptime. Are these numbers ...
2
votes
1answer
48 views

How can I differentiate disk I/O occured explicitly by a user and OS prefetching?

I am monitoring disk I/O usages of an application program (running on CentOS 7) It uses lots of sequential disk I/Os where I expect that OS prefetching is something! dstat shows how many disk I/Os ...
1
vote
1answer
50 views

Use SWAP as disk cache in Linux

I am using different kind of disks on my server. Is it possible to use faster disk as SWAP and ask Linux to use it as Disk cache As I understand Linux use SWAP only for application data not disk ...
3
votes
0answers
18 views

“leaky bucket” style disk io throttling using linux kernel

My goal is to prevent one kvm guest's disk i/o usage from negatively affecting other kvm guests on the same host. The host has one disk array - and separating guests onto different physical disks is ...
2
votes
2answers
2k 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 ...
0
votes
2answers
41 views

Debian Disk Manager Problem

I have just installed Debian 8.5 Jessie on my computer and I can't find a disk manager. Then I wrote this command to terminal: apt-get install disk-manager. A software installed and I tried to start ...
0
votes
3answers
90 views

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

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

How can I tell when my file system was last fsck-ed at all?

I know of various ways in which to check when the last fsck occurred on a file system. e.g. $ sudo dumpe2fs -h /dev/sda1 | grep 'Mount count' -A3 dumpe2fs 1.42.12 (29-Aug-2014) Mount count: ...
2
votes
0answers
34 views

GNOME Disks Sample Size

I'm trying to use GNOME Disks to test my disk performance and, according to my previous experience, I'd like to set the sample size to 8K, 16K and 32K. However, I see the minimal sample size in its ...
1
vote
1answer
31 views

lsusb not listing a SCSI drive, connected through USB (SATA bridge)?

I'm looking at one of those detachable hybrid laptops, which has extra hard drive in the keyboard base; this laptop runs Ubuntu. Sometimes these drives mount at startup, sometimes not - and in ...
1
vote
0answers
24 views

iozone read test slower than fio

I'm currently using both iozone and fio to test my disk performance. However, iozone show much much poor speed than what is shown from fio. (about 1/3) Now the question for me is which number should ...
1
vote
0answers
24 views

Extending XFS filesystem CentOS 7 Google Cloud

I have Googled everything, and literally nothing is working. Here is df -h: Filesystem Size Used Avail Use% Mounted on /dev/sda1 10G 7.7G 2.4G 77% / devtmpfs 103G 0 103G ...
2
votes
2answers
918 views

how to check default cache mode for disk in kvm

KVM/qemu support various types of cache - none, writethrough, writeback. How to check which one is default and is used on system when no cache= is specified? For RHEL6 i found that it's writethrough ...
2
votes
1answer
51 views

How does iotop calculate the relative I/O activity?

I am running some heavy I/O processes on my workstation and recently installed iotop to monitor them. Here's a recent screenshot: I'm a bit confused about the readings in the IO> column. It ...
1
vote
0answers
29 views

Reclaiming disk space in Ubuntu

In VMWare the hard disks took 13.6 GB, But with df, only 5.8 GB is occupied I don't quite get it. This Virtual Machine has no snapshots, and I already clicked on refresh button in VMWare Fusion ...
2
votes
4answers
2k 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 ...
1
vote
1answer
25 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 ...
1
vote
1answer
64 views

Is there a way to monitor disk i/o patterns? (i.e. random or sequential i/o?)

While an application is running, I can monitor disk bandwidth usage using linux tools including dstat. Now I'd like to know how many sequential or random disk I/Os are occurring in the system. Does ...
37
votes
4answers
43k 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
169 views

Command to generate /dev/disk/-by-path/ name on a system without udev daemon

On most Linux systems udev usually creates symlinks in /dev/disk/by-uuid/ /dev/disk/by-path/ which point to actual device nodes (/dev/sda, /dev/sdb, etc). I don't have udev on my system, and I ...
1
vote
0answers
27 views

Determine affected file given logical block number [duplicate]

Given the logical block number from these log lines in /var/log/messages, is there a way to determine what file was affected? ...Buffer I/O error on device sdd1, logical block 203953715 ...lost page ...
2
votes
0answers
35 views

How to shrink sda disk with XFS filesystem

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 ...
0
votes
0answers
23 views

Ubuntu trusty format disk slower than RHEL7?

I observed that disk formatting is much slower in Ubuntu than in RHEL7. Does anybody know why that is? EDIT: Forgot to mention, I'm formatting the disk with ext4. Using mke2fs
1
vote
1answer
115 views

Load disk driver during Debian installation

I have a server with all disks connected to a controller LSI 3008 IT (non-RAID mode). Unfortunately disks are not detected during installation of Debian Wheezy. Nevertheless the controller can be ...
1
vote
1answer
30 views

How to know what exactly is being written or which process is keeping my storage disk busy?

I have a server , which has gone rogue(not really), i ran nmon and saw that its Disk utilization is BAD, its 100% busy writing!! Here is the output : Can someone tell me what is keeping my disk ...
0
votes
1answer
103 views

Struggling to remove a faulted ZFS pool on Centos 7 using zpool

I have been doing lots of testing of ZFS recently on a new server. I'm ready to move this server into production now, but I'm wondering if I can get rid of my old 'faulted' diskpools before I do, ...
5
votes
4answers
2k views

What is this dd if=/dev/zero of=/dev/sda do

Could someone help me understand what I got? dd if=/dev/zero of=/dev/sda bs=4096 count=4096 Q: Why specifically 4096 for count? dd if=/dev/zero of=/dev/sda bs=512 count=4096 seek=$(expr blockdev --...
3
votes
1answer
61 views

Why is the block size of a partition smaller than that of the underlying disk?

My understanding is that the block (in the phrase "block size") is like an IO buffer, or minimum IO size for a device. Since partitions are built on top of physical devices, how can they have blocks ...
0
votes
0answers
41 views

sfdisk does not create block files for corresponding partition

I have partitioned my disk using sfdisk. And the (7)partitions got created successfully. sfdisk -l also lists all the (7) partitions which I configured. But the strange thing is, the corresponding ...
1
vote
4answers
161 views

How to get hard disk information on linux terminal? [duplicate]

We can get CPU information using lscpu command, is there any command to get hard disk information on Linux terminal, in a similar way?
0
votes
1answer
163 views

Replacing a failed disk in a ZFS pool

I've got a large ZFS disk pool; 3 nested RAIDZ2 vdevs. I am documenting the process for replacing a failed disk for my colleagues and so simulated a disk failure by removing a disk from the host. ...
0
votes
1answer
22 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 ...
0
votes
1answer
60 views

how do I make sda1 or sdb1 bigger

I'm working with Google Cloud services. After I've cloned a VM, I type lsblk after ssh'ing into it and can see that the partition sda1 is only 10 GB, which is only 10% of what I paid for. I am not a ...
2
votes
1answer
115 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 ...
0
votes
0answers
48 views

Random write on DISK benchmark shows high read rate on iostat

I am running a random write benchmark directly on some disks (HDD & SDD) and I am getting some weird output data on the iostat monitor. Besides the usual write rate, there is a read rate that I ...
4
votes
3answers
5k 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. ...
0
votes
0answers
14 views

How do I increase a partition size of a virtual disk?

I created a file using dd if=/dev/zero of=virt_disk bs=1024M count=50. I then formatted this is a vfat file system. Now I want to extend this. I added 5 more MiB of space as dd if=/dev/zero bs=1024M ...
0
votes
0answers
75 views

linux + resize2fs with Operation not permitted error

I am trying to increase the /opt to 65g but I get the following message Operation not permitted While trying to add group #8256 what is the resolution for that? root@linux:/opt # lvresize -L 65g /...
1
vote
1answer
80 views

Correspondence between SCSI device entries in /sys and the disks in /dev

Under the /sys/class/scsi_device folder I have the following: root@linux01:/sys/class/scsi_device # ls 1:0:0:0 2:0:0:0 2:0:1:0 3:0:0:0 How can I know how each of these devices is related to ...
1
vote
2answers
43 views

Can I use dd to move my system to another partition?

Currently, my whole system is located at the end of my hdd. I'd like to move that data to the beginning and still have booting and other details working. dd seems to do exactly what I want (to copy ...