首页 > 代码库 > 命令拷屏之存储信息
命令拷屏之存储信息
磁盘与分区及文件系统
[root@Firewall ~]# hdparm -i /dev/sda 查看硬盘参数
[root@Firewall ~]# fdisk -l 查看所有分区
[root@Firewall ~]# df -h|column -t 查看各分区使用情况
[root@Firewall ~]# mount|column -t 查看挂载的分区状态
[root@Firewall ~]# du -sh /var/log 查看指定目录大小
[root@Firewall ~]# swapon -s 查看所有交换分区
Filename Type Size Used Priority
/dev/sda3 partition 6144852 0 -1
[root@8a2serv ~]# dmesg |grep -i raid 查看raid卡
device-mapper: dm-raid45: initialized v0.2594l
md: Autodetecting RAID arrays.
[root@rac01 ~]# dmesg |grep -i raid 查看raid卡
scsi0 : LSI SAS based MegaRAID driver
Vendor: IBM Model: ServeRAID M1015 Rev: 2.13
device-mapper: dm-raid45: initialized v0.2594l
md: Autodetecting RAID arrays.
[root@rac01 DS_3524]# pwd 查看光纤卡连接的存储分区
/proc/mpp/DS_3524
[root@rac01 DS_3524]# ls
controllerA controllerB virtualLun0 virtualLun1 virtualLun2 virtualLun3 virtualLun4
[root@rac01 DS_3524]# cat virtualLun0 50G 1_file_data /dev/sdb1
Lun WWN: 60080e5000364d6c000010f25253578b linux主机上的这个号对应存储上的这个号
Logical Drive ID: 60:08:0e:50:00:36:4d:6c:00:00:10:f2:52:53:57:8b 存储上看到的
[root@rac01 controllerA]# cd qla2xxx_h7c0t0
[root@rac01 qla2xxx_h7c0t0]# ll
total 0
-rw-r--r-- 1 root root 0 Apr 17 15:28 LUN0
-rw-r--r-- 1 root root 0 Apr 17 15:28 LUN1
-rw-r--r-- 1 root root 0 Apr 17 15:28 LUN2
-rw-r--r-- 1 root root 0 Apr 17 15:28 LUN3
-rw-r--r-- 1 root root 0 Apr 17 15:28 LUN4
[root@rac01 proc]# cd /proc/scsi/ 查看此目录下的信息,与磁盘息息相关
[root@rac02 log]# mount/dev/sda2 on / type ext3 (rw)proc on /proc type proc (rw)sysfs on /sys type sysfs (rw)devpts on /dev/pts type devpts (rw,gid=5,mode=620)/dev/sda1 on /boot type ext3 (rw)tmpfs on /dev/shm type tmpfs (rw)/dev/mapper/vg0-var on /var type ext3 (rw)/dev/mapper/vg0-tmp on /tmp type ext3 (rw)/dev/mapper/vg0-home on /home type ext3 (rw)/dev/mapper/vg0-bak on /backup type ext3 (rw)/dev/mapper/vg0-oracle on /u01 type ext3 (rw)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)oracleasmfs on /dev/oracleasm type oracleasmfs (rw)nfsd on /proc/fs/nfsd type nfsd (rw)/dev/asm/archlv-215 on /archive type acfs (rw)/dev/sdb1 on /fileserv type ext3 (rw)192.168.2.2:/fileserv/ on /var/www/html/upfile type nfs (rw,addr=192.168.2.2)192.168.2.2:/fileserv/ on /mnt/fileserver type nfs (rw,addr=192.168.2.2)192.168.2.2:/fileserv/db on /mnt/db type nfs (rw,addr=192.168.2.2)login as: rootroot@192.168.2.1‘s password:Last login: Tue Oct 28 08:19:41 2014 from 192.168.2.80[root@rac01 ~]# mount/dev/sda2 on / type ext3 (rw)proc on /proc type proc (rw)sysfs on /sys type sysfs (rw)devpts on /dev/pts type devpts (rw,gid=5,mode=620)/dev/sda6 on /var type ext3 (rw)/dev/sda1 on /boot type ext3 (rw)tmpfs on /dev/shm type tmpfs (rw,size=16384M)/dev/mapper/vg0-tmp on /tmp type ext3 (rw)/dev/mapper/vg0-home on /home type ext3 (rw)/dev/mapper/vg0-bak on /backup type ext3 (rw)/dev/mapper/vg0-oracle on /u01 type ext3 (rw)none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)oracleasmfs on /dev/oracleasm type oracleasmfs (rw)nfsd on /proc/fs/nfsd type nfsd (rw)/dev/asm/archlv-215 on /archive type acfs (rw)192.168.2.2:/fileserv/db on /mnt/db type nfs (rw,addr=192.168.2.2)[root@rac01 ~]#
命令拷屏之存储信息