Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 1330 10482412+ 83 Linux
/dev/sda3 1331 1591 2096482+ 82 Linux swap / Solaris
Disk /dev/sdb: 4 MB, 4194304 bytes
1 heads, 8 sectors/track, 1024 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 4 MB, 4194304 bytes
1 heads, 8 sectors/track, 1024 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/sdc doesn't contain a valid partition table
[root@localhost rules.d]# fdisk -l /dev/sharedisk
Disk /dev/sharedisk: 4 MB, 4194304 bytes
1 heads, 8 sectors/track, 1024 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/sharedisk doesn't contain a valid partition table
[root@localhost rules.d]# ll /dev/sh
sharedisk shm/
[root@localhost rules.d]# ll /dev/sharedisk
lrwxrwxrwx 1 root root 3 May 27 02:58 /dev/sharedisk -> sdc
[root@localhost rules.d]# ll /dev/sd*
brw-r----- 1 root disk 8, 0 May 26 21:26 /dev/sda
brw-r----- 1 root disk 8, 1 May 26 21:26 /dev/sda1
brw-r----- 1 root disk 8, 2 May 26 21:26 /dev/sda2
brw-r----- 1 root disk 8, 3 May 26 21:26 /dev/sda3
brw-r----- 1 root disk 8, 16 May 27 02:58 /dev/sdb
brw-rw---- 1 nobody nobody 8, 32 May 27 02:58 /dev/sdc
[root@localhost rules.d]#
链接sharedisk的权限没变,不过其所指向的sdc权限已经变为我们所需要的了。
注意:双等于和单等于号不要搞混了,所有等于后面的值都要用双引号括起来,
刚开始我在写MODE这个选项时(MODE=0660)时没有用双引号,结果权限一直是-rw-r-----,
像是从umask(0022)继承过来的,但是改了umask重启iscsi服务权限确又没有随着umask走,
后面改成带引号(MODE="0660")的,然后重启iscsi服务后权限正常。