立即注冊(cè) 找回密碼

QQ登錄

只需一步,快速開(kāi)始

查看Linux服務(wù)器硬盤(pán)使用情況

2015-3-31 22:08| 發(fā)布者: 學(xué)習(xí)NO.1| 查看: 581| 評(píng)論: 0|原作者: 學(xué)習(xí)NO.1

摘要: 1、查看有幾塊硬盤(pán)命令:df -lh# df -lh Filesystem SizeUsed Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 6.5G692M5.5G12% / tmpfs 764M 0764M 0% /dev/shm /dev/sda1 485M 30M430 ...

1、查看有幾塊硬盤(pán)

命令:df -lh

[root@localhost ~]# df -lh
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     6.5G  692M  5.5G  12% /
tmpfs                 764M     0  764M   0% /dev/shm
/dev/sda1             485M   30M  430M   7% /boot

很明顯,有一個(gè)sda1的scsi硬盤(pán)分區(qū),還有一個(gè)lvs的卷,由于我裝系統(tǒng)時(shí)比較懶,讓CentOS幫我自動(dòng)分的區(qū),最后就搞成這樣了。

這里可以很顯示的看出各硬盤(pán)的分區(qū)、掛載情況,還能看到分區(qū)的空間使用情況。


2、查看硬盤(pán)分區(qū)

命令:fdisk -l

可以查看每個(gè)分區(qū)的詳細(xì)情況


[root@localhost scsi]# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003bc52

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        1306     9972736   8e  Linux LVM

Disk /dev/mapper/VolGroup-lv_root: 6987 MB, 6987710464 bytes
255 heads, 63 sectors/track, 849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/VolGroup-lv_swap: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes


fdisk -l默認(rèn)是查看所有的硬盤(pán),如果只想查看sda盤(pán)的分區(qū)情況,可以使用命令:[root@localhost scsi]# fdisk -l /dev/sda,這樣就不會(huì)列出VolGroup-lv卷的信息了。


I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000



4、查看磁盤(pán)IO狀態(tài)
iostat -d -x -k 1 10


5、查看某個(gè)目錄占用空間的大小
du -sh /root

這個(gè)命令應(yīng)該是非常有用哦!



鮮花

握手

雷人

路過(guò)

雞蛋
相關(guān)推薦
!jz_fbzt! !jz_lxwm! !jz_gfqqq!

關(guān)于我們|手機(jī)版|小黑屋|地圖|【道勤網(wǎng)】-bmrsportswear.com 軟件視頻自學(xué)教程|免費(fèi)教程|自學(xué)電腦|3D教程|平面教程|影視動(dòng)畫(huà)教程|辦公教程|機(jī)械設(shè)計(jì)教程|網(wǎng)站設(shè)計(jì)教程【道勤網(wǎng)】 ( 皖I(lǐng)CP備15000319號(hào)-1 )

GMT+8, 2024-10-23 11:24

Powered by DaoQin! X3.4 © 2016-2063 Dao Qin & 道勤科技

返回頂部