首页 > 编程知识 正文

lsattr命令详解,linux

时间:2023-05-04 18:31:30 阅读:60650 作者:933

1 .检查操作系统是否符合iscsi

[ root @ linux01~] # rpm-QA|grep iscsi

iscsi -启动器- utils-6.2.0.873-2.el6.x86 _ 64

如果不执行,可以使用yum install命令进行安装

验证iscsi服务的配置

[ root @ linux01~] # chkconfig-- list|grep iscsi

iscsi 0:关闭1:关闭2:关闭:打开4:打开5:打开6:关闭

iscsid 0:关闭1:关闭2:关闭:打开4:打开5:打开6:关闭

如果未打开,则可以使用chkconfig iscsid on将其打开

使用iscsiadm命令发现资源

[ root @ linux01~] # iscsi ADM-mdiscovery-tsendtargets-p 10.10.88.50

10.10.88.5033603260,1 iqn.2006-01.com.op enfiler : tsn.3d 2985 ee4cd 5

4 .使用iscsiadm命令登录到发现的资源:

[ root @ linux01~~ ] # iscsi ADM-MnO de-tiqn.2006-01.com.op enfiler 3360 tsn.3d 2985 ee4cd5- p 10.10.88.50-l

Logging in to [iface: default,target : iqn.2006-01.com.op enfiler 3360 tsn.3d 2985 ee4cd 5,portal 336010.10.8888888

Login to [iface: default,target : iqn.2006-01.com.op enfiler 3360 tsn.3d 2985 ee4cd 5,portal:10.10.88.88]

设置为打开iscsi并自动登录

[ root @ linux01~] # iscsi ADM-MnO de-tiqn.2006-01.com.op enfiler 3360 tsn.3d 2985 ee4cd5- p 10.10.88.50-ood

使用fdisk -l命令确定系统中装载的驱动器盘符

[ root @ linux01~] # fdisk-l|grep disk

磁盘/dev/sda : 128.8 GB,128849018880 bytes

磁盘标识符:0x 00024 EAA

磁盘/dev/mapper/VG root-LV root :10.7 GB,10737418240 bytes

磁盘标识符:0x 00000000

磁盘/dev/mapper/VG root-LV swap :4294 MB,4294967296 bytes

磁盘标识符:0x 00000000

磁盘/dev/mapper/VG root-LV app :52.4 GB,52428800000 bytes

磁盘标识符:0x 00000000

磁盘/dev/SDC : 1073 MB,1073741824字节

磁盘标识符:0x 00000000

磁盘/dev/SDD : 2147 MB,2147483648 bytes

磁盘标识符:0x 00000000

磁盘/dev/sdb : 1073 MB,1073741824 bytes

磁盘标识符:0x 00000000

磁盘/dev/SDE : 2147 MB,2147483648 bytes

磁盘标识符:0x 00000000

Disk /dev/sdf: 2147 MB,2147483648字节

磁盘标识符:0x 00000000

登录到需要授权码的节点:

(1)打开认证

iscsiadm -m node -T [设备]-o更新--NameNode.session.auth.auth method-- value=chap

使用.-o和--op

)2)添加用户

iscsiadm -m node -T [设备]-- op更新--NameNode.session.auth.username-- value=[用户名]

(3)添加密码

iscsi ADMMnO det [设备]op更新NameNode.session.auth.passwordvalue=[密码]

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。