Installa la nostra toolbar!
Howto / Ubuntu
addthis
Creare un array Raid software 0/1/5 in Ubuntu
Author: Tafaz
Visits: 3972
Date: 13.06.2008

Preparazione dei dischi:

da una shell digitare

sudo fdisk -l

per vedere i nomi dei dischi

tafaz@Storage:~$ sudo fdisk -l

Disk /dev/sda: 4334 MB, 4334722560 bytes
255 heads, 63 sectors/track, 527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00051f69

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         497     3992121   83  Linux
/dev/sda2             498         527      240975    5  Extended
/dev/sda5             498         527      240943+  82  Linux swap / Solaris

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7a4beadb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        9729    78148161   83  Linux
Disk /dev/sdc: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007a0d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        9729    78148161   83  Linux

Disk /dev/md0: 160.0 GB, 160047300608 bytes
2 heads, 4 sectors/track, 39074048 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000

nel mio caso ho 3 dischi, il primario /dev/sda dove ho installato Ubuntu e la partizione di swap e altri due dischi da 80Gb formattati ext.

ora formattiamo i due dischi da 80Gb in formato "Linux Raid Autodetect" con fdisk

tafaz@Storage:~$ sudo fdisk /dev/sdb

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
1
Invalid partition number for type `1'
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-9729, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729):
Using default value 9729

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): w 

ora cancelliamo la partizione digitando "d" ne creiamo una nuova con "n" e assegnamo il tipo di filesystem con "t"
e impostiamo il tipo a "fd" (Linux raid autodetect) come mostrato nel codice qui sopra

infine con "w" scriviamo la tabella delle partizioni sul disco

ripetiamo la stessa procedura per il disco /dev/sdc




<< Page 2 of 4 >>


Se vuoi discutere con noi su questo articolo o comunque vuoi porci delle domande usa il nostro Forum

COMMENTI

Aggiungi un commento! +
(I commenti verranno moderati prima della pubblicazione)



Top