当前位置: 技术问答>linux和unix
学习Linux遇到的问题,向各位求教
来源: 互联网 发布时间:2017-02-14
本文导语: SoftWareRAID部分: 1、[root@rhel5 ~]# blkid /dev/sdb1: LABEL="/" UUID="acebd69a-3187-4edc-999d-3f79ea752d30" TYPE="ext3" /dev/sda2: LABEL="SWAP-sda2" TYPE="swap" /dev/sda1: LABEL="/boot" UUID="fdb2ff85-dd97-4e0f-9067-6b1ae98a9dc9" TYPE="ext3" /dev/sda6: UUID="790e0...
SoftWareRAID部分:
1、[root@rhel5 ~]# blkid
/dev/sdb1: LABEL="/" UUID="acebd69a-3187-4edc-999d-3f79ea752d30" TYPE="ext3"
/dev/sda2: LABEL="SWAP-sda2" TYPE="swap"
/dev/sda1: LABEL="/boot" UUID="fdb2ff85-dd97-4e0f-9067-6b1ae98a9dc9" TYPE="ext3"
/dev/sda6: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" TYPE="ext3"
/dev/sdb6: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" TYPE="ext3"
/dev/md0: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" SEC_TYPE="ext2" TYPE="ext3"
/dev/md1: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" SEC_TYPE="ext2" TYPE="ext3"
/dev/md2: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" TYPE="ext3" /dev/vg0/lv0: UUID="6b35ad9d-4367-4204-908c-70bac0655456" SEC_TYPE="ext2" TYPE="ext3"
/dev/cdrom: LABEL="RHEL/5.5 i386 DVD" TYPE="iso9660"
问题:dev/md0、/dev/md1是raid 0;/dev/md2是在这两个raid0的基础上做的raid1
为什么/dev/sda6/、dev/sdb6/、dev/md0、/dev/md1、/dev/md2这几个设备的UUID都一样?!
2、[root@rhel5 ~]# fdisk -l
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 274 2096482+ 82 Linux swap / Solaris
/dev/sda3 275 1958 13526730 5 Extended
/dev/sda5 275 276 16033+ 83 Linux
/dev/sda6 277 278 16033+ 83 Linux
/dev/sda7 279 280 16033+ 83 Linux
/dev/sda8 281 282 16033+ 83 Linux
/dev/sda9 283 284 16033+ 83 Linux
Disk /dev/sdb: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1305 10482381 83 Linux
/dev/sdb3 1306 1958 5245222+ 5 Extended
/dev/sdb5 1306 1307 16033+ 83 Linux
/dev/sdb6 1308 1309 16033+ 83 Linux
/dev/sdb7 1310 1311 16033+ 83 Linux
/dev/sdb8 1312 1313 16033+ 83 Linux
/dev/sdb9 1314 1315 16033+ 83 Linux
Disk /dev/md0: 32 MB, 32636928 bytes
2 heads, 4 sectors/track, 7968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 32 MB, 32636928 bytes
2 heads, 4 sectors/track, 7968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md2: 32 MB, 32571392 bytes
2 heads, 4 sectors/track, 7952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md2 doesn't contain a valid partition table
问题:为什么fdisk -l的命令会说所有的raid设备都没有有效的分区表
============================================================================================
系统日志服务部分
[root@rhel5 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:70:E8:F0
inet addr:192.168.0.88 Bcast:192.168.0.255 Mask:255.255.255.0
[root@rhel5 ~]# vim /etc/syslog.conf
authpriv.* /var/log/secure
mail.* -/var/log/maillog
*.* @192.168.0.89
cron.* /var/log/cron
*.emerg *
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
[root@rhel5 ~]# /etc/init.d/syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
[root@rhel5 ~]# /etc/init.d/squid restart
Stopping squid: [FAILED]
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 62: 3505 Aborted $SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
Starting squid: /etc/init.d/squid: line 42: 3506 Aborted $SQUID $SQUID_OPTS >> /var/log/squid/squid.out 2>&1
[FAILED]
[root@rhel5 ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[root@rhel51 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:BC:3A:16
inet addr:192.168.0.89 Bcast:192.168.0.255 Mask:255.255.255.0
[root@rhel51 ~]# cat /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-m 0 -r"
KLOGD_OPTIONS="-x"
SYSLOG_UMASK=077
[root@rhel51 ~]# /sbin/syslogd -rm 0
[root@rhel51 ~]# /etc/init.d/syslog restart
Shutting down kernel logger: [FAILED]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
[root@rhel51 ~]# tail -f /var/log/messages
Apr 4 06:34:49 rhel51 kernel: ide: failed opcode was: 0xec
Apr 4 06:38:29 192.168.0.88 syslogd 1.4.1: restart.
Apr 4 06:38:29 192.168.0.88 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Apr 4 06:39:38 rhel51 kernel: Kernel logging (proc) stopped.
Apr 4 06:39:38 rhel51 kernel: Kernel log daemon terminating.
Apr 4 06:39:39 rhel51 exiting on signal 15
Apr 4 06:39:54 rhel51 syslogd 1.4.1: restart (remote reception).
Apr 4 06:40:03 rhel51 exiting on signal 15
Apr 4 06:40:03 rhel51 syslogd 1.4.1: restart (remote reception).
Apr 4 06:40:03 rhel51 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Apr 4 06:40:33 192.168.0.88 kernel: Kernel logging (proc) stopped.
Apr 4 06:40:33 192.168.0.88 kernel: Kernel log daemon terminating.
Apr 4 06:40:34 192.168.0.88 exiting on signal 15
Apr 4 06:40:34 192.168.0.88 syslogd 1.4.1: restart.
Apr 4 06:40:34 192.168.0.88 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Apr 4 06:42:14 192.168.0.88 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Apr 4 06:42:14 192.168.0.88 kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Apr 4 06:42:14 192.168.0.88 kernel: NFSD: starting 90-second grace period
Apr 4 06:42:36 192.168.0.88 dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Apr 4 06:42:36 192.168.0.88 dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Apr 4 06:42:36 192.168.0.88 dhcpd: All rights reserved.
Apr 4 06:42:36 192.168.0.88 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Apr 4 06:42:36 192.168.0.88 dhcpd: Address range 192.168.25.2 to 192.168.0.254, netmask 255.255.255.0 spans multiple subnets!
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: If you did not get this software from ftp.isc.org, please
Apr 4 06:42:36 192.168.0.88 dhcpd: get the latest from ftp.isc.org and install that before
Apr 4 06:42:36 192.168.0.88 dhcpd: requesting help.
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: If you did get this software from ftp.isc.org and have not
Apr 4 06:42:36 192.168.0.88 dhcpd: yet read the README, please read it before requesting help.
Apr 4 06:42:36 192.168.0.88 dhcpd: If you intend to request help from the dhcp-server@isc.org
Apr 4 06:42:36 192.168.0.88 dhcpd: mailing list, please read the section on the README about
Apr 4 06:42:36 192.168.0.88 dhcpd: submitting bug reports and requests for help.
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: Please do not under any circumstances send requests for
Apr 4 06:42:36 192.168.0.88 dhcpd: help directly to the authors of this software - please
Apr 4 06:42:36 192.168.0.88 dhcpd: send them to the appropriate mailing list as described in
Apr 4 06:42:36 192.168.0.88 dhcpd: the README file.
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: exiting.
Apr 4 06:43:17 192.168.0.88 squid[3505]: Could not determine fully qualified hostname. Please set 'visible_hostname'
Apr 4 06:43:18 192.168.0.88 squid[3506]: Could not determine fully qualified hostname. Please set 'visible_hostname'
Apr 4 06:44:31 192.168.0.88 winbindd[3558]: [2012/04/04 22:41:44, 0] nsswitch/winbindd_cache.c:initialize_winbindd_cache(2229)
Apr 4 06:44:31 192.168.0.88 winbindd[3558]: initialize_winbindd_cache: clearing cache and re-creating with version number 1
问题:为什么192.168.0.89没有为192.168.0.88的httpd服务做日志,而且192.168.0.88的/var/log/httpd/下有日志而192.168.0.89的/var/log/httpd下什么都没有呢
===========================================================================================================
进程部分:
[root@rhel5 ~]# pkill -9 3571
[root@rhel5 ~]# ps -aux | grep yum
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 3215 0.0 0.9 25568 10256 ? SN 22:32 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root 3571 0.1 1.6 28128 16716 pts/1 S+ 22:43 0:01 /usr/bin/python /usr/bin/yum search vsftp
root 3626 0.0 0.0 3924 700 pts/0 S+ 22:55 0:00 grep yum
问题:为什么3571进程没有终止?!
1、[root@rhel5 ~]# blkid
/dev/sdb1: LABEL="/" UUID="acebd69a-3187-4edc-999d-3f79ea752d30" TYPE="ext3"
/dev/sda2: LABEL="SWAP-sda2" TYPE="swap"
/dev/sda1: LABEL="/boot" UUID="fdb2ff85-dd97-4e0f-9067-6b1ae98a9dc9" TYPE="ext3"
/dev/sda6: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" TYPE="ext3"
/dev/sdb6: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" TYPE="ext3"
/dev/md0: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" SEC_TYPE="ext2" TYPE="ext3"
/dev/md1: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" SEC_TYPE="ext2" TYPE="ext3"
/dev/md2: UUID="790e0f5d-98a2-4828-9d39-c1a66e191881" TYPE="ext3" /dev/vg0/lv0: UUID="6b35ad9d-4367-4204-908c-70bac0655456" SEC_TYPE="ext2" TYPE="ext3"
/dev/cdrom: LABEL="RHEL/5.5 i386 DVD" TYPE="iso9660"
问题:dev/md0、/dev/md1是raid 0;/dev/md2是在这两个raid0的基础上做的raid1
为什么/dev/sda6/、dev/sdb6/、dev/md0、/dev/md1、/dev/md2这几个设备的UUID都一样?!
2、[root@rhel5 ~]# fdisk -l
Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 274 2096482+ 82 Linux swap / Solaris
/dev/sda3 275 1958 13526730 5 Extended
/dev/sda5 275 276 16033+ 83 Linux
/dev/sda6 277 278 16033+ 83 Linux
/dev/sda7 279 280 16033+ 83 Linux
/dev/sda8 281 282 16033+ 83 Linux
/dev/sda9 283 284 16033+ 83 Linux
Disk /dev/sdb: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1305 10482381 83 Linux
/dev/sdb3 1306 1958 5245222+ 5 Extended
/dev/sdb5 1306 1307 16033+ 83 Linux
/dev/sdb6 1308 1309 16033+ 83 Linux
/dev/sdb7 1310 1311 16033+ 83 Linux
/dev/sdb8 1312 1313 16033+ 83 Linux
/dev/sdb9 1314 1315 16033+ 83 Linux
Disk /dev/md0: 32 MB, 32636928 bytes
2 heads, 4 sectors/track, 7968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
Disk /dev/md1: 32 MB, 32636928 bytes
2 heads, 4 sectors/track, 7968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md2: 32 MB, 32571392 bytes
2 heads, 4 sectors/track, 7952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md2 doesn't contain a valid partition table
问题:为什么fdisk -l的命令会说所有的raid设备都没有有效的分区表
============================================================================================
系统日志服务部分
[root@rhel5 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:70:E8:F0
inet addr:192.168.0.88 Bcast:192.168.0.255 Mask:255.255.255.0
[root@rhel5 ~]# vim /etc/syslog.conf
authpriv.* /var/log/secure
mail.* -/var/log/maillog
*.* @192.168.0.89
cron.* /var/log/cron
*.emerg *
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
[root@rhel5 ~]# /etc/init.d/syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
[root@rhel5 ~]# /etc/init.d/squid restart
Stopping squid: [FAILED]
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 62: 3505 Aborted $SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
Starting squid: /etc/init.d/squid: line 42: 3506 Aborted $SQUID $SQUID_OPTS >> /var/log/squid/squid.out 2>&1
[FAILED]
[root@rhel5 ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
[root@rhel51 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:BC:3A:16
inet addr:192.168.0.89 Bcast:192.168.0.255 Mask:255.255.255.0
[root@rhel51 ~]# cat /etc/sysconfig/syslog
SYSLOGD_OPTIONS="-m 0 -r"
KLOGD_OPTIONS="-x"
SYSLOG_UMASK=077
[root@rhel51 ~]# /sbin/syslogd -rm 0
[root@rhel51 ~]# /etc/init.d/syslog restart
Shutting down kernel logger: [FAILED]
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
[root@rhel51 ~]# tail -f /var/log/messages
Apr 4 06:34:49 rhel51 kernel: ide: failed opcode was: 0xec
Apr 4 06:38:29 192.168.0.88 syslogd 1.4.1: restart.
Apr 4 06:38:29 192.168.0.88 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Apr 4 06:39:38 rhel51 kernel: Kernel logging (proc) stopped.
Apr 4 06:39:38 rhel51 kernel: Kernel log daemon terminating.
Apr 4 06:39:39 rhel51 exiting on signal 15
Apr 4 06:39:54 rhel51 syslogd 1.4.1: restart (remote reception).
Apr 4 06:40:03 rhel51 exiting on signal 15
Apr 4 06:40:03 rhel51 syslogd 1.4.1: restart (remote reception).
Apr 4 06:40:03 rhel51 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Apr 4 06:40:33 192.168.0.88 kernel: Kernel logging (proc) stopped.
Apr 4 06:40:33 192.168.0.88 kernel: Kernel log daemon terminating.
Apr 4 06:40:34 192.168.0.88 exiting on signal 15
Apr 4 06:40:34 192.168.0.88 syslogd 1.4.1: restart.
Apr 4 06:40:34 192.168.0.88 kernel: klogd 1.4.1, log source = /proc/kmsg started.
Apr 4 06:42:14 192.168.0.88 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Apr 4 06:42:14 192.168.0.88 kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Apr 4 06:42:14 192.168.0.88 kernel: NFSD: starting 90-second grace period
Apr 4 06:42:36 192.168.0.88 dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Apr 4 06:42:36 192.168.0.88 dhcpd: Copyright 2004-2006 Internet Systems Consortium.
Apr 4 06:42:36 192.168.0.88 dhcpd: All rights reserved.
Apr 4 06:42:36 192.168.0.88 dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Apr 4 06:42:36 192.168.0.88 dhcpd: Address range 192.168.25.2 to 192.168.0.254, netmask 255.255.255.0 spans multiple subnets!
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: If you did not get this software from ftp.isc.org, please
Apr 4 06:42:36 192.168.0.88 dhcpd: get the latest from ftp.isc.org and install that before
Apr 4 06:42:36 192.168.0.88 dhcpd: requesting help.
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: If you did get this software from ftp.isc.org and have not
Apr 4 06:42:36 192.168.0.88 dhcpd: yet read the README, please read it before requesting help.
Apr 4 06:42:36 192.168.0.88 dhcpd: If you intend to request help from the dhcp-server@isc.org
Apr 4 06:42:36 192.168.0.88 dhcpd: mailing list, please read the section on the README about
Apr 4 06:42:36 192.168.0.88 dhcpd: submitting bug reports and requests for help.
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: Please do not under any circumstances send requests for
Apr 4 06:42:36 192.168.0.88 dhcpd: help directly to the authors of this software - please
Apr 4 06:42:36 192.168.0.88 dhcpd: send them to the appropriate mailing list as described in
Apr 4 06:42:36 192.168.0.88 dhcpd: the README file.
Apr 4 06:42:36 192.168.0.88 dhcpd:
Apr 4 06:42:36 192.168.0.88 dhcpd: exiting.
Apr 4 06:43:17 192.168.0.88 squid[3505]: Could not determine fully qualified hostname. Please set 'visible_hostname'
Apr 4 06:43:18 192.168.0.88 squid[3506]: Could not determine fully qualified hostname. Please set 'visible_hostname'
Apr 4 06:44:31 192.168.0.88 winbindd[3558]: [2012/04/04 22:41:44, 0] nsswitch/winbindd_cache.c:initialize_winbindd_cache(2229)
Apr 4 06:44:31 192.168.0.88 winbindd[3558]: initialize_winbindd_cache: clearing cache and re-creating with version number 1
问题:为什么192.168.0.89没有为192.168.0.88的httpd服务做日志,而且192.168.0.88的/var/log/httpd/下有日志而192.168.0.89的/var/log/httpd下什么都没有呢
===========================================================================================================
进程部分:
[root@rhel5 ~]# pkill -9 3571
[root@rhel5 ~]# ps -aux | grep yum
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 3215 0.0 0.9 25568 10256 ? SN 22:32 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root 3571 0.1 1.6 28128 16716 pts/1 S+ 22:43 0:01 /usr/bin/python /usr/bin/yum search vsftp
root 3626 0.0 0.0 3924 700 pts/0 S+ 22:55 0:00 grep yum
问题:为什么3571进程没有终止?!
|
http://linux.chinaunix.net/techdoc/system/2008/07/26/1020394.shtml
我感觉这里的UUID是根据逻辑磁盘而言的,对于一个磁盘阵列,他属于一个逻辑磁盘,所以他们的UUID是一样的