如果我将其添加为/ dev / sdc,重启时会出现问题吗?或者有没有办法将设备名称从/ dev / sdc更改为/ dev / sda而无需重新启动?
这是在Ubuntu 10.04 LTS上.它是一个md数组(“Linux软件RAID”),目前其中一个设备(有几个)看起来像这样(“降级”,因为我从中删除了旧的/ dev / sda):
# mdadm --detail /dev/md0 /dev/md0: Version : 00.90.03 Creation Time : Sun Oct 11 21:07:54 2009 Raid Level : raid1 Array Size : 97536 (95.27 MiB 99.88 MB) Used Dev Size : 97536 (95.27 MiB 99.88 MB) Raid Devices : 2 Total Devices : 1 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Thu Jun 30 09:31:16 2011 State : clean,degraded Active Devices : 1 Working Devices : 1 Failed Devices : 0 Spare Devices : 0 UUID : 496be7a5:ab9177ed:7792c71e:7dc17aa4 Events : 0.112 Number Major Minor RaidDevice State 0 8 17 0 active sync /dev/sdb1 1 0 0 1 removed
md
documentation,如果名称在重启时发生变化,则无关紧要. (好的设计,那.)原因如下:
Boot time autodetection of RAID arrays
When md is compiled into the kernel (not as module),partitions of
type 0xfd are scanned and automatically assembled into RAID arrays.
This autodetection may be suppressed with the kernel parameter
“raid=noautodetect”. As of kernel 2.6.9,only drives with a type 0
superblock can be autodetected and run at boot time.The kernel parameter “raid=partitionable” (or “raid=part”) means
that all auto-detected arrays are assembled as partitionable.
虽然我没有将md编译到内核中,但我的设置与上面相同,因为它是自动加载mdadm并且mdadm.conf被设置为扫描超级块的所有分区,就像内核一样:
# by default,scan all partitions (/proc/partitions) for MD superblocks. # alternatively,specify devices to scan,using wildcards if desired. DEVICE partitions
所以用/ dev / sdc重建数组是没关系的.该名称可能会在重新启动时更改为/ dev / sda,但如果md设置如上,则不会造成任何问题.