linux安装DM6权限不够

linux安装DM6权限不够,第1张

方法一:可以通过su命令切换到root用户来运行命令。需要输入root用户的密码。

用法示例:切换到root用户$ su方法二:使用sudo命令,针对单个命令授予临时权限。sudo仅在需要时授予用户权限,减少了用户因为错误执行命令损坏系统的可能性。

sudo也可以用来以其他用户身份执行命令。

用法示例:以root用户的身份修改主机名为zhidao$ sudo hostname zhidao方法三:为root用户设置密码,然后使用root用户登录。

用法示例:为root用户设置密码。$ sudo passwd root由于安全机制,输入的密码不会显示出来。

一、多路径解释

多路径,顾名思义就是有多种选择的路径。在SAN或IPSAN环境,主机和存储之间外加了光纤交换机,这就导致主机和存储之间交换速度和效率增强,一条路径肯定是不行的,也是不安全不稳定的。多路径就是要来解决从主机到磁盘之间最快,最高效的问题。主要实现如下几个功能

故障的切换和恢复

IO流量的负载均衡

磁盘的虚拟化

多路径之前一直是存储厂商负责解决,竟来被拆分出来单独卖钱了。

构架基本是这样的:存储,多路径软件,光纤交换机,主机,主机系统。

二、LINUX下的multipath

1、查看是否自带安装?

1

2

3

4

5

6

[root@web2 multipath]# rpm -qa|grep device

device-mapper-1.02.39-1.el5

device-mapper-1.02.39-1.el5

device-mapper-multipath-0.4.7-34.el5

device-mapper-event-1.02.39-1.el5

[root@web2 multipath]#

2、安装

1

2

3

4

5

6

rpm -ivh device-mapper-1.02.39-1.el5.rpm#安装映射包

rpm -ivh device-mapper-multipath-0.4.7-34.el5.rpm #安装多路径包

外加加入开机启动

chkconfig –level 2345 multipathd on #设置成开机自启动multipathd

lsmod |grep dm_multipath #来检查安装是否正常

3、配置

1

2

3

4

5

6

7

8

9

10

11

12

13

14

# on the default devices.

blacklist {

devnode "^(ram|raw|loop|fd|md|dm-|sr|sr|scd|st)[0-9]*"

devnode "^hd[a-z]"

}

devices {

device {

vendor "HP"

path_grouping_policy multibus

features "1 queue_if_no_path"

path_checker readsector()

failback immediate

}

}<br><br>完整的配置如下:

blacklist {

devnode "^sda"

}

defaults {

user_friendly_names no

}

multipaths {

multipath {

wwid14945540000000000a67854c6270b4359c66c272e2f356321

alias iscsi-dm0

path_grouping_policymultibus

path_checkertur

path_selector "round-robin 0"

}

multipath {

wwid14945540000000000dcca2eda91d70b81edbcfce2357f99ee

alias iscsi-dm1

path_grouping_policymultibus

path_checkertur

path_selector "round-robin 0"

}

multipath {

wwid1494554000000000020f763489c165561101813333957ed96

alias iscsi-dm2

path_grouping_policymultibus

path_checkertur

path_selector "round-robin 0"

}

multipath {

wwid14945540000000000919ca813020a195422ba3663e1f03cc3

alias iscsi-dm3

path_grouping_policymultibus

path_checkertur

path_selector "round-robin 0"

}

}

devices {

device {

vendor "iSCSI-Enterprise"

product "Virtual disk"

path_grouping_policymultibus

getuid_callout "/sbin/scsi_id -g -u -s /block/%n"

path_checkerreadsector0

path_selector "round-robin 0"

}

}

4、命令

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

[root@web2 ~]# multipath -h

multipath-tools v0.4.7 (03/12, 2006)

Usage: multipath[-v level] [-d] [-h|-l|-ll|-f|-F|-r]

[-p failover|multibus|group_by_serial|group_by_prio]

[device]

-v levelverbosity level

0no output

1print created devmap names only

2default verbosity

3print debug information

-h print this usage text

-b file bindings file location

-d dry run, do not create or update devmaps

-l show multipath topology (sysfs and DM info)

-ll show multipath topology (maximum info)

-f flush a multipath device map

-F flush all multipath device maps

-r force devmap reload

-p policy force all maps to specified policy :

failover 1 path per priority group

multibus all paths in 1 priority group

group_by_serial 1 priority group per serial

group_by_prio1 priority group per priority lvl

group_by_node_name 1 priority group per target node

device limit scope to the device's multipath

(udev-style $DEVNAME reference, eg /dev/sdb

or major:minor or a device map name)

[root@web2 ~]#

5、启动关闭

1

2

3

4

# /etc/init.d/multipathd start #开启mulitipath服务

service multipath start

service multipath restart

service multipath shutdown

6、如何获取wwid

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

1、

[root@vxfs01 ~]# cat /var/lib/multipath/bindings

# Multipath bindings, Version : 1.0

# NOTE: this file is automatically maintained by the multipath program.

# You should not need to edit this file in normal circumstances.

#

# Format:

# alias wwid

#

mpath0 36006016051d50e0035744871c912de11

mpath1 36006016051d50e0034744871c912de11

mpath2 36006016051d50e0032744871c912de11

mpath3 36006016051d50e0039744871c912de11

mpath4 36006016051d50e003a744871c912de11

2、

[root@vxfs01 ~]# multipath -v3 |grep 3600

sdb: uid = 36006016051d50e003a744871c912de11 (callout)

sdc: uid = 36006016051d50e003a744871c912de11 (callout)

sdd: uid = 36006016051d50e003a744871c912de11 (callout)

sde: uid = 36006016051d50e003a744871c912de11 (callout)

36006016051d50e003a744871c912de11 1:0:0:0 sdb 8:16 0 [undef][ready] DGC,RAI

36006016051d50e003a744871c912de11 1:0:1:0 sdc 8:32 1 [undef][ready] DGC,RAI

36006016051d50e003a744871c912de11 2:0:0:0 sdd 8:48 1 [undef][ready] DGC,RAI

36006016051d50e003a744871c912de11 2:0:1:0 sde 8:64 0 [undef][ready] DGC,RAI

Found matching wwid [36006016051d50e003a744871c912de11] in bindings file.

比较详细的文字:

http://zhumeng8337797.blog.163.com/blog/static/1007689142013416111534352/

http://blog.csdn.net/wuweilong/article/details/14184097

RHEL官网资料:

http://www.prudentwoo.com/wp-content/uploads/downloads/2013/11/Red_Hat_Enterprise_Linux-5-DM_Multipath-en-US.pdf

http://www.prudentwoo.com/wp-content/uploads/downloads/2013/11/Red_Hat_Enterprise_Linux-5-DM_Multipath-zh-CN.pdf

http://www.prudentwoo.com/wp-content/uploads/downloads/2013/11/Red_Hat_Enterprise_Linux-6-DM_Multipath-en-US.pdf

http://www.prudentwoo.com/wp-content/uploads/downloads/2013/11/Red_Hat_Enterprise_Linux-6-DM_Multipath-zh-CN.pdf

ISQL 用法1:disql -h 显示disql版本信息和帮助信息DISQL 用法2:disql [ [<option>] [{logon | /nolog}] [<start>] ]<option>:-S 隐藏模式,隐藏<SQL>标识符<logon>: {<username>[/<password>][@<connect_identifier>] }<connect_identifier>为{[<SERVER>][:<PORT>][#<sslpath>]}<start>: `<filename>[<parameter>...] 运行disql脚本/NOLOG 选项能在未登录DM服务器的情况下启动disql


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/8745131.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-20
下一篇 2023-04-20

发表评论

登录后才能评论

评论列表(0条)

保存