- 论坛徽章:
- 0
|
用主板上的RAID控制器组的RAID0,在RHEL5.4上设备名如下
- [root@localhost ~]# ll /dev/mapper/
- total 0
- crw------- 1 root root 10, 63 Oct 8 2009 control
- brw-rw---- 1 root disk 253, 0 Oct 8 2009 isw_fhddegfg_Volume0
- brw-rw---- 1 root disk 253, 1 Oct 8 2009 isw_fhddegfg_Volume0p1
- brw-rw---- 1 root disk 253, 2 Oct 8 2009 isw_fhddegfg_Volume0p2
- brw-rw---- 1 root disk 253, 3 Oct 8 11:50 isw_fhddegfg_Volume0p3
- brw-rw---- 1 root disk 253, 4 Oct 8 2009 isw_fhddegfg_Volume0p5
- brw-rw---- 1 root disk 253, 5 Oct 8 2009 isw_fhddegfg_Volume0p6
复制代码
fdisk -l却显示的是两块组成RAID的磁盘
- [root@localhost ~]# fdisk -l
- Warning: ignoring extra data in partition table 5
- Warning: ignoring extra data in partition table 5
- Warning: ignoring extra data in partition table 5
- Warning: invalid flag 0x6868 of partition table 5 will be corrected by w(rite)
- Disk /dev/sda: 500.1 GB, 500107862016 bytes
- 255 heads, 63 sectors/track, 60801 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
- /dev/sda2 2551 40795 307202962+ 7 HPFS/NTFS
- /dev/sda3 40796 40808 104422+ 83 Linux
- /dev/sda4 40809 121601 648969772+ 5 Extended
- /dev/sda5 ? 149845 258882 875836468 68 Unknown
- Disk /dev/sdb: 500.1 GB, 500107862016 bytes
- 255 heads, 63 sectors/track, 60801 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Disk /dev/sdb doesn't contain a valid partition table
复制代码
我想说以前把U盘和ISCSI盘都可以通过设置udev规则进行重命名,于是跟老大讲可以改,明天他就上班啦,改了半天还是不行。
- [root@localhost ~]# cat /etc/udev/rules.d/local.rules
- KERNEL=="sd*[!0-9]",ENV{ID_FS_TYPE}="isw_raid_member",ENV{ID_BUS}="scsi",NAME="raid_%k"
复制代码
做了这个规则无非就做了一个别名一样的,原本的设备并没有被重命名
- [root@localhost ~]# ll /dev/raid_sd*
- brw-r----- 1 root disk 8, 0 Oct 8 11:49 /dev/raid_sda
- brw-r----- 1 root disk 8, 16 Oct 8 11:49 /dev/raid_sdb
- [root@localhost ~]# ll /dev/sd*
- brwx------ 1 root root 8, 0 Oct 8 2009 /dev/sda
- brwx------ 1 root root 8, 1 Oct 8 2009 /dev/sda1
- brwx------ 1 root root 8, 2 Oct 8 2009 /dev/sda2
- brwx------ 1 root root 8, 3 Oct 8 2009 /dev/sda3
- brwx------ 1 root root 8, 4 Oct 8 2009 /dev/sda4
- brwx------ 1 root root 8, 16 Oct 8 2009 /dev/sdb
复制代码
我也试了写hal规则隐藏设备,也不行
- [root@localhost ~]# cat /usr/share/hal/fdi/preprobe/95userpolicy/10ignore-disks.fdi
- <?xml version="1.0" encoding="UTF-8"?>
- <deviceinfo version="0.2">
- <device>
- <match key="block.device" string="/dev/sda">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- <device>
- <match key="block.device" string="/dev/sda1">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- <device>
- <match key="block.device" string="/dev/sda2">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- <device>
- <match key="block.device" string="/dev/sda3">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- <device>
- <match key="block.device" string="/dev/sda4">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- <device>
- <match key="block.device" string="/dev/sda5">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- <device>
- <match key="block.device" string="/dev/sdb">
- <merge key="info.ignore" type="bool">true</merge>
- </match>
- </device>
- </deviceinfo>
复制代码
[ 本帖最后由 cw0319 于 2009-10-8 12:33 编辑 ] |
|