Ich verwende GPT als Partitionierungsschema. Ich überprüfe die UUIDs meiner Partitionen:
# ls -l /dev/disk/by-partuuid/
total 0
lrwxrwxrwx 1 root root 10 Oct 18 22:39 0793009a-d460-4f3d-83f6-8103f8ba24e2 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Oct 18 22:39 13f83c47-ad62-4932-8d52-e93626166e7f -> ../../sdc3
lrwxrwxrwx 1 root root 10 Oct 18 22:39 1b247b1f-0b7b-419e-bc3b-0f90cbadb87c -> ../../sdc2
lrwxrwxrwx 1 root root 10 Oct 18 22:39 224d5933-7a23-4833-b785-79a67c9b9306 -> ../../sda1
lrwxrwxrwx 1 root root 10 Oct 18 22:39 2ff625b2-b96b-4ce5-b752-57cdf7092258 -> ../../sda3
lrwxrwxrwx 1 root root 10 Oct 18 22:39 449956f9-7289-49ed-9a37-ed6be9264d1c -> ../../sdb1
lrwxrwxrwx 1 root root 10 Oct 18 22:39 a2a95e45-7e4c-4b20-a2bd-66d96e737590 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Oct 18 22:39 a8c07f74-9d6d-4f45-9453-dd2e6998f100 -> ../../sda2
lrwxrwxrwx 1 root root 10 Oct 18 22:39 c2c9e94c-9c73-4d6e-a4ec-2229f56152e8 -> ../../sdc1
Und fügen Sie /dev/sdc2mit seiner UUID hinzu:
# mdadm /dev/md0 --add /dev/disk/by-partuuid/1b247b1f-0b7b-419e-bc3b-0f90cbadb87c
mdadm: added /dev/disk/by-partuuid/1b247b1f-0b7b-419e-bc3b-0f90cbadb87c
Aber wenn ich mir die Details des RAID-Arrays ansehe, meldet es /dev/sdc2anstelle der UUID.
# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Thu Oct 18 21:52:43 2012
Raid Level : raid1
Array Size : 1048564 (1024.16 MiB 1073.73 MB)
Used Dev Size : 1048564 (1024.16 MiB 1073.73 MB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Fri Oct 19 15:57:19 2012
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Name : cow:0 (local to host cow)
UUID : 9e691db1:f8fcc7d8:f56d9c11:1c202693
Events : 47
Number Major Minor RaidDevice State
2 8 34 0 active sync /dev/sdc2
1 8 18 1 active sync /dev/sdb2
- Ist es unmöglich, ein RAID-Array mit UUIDs zu erstellen?
- Oder verwendet es die UUID, meldet aber den normalen Namen, um die Lesbarkeit zu verbessern? Wie kann ich in diesem Fall feststellen?
- Ich möchte UUIDs verwenden, damit ich die Festplatten frei in der Maschine bewegen kann, ohne etwas zu beschädigen. Klingt das nicht nach einer guten Idee?
/etc/mdadm/mdadm.confsagt mein# by default (built-in), scan all partitions (/proc/partitions) and all containers for MD superblocks. alternatively, specify devices to scan, using wildcards if desired.. DieDEVICEZeile ist für Ubuntu standardmäßig überkommentiert. Aber ich denke, das Standardverhalten wird sehr perfekt! (Ich habe nicht so viel, dass es gescannt werden muss)