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

learn more… | top users | synonyms

1
vote
1answer
20 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
32 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
20 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 ...
0
votes
0answers
11 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
7 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 ...
-1
votes
0answers
14 views

how to get disk read/write bytes per second from /proc in programming?

purpose :i want to get information like iostat command can get . I have already known that if open /proc/diskstats or /sys/block/sdX/stat there are information that :sectors read and sectors write. ...
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
2answers
740 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
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, ...
1
vote
1answer
20 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
23 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
19 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
41 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 ...
2
votes
1answer
800 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 ...
36
votes
4answers
41k 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 ...
7
votes
1answer
112 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
25 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
19 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
22 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
60 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
27 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
65 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, ...
4
votes
4answers
926 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
42 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
22 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
133 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
75 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
20 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
49 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
60 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
37 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 ...
3
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
11 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
47 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
48 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
33 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 ...
1
vote
0answers
27 views

monitoring block access to disk

I am looking for a way to monitor access to disk blocks, and to monitor the access as a bitmap of blocks. I also need the capability to freeze (and queue) the device block access (and also to ...
1
vote
1answer
55 views

Where to tar entire USB flash drives?

I want to do all my archiving and compression on the command line. I have a USB flash drive located at /dev/disk/by-label/SanDiskData (which links to /dev/sdc1). I thought I could simply do: $ cd ...
1
vote
3answers
5k views

Disk on key is read only on every computer

I have a 16 GB SanDisk Cruzer Blade Disk-on-key. After a few days of use, it has become write-protected/read-only. When I plug it in, you can see this in my Ubuntu's dmesg: [ 819.003359] usb 2-5: ...
1
vote
1answer
46 views

How to move image disk of a filesystem to a partition [closed]

I have a linux.img file with Arch Linux installed on it. I use the linux.img file to boot Archlinux on virtual machine. I got a new PC and will like to move the linux.img to new PC and boot it from a ...
3
votes
0answers
49 views

Use a “Friendly” Label on Drives or Partitions in FreeBSD

Maybe I am missing this and it's really simple, but I cannot figure out how to label a BSD disk. I have looked at tunefs or gpart and even disklabel, however none do what I am looking for - I don't ...
0
votes
1answer
39 views

Can't boot into my Linux partition--disk is supposedly at fault, but scans show no errors

I'm trying to boot into my Linux partition, but receive this message: Welcome to emergency mode! After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl ...
2
votes
1answer
89 views

where can I find the disk latency using iostat ( await, svctm, %util )?

I'm using Redhat Linux 6.5 and would like to see the disk latencies for the used disks. Using iostat I get the columns await and svctm ( including %util ). But according to the man page of iostat ...
0
votes
1answer
43 views

Only send email if disk usages exceeds 80%

My script is: abc=$(df -h | sed s/%//g | awk '{ if($5 > 80) print "Alert "$0;}' | awk '{print $2,$6}') \ && echo -e "Dear All, \n\n$abc\n\nABC" \ | mailx -s "Disk partition" ...
40
votes
11answers
73k 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 - ...
0
votes
1answer
36 views

Where is the space from LVM partitions?

Additionally, output from my df -h command and fdisk -l command. Where and how could I utilize space from my /dev/sda4 and /dev/sda5 partitions? I suspect /dev/mapper/fedora-root to be my LVM ...
1
vote
0answers
28 views

iostat ( column svctm is not trusted any more ) what to use instead?

I'm running a Linux Server with "Oracle Linux Server release 6.5" which is pretty much the same as RedHat Version. I need to determine the latency on my disk devices. The man page of the iostat ...
7
votes
2answers
8k 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 ...
2
votes
5answers
7k 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 ...