免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 6368 | 回复: 12
打印 上一主题 下一主题

[系统管理] redhat挂载存储资源问题/调整开机的服务启动顺序 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-08-16 16:25 |只看该作者 |倒序浏览
本帖最后由 cfw0631 于 2012-08-16 16:28 编辑

redhat版本为:
[root@localhost rc3.d]# cat /proc/version
Linux version 2.6.18-92.el5PAE (brewbuilder@hs20-bc2-3.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-41)) #1 SMP Tue Apr 29 13:31:02 EDT 2008

在redhat上挂载一个1TB的逻辑资源。都设置好了 开机自动挂载。但是每次开机都不能自动挂载。

后来发现 开机时候 iscsi服务先启动的,network服务后启动。
iscsi服务启动,network没启动,网络肯定不通,这样自动挂载肯定不行。

现在就想把iscsi服务和network服务的开机启动顺序 调整下。  详细 见 下面红色部分。

小弟直接重命名将S开头后面的数字调整了 (例如:S10network 改成 S16network),重启后,又变回来了。


[root@localhost rc3.d]# pwd
/etc/rc.d/rc3.d

[root@localhost rc3.d]# ll
total 284
... 节省篇幅 K开头的都删除了
...
...
lrwxrwxrwx 1 root root 23 Aug 10 11:32 S00microcode_ctl -> ../init.d/microcode_ctl
lrwxrwxrwx 1 root root 22 Aug 10 11:31 S02lvm2-monitor -> ../init.d/lvm2-monitor
lrwxrwxrwx 1 root root 22 Aug 14 16:54 S03vmware-tools -> ../init.d/vmware-tools
lrwxrwxrwx 1 root root 25 Aug 10 11:32 S04readahead_early -> ../init.d/readahead_early
lrwxrwxrwx 1 root root 15 Aug 10 11:32 S05kudzu -> ../init.d/kudzu
lrwxrwxrwx 1 root root 18 Aug 10 11:30 S06cpuspeed -> ../init.d/cpuspeed
lrwxrwxrwx 1 root root 16 Aug 16 07:25 S07iscsid -> ../init.d/iscsid
lrwxrwxrwx 1 root root 19 Aug 10 11:30 S08ip6tables -> ../init.d/ip6tables
lrwxrwxrwx 1 root root 18 Aug 10 11:30 S08iptables -> ../init.d/iptables
lrwxrwxrwx 1 root root 14 Aug 10 11:35 S09isdn -> ../init.d/isdn
lrwxrwxrwx 1 root root 17 Aug 16 10:50 S10network -> ../init.d/network
lrwxrwxrwx 1 root root 16 Aug 10 11:31 S11auditd -> ../init.d/auditd
lrwxrwxrwx 1 root root 21 Aug 10 11:31 S12restorecond -> ../init.d/restorecond
lrwxrwxrwx 1 root root 16 Aug 10 11:31 S12syslog -> ../init.d/syslog
lrwxrwxrwx 1 root root 20 Aug 10 11:32 S13irqbalance -> ../init.d/irqbalance
lrwxrwxrwx 1 root root 15 Aug 16 07:25 S13iscsi -> ../init.d/iscsi
lrwxrwxrwx 1 root root 18 Aug 10 11:31 S13mcstrans -> ../init.d/mcstrans
lrwxrwxrwx 1 root root 17 Aug 10 11:31 S13portmap -> ../init.d/portmap
lrwxrwxrwx 1 root root 24 Aug 10 11:33 S13setroubleshoot -> ../init.d/setroubleshoot
lrwxrwxrwx 1 root root 17 Aug 10 11:32 S14nfslock -> ../init.d/nfslock
lrwxrwxrwx 1 root root 19 Aug 10 11:32 S15mdmonitor -> ../init.d/mdmonitor
lrwxrwxrwx 1 root root 19 Aug 10 11:32 S18rpcidmapd -> ../init.d/rpcidmapd
lrwxrwxrwx 1 root root 17 Aug 10 11:32 S19rpcgssd -> ../init.d/rpcgssd
lrwxrwxrwx 1 root root 20 Aug 10 11:30 S22messagebus -> ../init.d/messagebus
lrwxrwxrwx 1 root root 19 Aug 10 11:32 S25bluetooth -> ../init.d/bluetooth
lrwxrwxrwx 1 root root 15 Aug 10 11:31 S25netfs -> ../init.d/netfs
lrwxrwxrwx 1 root root 15 Aug 10 11:32 S25pcscd -> ../init.d/pcscd
lrwxrwxrwx 1 root root 14 Aug 10 11:32 S26apmd -> ../init.d/apmd
lrwxrwxrwx 1 root root 14 Aug 10 11:32 S26hidd -> ../init.d/hidd
lrwxrwxrwx 1 root root 16 Aug 10 11:32 S28autofs -> ../init.d/autofs
lrwxrwxrwx 1 root root 15 Aug 10 11:32 S44acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 15 Aug 10 11:32 S50hplip -> ../init.d/hplip
lrwxrwxrwx 1 root root 14 Aug 10 11:32 S55sshd -> ../init.d/sshd
lrwxrwxrwx 1 root root 14 Aug 10 11:31 S56cups -> ../init.d/cups
lrwxrwxrwx 1 root root 16 Aug 10 11:33 S56xinetd -> ../init.d/xinetd
lrwxrwxrwx 1 root root 18 Aug 10 11:31 S80sendmail -> ../init.d/sendmail
lrwxrwxrwx 1 root root 13 Aug 10 11:30 S85gpm -> ../init.d/gpm
lrwxrwxrwx 1 root root 15 Aug 10 11:31 S90crond -> ../init.d/crond
lrwxrwxrwx 1 root root 13 Aug 10 11:33 S90xfs -> ../init.d/xfs
lrwxrwxrwx 1 root root 17 Aug 10 11:30 S95anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 13 Aug 10 11:31 S95atd -> ../init.d/atd
lrwxrwxrwx 1 root root 15 Aug 10 11:32 S97rhnsd -> ../init.d/rhnsd
lrwxrwxrwx 1 root root 22 Aug 10 11:32 S97yum-updatesd -> ../init.d/yum-updatesd
lrwxrwxrwx 1 root root 22 Aug 10 11:31 S98avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 19 Aug 10 11:32 S98haldaemon -> ../init.d/haldaemon
lrwxrwxrwx 1 root root 19 Aug 10 11:32 S99firstboot -> ../init.d/firstboot
lrwxrwxrwx 1 root root 11 Aug 10 11:31 S99local -> ../rc.local
lrwxrwxrwx 1 root root 16 Aug 10 11:32 S99smartd -> ../init.d/smartd
[root@localhost rc3.d]#

各位大侠,盼回复...

论坛徽章:
21
白羊座
日期:2013-08-23 15:49:17金牛座
日期:2013-10-08 17:00:03处女座
日期:2013-10-12 11:54:11CU十二周年纪念徽章
日期:2013-10-24 15:41:34午马
日期:2013-11-27 14:07:21巨蟹座
日期:2013-12-04 10:56:03水瓶座
日期:2013-12-04 15:58:00亥猪
日期:2014-05-24 16:02:3115-16赛季CBA联赛之辽宁
日期:2016-11-07 13:52:53戌狗
日期:2013-08-23 16:15:31白羊座
日期:2013-08-24 21:59:24巨蟹座
日期:2013-08-25 16:34:24
2 [报告]
发表于 2012-08-16 16:32 |只看该作者
那你/etc/fstab 是怎么写的?

论坛徽章:
15
CU大牛徽章
日期:2013-03-13 15:32:35白羊座
日期:2013-10-30 13:11:16未羊
日期:2013-11-29 10:47:02白羊座
日期:2014-01-22 11:34:25白羊座
日期:2014-03-04 11:05:50申猴
日期:2014-07-29 16:31:36天秤座
日期:2013-10-23 15:33:47未羊
日期:2013-10-09 09:18:53CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55未羊
日期:2013-09-23 09:29:22
3 [报告]
发表于 2012-08-16 17:06 |只看该作者
修改chkconfig的启动顺序

文件位置:/etc/init.d

对比network和iscsi文件中

# chkconfig: 启动级别   启动顺序  关闭顺序(启动顺序,数值小的先启动)

论坛徽章:
0
4 [报告]
发表于 2012-08-16 17:16 |只看该作者
[root@localhost ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
UUID=ca222609-72a7-41c6-bff8-c509f05086b1  /mnt/test  ext3  defaults  0 0
回复 2# zongg


   

论坛徽章:
21
白羊座
日期:2013-08-23 15:49:17金牛座
日期:2013-10-08 17:00:03处女座
日期:2013-10-12 11:54:11CU十二周年纪念徽章
日期:2013-10-24 15:41:34午马
日期:2013-11-27 14:07:21巨蟹座
日期:2013-12-04 10:56:03水瓶座
日期:2013-12-04 15:58:00亥猪
日期:2014-05-24 16:02:3115-16赛季CBA联赛之辽宁
日期:2016-11-07 13:52:53戌狗
日期:2013-08-23 16:15:31白羊座
日期:2013-08-24 21:59:24巨蟹座
日期:2013-08-25 16:34:24
5 [报告]
发表于 2012-08-16 17:20 |只看该作者
cfw0631 发表于 2012-08-16 17:16
[root@localhost ~]# cat /etc/fstab
/dev/VolGroup00/LogVol00 /                       ext3    default ...



iscsi 挂载这么写应该不行,你可以上网上找找。

论坛徽章:
0
6 [报告]
发表于 2012-08-16 17:27 |只看该作者
NO ! NO ! 这个fstab文件写的没问题,以前都是这么写的。回复 5# zongg


   

论坛徽章:
0
7 [报告]
发表于 2012-08-16 17:36 |只看该作者
cd /etc/init.d/
下面的network已经改过了
/etc/rc.d/rc3.d 下面的 S10network文件名要改吗?

回复 3# yzkarchive


   

论坛徽章:
15
CU大牛徽章
日期:2013-03-13 15:32:35白羊座
日期:2013-10-30 13:11:16未羊
日期:2013-11-29 10:47:02白羊座
日期:2014-01-22 11:34:25白羊座
日期:2014-03-04 11:05:50申猴
日期:2014-07-29 16:31:36天秤座
日期:2013-10-23 15:33:47未羊
日期:2013-10-09 09:18:53CU大牛徽章
日期:2013-03-13 15:38:15CU大牛徽章
日期:2013-03-13 15:38:52CU大牛徽章
日期:2013-03-14 14:08:55未羊
日期:2013-09-23 09:29:22
8 [报告]
发表于 2012-08-16 17:38 |只看该作者
回复 7# cfw0631


    文件名不需要改,安装好是啥样子就保持什么样子,改启动顺序就可以了,注意其它服务启动顺序,改的值要适中。

论坛徽章:
21
白羊座
日期:2013-08-23 15:49:17金牛座
日期:2013-10-08 17:00:03处女座
日期:2013-10-12 11:54:11CU十二周年纪念徽章
日期:2013-10-24 15:41:34午马
日期:2013-11-27 14:07:21巨蟹座
日期:2013-12-04 10:56:03水瓶座
日期:2013-12-04 15:58:00亥猪
日期:2014-05-24 16:02:3115-16赛季CBA联赛之辽宁
日期:2016-11-07 13:52:53戌狗
日期:2013-08-23 16:15:31白羊座
日期:2013-08-24 21:59:24巨蟹座
日期:2013-08-25 16:34:24
9 [报告]
发表于 2012-08-16 18:23 |只看该作者
关注一下。

论坛徽章:
0
10 [报告]
发表于 2012-08-17 07:23 |只看该作者
修改过/etc/init.d中的network文件的chkconfig后面启动优先级,相对应的/etc/rc.d/rc3.d Sxnetwork就自动改成和/etc/init.d/network一样的了。

但是reboot 以后,eth0 居然默认被down了,需要手动启动network服务。才有IP地址。回复 8# yzkarchive


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP