J'utilise GPT comme schéma de partitionnement. Je vérifie l'UUID de mes partitions:
# 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
Et ajoutez en /dev/sdc2utilisant son UUID:
# mdadm /dev/md0 --add /dev/disk/by-partuuid/1b247b1f-0b7b-419e-bc3b-0f90cbadb87c
mdadm: added /dev/disk/by-partuuid/1b247b1f-0b7b-419e-bc3b-0f90cbadb87c
Mais quand je regarde les détails de la matrice RAID, il rapporte à la /dev/sdc2place de l'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
- Est-il impossible de construire une matrice RAID à l'aide d'UUID?
- Ou utilise-t-il l'UUID mais rapporte le nom normal pour augmenter la lisibilité? Dans ce cas, comment savoir?
- Je voudrais utiliser les UUID pour pouvoir déplacer librement les disques dans la machine sans rien casser. Cela ne vous semble-t-il pas une bonne idée?
/etc/mdadm/mdadm.confdit# by default (built-in), scan all partitions (/proc/partitions) and all containers for MD superblocks. alternatively, specify devices to scan, using wildcards if desired.. LaDEVICEligne est mise en commentaire par défaut pour Ubuntu. Mais je suppose que le comportement par défaut sera très parfaitement! (Je n'en ai pas tant qu'il faudra scanner)