Ciao a Tutti,
Dopo tantissimi anni ho deciso di sostituire i 2 dischi da 1TB del serverino
Debian di casa, in RAID1+LVM, e passare a due dischi da 6TB. Ho sostituito un
disco alla volta, attendendo prima che il RAID1 finisse di replicare tutto il
contenuto del disco da 1TB su uno da 6TB. E poi inserendo il secondo disco da
6TB e ripetendo l'operazione, questa volta facendo replicare via RAID1 quanto
presente sul disco da 6TB inserito prima sul secondo disco da 6TB. Il passo
successivo sarà quello di allargare il volume LVM in modo da utilizzare tutti i
6TB e non solo l'1TB attuale. Prima di fare questo vi chiedo una cosa, perché mi
è venuto un dubbio.
Innanzitutto, premetto che utlizzo il RAID software di Linux e che, per i primi
passi indicati sopra, ho seguito le istruzioni trovate qui:
https://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array . Le avevo
seguite anche in precedenza per altri computer, con successo. Questa volta però
c'è una differenza: i dischi precedenti da 1TB utilizzano uno schema delle
partizioni "DOS" (o forse è meglio dire MBR), mentre i dischi nuovi da 6TB
dovrebbero utilizzare uno schema delle partizioni GPT, visto che DOS/MBR non
permette volumi maggiori di 2TB. Però, nei primi passi della guida indicata qui
sopra, e precisamente nel replicare lo schema delle partizioni dei dischi vecchi
su quelli nuovi, ho ottenuto questo:
----
# sfdisk -d /dev/sdb | sfdisk /dev/sda
The size of this disk is 5.5 TiB (6001175126016 bytes). DOS partition table
format can not be used on drives for volumes larger than 4294966784 bytes for
512-byte sectors. Use GUID partition table format (GPT).
GPT PMBR size mismatch (1465130645 != 11721045167) will be corrected by w(rite).
The size of this disk is 5.5 TiB (6001175126016 bytes). DOS partition table
format can not be used on drives for volumes larger than 4294966784 bytes for
512-byte sectors. Use GUID partition table format (GPT).
Checking that no-one is using this disk right now ... OK
Disk /dev/sda: 5.5 TiB, 6001175126016 bytes, 11721045168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Old situation:
Device Boot Start End Sectors Size Id Type
/dev/sda1 1 1465130645 1465130645 698.6G ee GPT
Partition 1 does not start on physical sector boundary.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> The size of this disk is 5.5 TiB (6001175126016 bytes). DOS partition table
format can not be used on drives for volumes larger than 4294966784 bytes for
512-byte sectors. Use GUID partition table format (GPT).
Created a new DOS disklabel with disk identifier 0x000f0167.
/dev/sda1: Created a new partition 1 of type 'Linux raid autodetect' and of size
486.3 MiB.
/dev/sda2: Created a new partition 2 of type 'Linux raid autodetect' and of size
921.7 GiB.
/dev/sda3: Done.
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 996029 995967 486.3M fd Linux raid autodetect
/dev/sda2 996030 1934001089 1933005060 921.7G fd Linux raid autodetect
Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
----
Qui mi pare di capire che anche sul disco da 6TB è stata messa una tabella delle
partizioni DOS/MBR e non GPT. Infatti:
----
# fdisk -l
Disk /dev/sda: 5.5 TiB, 6001175126016 bytes, 11721045168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000f0167
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 996029 995967 486.3M fd Linux raid autodetect
/dev/sda2 996030 1934001089 1933005060 921.7G fd Linux raid autodetect
Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
[...]
----
Ne deduco che, se /dev/sda ora ha uno schema delle partizioni DOS/MBR e non GPT,
non potrò allargare i volumi RAID1/LVM oltre i 2TB, giusto? Se si, come dovrei
fare per rifare le partizioni con GPT nel modo corretto? Non devo usare sfsdisk?
Grazie in anticipo per le eventuali risposte,
Emanuele
--
Per iscriversi (o disiscriversi), basta spedire un messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx