LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-07-2020, 03:21 AM   #1
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Rep: Reputation: Disabled
Post Disk usage.


Hello,
In a RAID system as below, How can I see the free space of specific HDD?
Code:
# df
Filesystem                Size      Used Available Use% Mounted on
/dev/ram0               151.1M    129.4M     21.7M  86% /
devtmpfs                  3.8G      4.0k      3.8G   0% /dev
tmpfs                    64.0M    728.0k     63.3M   1% /tmp
tmpfs                     3.8G         0      3.8G   0% /dev/shm
/dev/md9                509.5M    124.6M    384.9M  24% /mnt/HDA_ROOT
/dev/mapper/cachedev1    29.2T     23.2T      6.0T  79% /share/CACHEDEV1_DATA
/dev/mapper/cachedev2     2.9T    303.6G      2.6T  10% /share/CACHEDEV2_DATA
/dev/mapper/cachedev3     9.9T      7.5T      2.4T  76% /share/CACHEDEV3_DATA
/dev/mapper/cachedev4    25.8T     17.7T      8.1T  69% /share/CACHEDEV4_DATA
/dev/mapper/cachedev6   498.0G    496.2G      1.4G 100% /share/CACHEDEV6_DATA
/dev/mapper/cachedev7  1019.9G    990.0G     29.5G  97% /share/CACHEDEV7_DATA
/dev/mapper/cachedev9     5.0T      3.6T      1.4T  72% /share/CACHEDEV9_DATA
/dev/mapper/cachedev10   199.2G     31.5G    167.2G  16% /share/CACHEDEV10_DATA
/dev/mapper/cachedev11  1019.9G    240.5G    778.9G  24% /share/CACHEDEV11_DATA
/dev/mapper/cachedev13     2.0T      1.1T    862.9G  58% /share/CACHEDEV13_DATA
/dev/mapper/cachedev14   796.8G    434.5G    361.9G  55% /share/CACHEDEV14_DATA
/dev/mapper/cachedev15   498.0G    459.3G     38.2G  92% /share/CACHEDEV15_DATA
/dev/mapper/cachedev18    99.6G      5.9G     93.2G   6% /share/CACHEDEV18_DATA
/dev/mapper/cachedev19  1019.9G    293.6G    725.8G  29% /share/CACHEDEV19_DATA
/dev/mapper/cachedev21   298.8G    127.4G    170.9G  43% /share/CACHEDEV21_DATA
/dev/md13               371.0M    288.3M     82.6M  78% /mnt/ext
tmpfs                     8.0M         0      8.0M   0% /var/syslog_maildir
tmpfs                    32.0M         0     32.0M   0% /.eaccelerator.tmp
For example, I want to see the free space of "/dev/sdy".
Code:
# ls /dev/sdy
sdy   sdy1  sdy2  sdy3
Thank you.
 
Old 11-07-2020, 03:38 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Find out which filesystems, logical volumes, RAID devices etc. use /dev/sdy, then find out how much space they occupy. I would use commands like lsblk, blkid, mdadm.

By the way, what do you mean by "free space"? /dev/sdy could be entirely used up by a RAID device. Half of that RAID device might be occupied by a logical volume. The filesystem on that logical volume is, say, 80% full. How much free space is on /dev/sdy? You can say no free space, since /dev/sdy is entirely used up by the RAID. Or you could say 50%, because half of the RAID device is free. Or 40%. Which free space do you mean?
 
Old 11-07-2020, 04:01 AM   #3
n00b_noob
Member
 
Registered: Sep 2020
Posts: 436

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Find out which filesystems, logical volumes, RAID devices etc. use /dev/sdy, then find out how much space they occupy. I would use commands like lsblk, blkid, mdadm.

By the way, what do you mean by "free space"? /dev/sdy could be entirely used up by a RAID device. Half of that RAID device might be occupied by a logical volume. The filesystem on that logical volume is, say, 80% full. How much free space is on /dev/sdy? You can say no free space, since /dev/sdy is entirely used up by the RAID. Or you could say 50%, because half of the RAID device is free. Or 40%. Which free space do you mean?
Thank you.
The output is:
Code:
# blkid
/dev/mapper/cachedev1: LABEL=
/dev/mapper/cachedev2: LABEL=
/dev/mapper/cachedev3: LABEL=
/dev/mapper/cachedev4: LABEL=
/dev/mapper/cachedev6: LABEL= 
/dev/mapper/cachedev7: LABEL=
/dev/mapper/cachedev9: LABEL=
/dev/mapper/cachedev10: LABEL=
/dev/mapper/cachedev11: LABEL=
/dev/mapper/cachedev13: LABEL=
/dev/mapper/cachedev14: LABEL= 
/dev/mapper/cachedev15: LABEL=
/dev/mapper/cachedev18: LABEL=
/dev/mapper/cachedev19: LABEL=
/dev/mapper/cachedev21: LABEL=
/dev/sda1: UUID="90a34014-e609-4965-b6b4-95f277bfdf23" TYPE="ext2" 
/dev/sda2: UUID="135625c2-46f0-47a9-81b9-6cd15229abae" TYPE="ext2" 
/dev/sda3: UUID="7fb2754b-6d1b-4dfa-8ead-4a5eb14080be" TYPE="ext2" 
/dev/sda5: UUID="ba5d6eee-24a9-43bc-b861-8f4ebfbcd2c7" TYPE="ext2" 
/dev/sda6: UUID="c5a5224c-2a7e-46b4-b98c-e87b07fd65f9" TYPE="ext2" 
/dev/sdb1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdb2: TYPE="swap" UUID="bc9975d8-6353-4a1b-9d36-edeeac541891" 
/dev/sdb3: UUID="2eJHix-PwVI-7RAu-BOJQ-WeEk-gkKo-IfQtrZ" TYPE="lvm2pv" 
/dev/sdb4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdb5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdc1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdc2: TYPE="swap" UUID="bc9975d8-6353-4a1b-9d36-edeeac541891" 
/dev/sdc4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdc5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdd1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdd4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdd5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sde1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sde4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sde5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdf1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdf4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdf5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdg1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdg4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdg5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdh1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdh4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdh5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdi1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdi4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdi5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdj1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdj4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdj5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdk1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdk4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdk5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdm1: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/sdm4: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/sdm5: TYPE="swap" UUID="f5b04666-d13a-4d38-b3af-34bcad657ffa" 
/dev/sdp5: TYPE="swap" UUID="ca49880b-2d71-4ce8-9a38-88b756cb4d9e" 
/dev/sdr2: TYPE="swap" UUID="dba92ae2-5f25-42cd-9bf4-80a752b9e7f0" 
/dev/sdr3: UUID="xFZCoz-eVv1-Ccqn-0jgP-KbcM-j73h-HFVzxy" TYPE="lvm2pv" 
/dev/sdt5: TYPE="swap" UUID="ca49880b-2d71-4ce8-9a38-88b756cb4d9e" 
/dev/sdu5: TYPE="swap" UUID="ca49880b-2d71-4ce8-9a38-88b756cb4d9e" 
/dev/sdv5: TYPE="swap" UUID="ca49880b-2d71-4ce8-9a38-88b756cb4d9e" 
/dev/sdaa5: TYPE="swap" UUID="ca49880b-2d71-4ce8-9a38-88b756cb4d9e" 
/dev/md9: UUID="b8cea29e-3b71-48b8-afa1-8db355428e0f" TYPE="ext3" 
/dev/md13: UUID="17888dd8-8db3-49b5-8461-b5d4a8c1c0e3" TYPE="ext3" 
/dev/md256: TYPE="swap" UUID="bc9975d8-6353-4a1b-9d36-edeeac541891" 
/dev/md258: TYPE="swap" UUID="dba92ae2-5f25-42cd-9bf4-80a752b9e7f0" 
/dev/md1: UUID="2eJHix-PwVI-7RAu-BOJQ-WeEk-gkKo-IfQtrZ" TYPE="lvm2pv" 
/dev/md2: UUID="xFZCoz-eVv1-Ccqn-0jgP-KbcM-j73h-HFVzxy" TYPE="lvm2pv" 
/dev/dm-2: LABEL=
/dev/dm-3: LABEL=
/dev/dm-4: LABEL= 
/dev/dm-5: LABEL= 
/dev/dm-6: LABEL=
/dev/dm-7: LABEL=
/dev/dm-8: LABEL=
/dev/dm-10: LABEL=
/dev/dm-11: LABEL=
/dev/dm-12: LABEL=
/dev/dm-14: LABEL=
/dev/dm-15: LABEL=
/dev/dm-16: LABEL=
/dev/dm-17: LABEL=
/dev/dm-18: LABEL= 
/dev/dm-19: LABEL=
/dev/dm-20: LABEL=
/dev/dm-21: LABEL=
/dev/sdn2: TYPE="swap" UUID="dba92ae2-5f25-42cd-9bf4-80a752b9e7f0"
 
Old 11-07-2020, 05:42 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by n00b_noob View Post
How can I see the free space of specific HDD?
It's the "Available" column.
 
1 members found this post helpful.
Old 11-07-2020, 07:18 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,307
Blog Entries: 28

Rep: Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136Reputation: 6136
This article may help: https://www.linuxjournal.com/article/2597

Note that df lists not just physical devices, but also virtual ones, such as, for example, tmpfs.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script for CPU usage, memory usage, disk partition space and service status reetesh.amity Linux - Server 6 10-12-2015 07:51 PM
Disk Usage Analyzer reports too much disk space? ler0nldb2 Linux - Newbie 1 09-12-2009 10:27 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM
101% disk usage on an empty disk tsiuser Linux - Software 3 01-28-2004 06:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration