mdadm raid1

Installazione, configurazione e uso di Ubuntu come server: web, ftp, mail, news, proxy, dns e altro.
tasso1986
Prode Principiante
Messaggi: 41
Iscrizione: giovedì 20 novembre 2008, 10:17

mdadm raid1

Messaggio da tasso1986 »

Ciao a tutti, mi sn costruito un piccolo server sda=250gb sdb=3tb sdc=3tb.
la mia intenzione era quella di intallare "/" e "/home" sul disco da 250gb e mettere in raid1 i due dischi da 3tb attraverso MDADM.
tutto è andato a buon fine tranne la dimensione dei due dischi in raid1 che è di 2tb invece dei 2,73tb che mi aspettavo.
mi sapete dire se è normale avere solo 2gb invece dei 2,73gb che mi aspettavo o se ho sbagliato qualcosa????

Codice: Seleziona tutto

andrea@andrea-server:~$ sudo su
[sudo] password for andrea: 
root@andrea-server:/home/andrea# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 testine, 63 settori/tracce, 30401 cilindri, totale 488397168 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x000ab854

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    39063551    19530752   83  Linux
/dev/sda2        39065598   488396799   224665601    5  Esteso
/dev/sda5       484816896   488396799     1789952   82  Linux swap / Solaris
/dev/sda6        39065600   484816895   222875648   83  Linux

Le voci nella tabella delle partizioni non sono nello stesso ordine del disco

Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
255 testine, 63 settori/tracce, 364801 cilindri, totale 5860533168 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x00000000

Il disco /dev/sdb non contiene una tabella delle partizioni valida

Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
255 testine, 63 settori/tracce, 364801 cilindri, totale 5860533168 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x00000000

Il disco /dev/sdc non contiene una tabella delle partizioni valida
root@andrea-server:/home/andrea# fdisk /dev/sdb
Il dispositivo non contiene n� una tabella delle partizioni DOS valida, n� una disklabel Sun, SGI od OSF
Building a new DOS disklabel with disk identifier 0x2bc088a9.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Attenzione: il flag 0x0000 non valido della tabella delle partizioni 4 verr� corretto con w(rite)

WARNING: The size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID 
partition table format (GPT).


The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

Comando (m per richiamare la guida): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): 
Using default response p
Numero della partizione (1-4, predefinito 1): 
Utilizzo del valore predefinito 1
Primo settore (2048-4294967295, predefinito 2048): 
Utilizzo del valore predefinito 2048
Last settore, +settori or +size{K,M,G} (2048-4294967294, predefinito 4294967294): 
Utilizzo del valore predefinito 4294967294

Comando (m per richiamare la guida): w
La tabella delle partizioni � stata alterata!

Chiamata di ioctl() per rileggere la tabella delle partizioni.
Sincronizzazione dei dischi in corso.
root@andrea-server:/home/andrea# fdisk /dev/sdc
Il dispositivo non contiene n� una tabella delle partizioni DOS valida, n� una disklabel Sun, SGI od OSF
Building a new DOS disklabel with disk identifier 0x18bf2caf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Attenzione: il flag 0x0000 non valido della tabella delle partizioni 4 verr� corretto con w(rite)

WARNING: The size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID 
partition table format (GPT).


The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.

Comando (m per richiamare la guida): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): 
Using default response p
Numero della partizione (1-4, predefinito 1): 
Utilizzo del valore predefinito 1
Primo settore (2048-4294967295, predefinito 2048): 
Utilizzo del valore predefinito 2048
Last settore, +settori or +size{K,M,G} (2048-4294967294, predefinito 4294967294): 
Utilizzo del valore predefinito 4294967294

Comando (m per richiamare la guida): w
La tabella delle partizioni � stata alterata!

Chiamata di ioctl() per rileggere la tabella delle partizioni.
Sincronizzazione dei dischi in corso.
root@andrea-server:/home/andrea# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 testine, 63 settori/tracce, 30401 cilindri, totale 488397168 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x000ab854

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    39063551    19530752   83  Linux
/dev/sda2        39065598   488396799   224665601    5  Esteso
/dev/sda5       484816896   488396799     1789952   82  Linux swap / Solaris
/dev/sda6        39065600   484816895   222875648   83  Linux

Le voci nella tabella delle partizioni non sono nello stesso ordine del disco

Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
90 testine, 3 settori/tracce, 21705678 cilindri, totale 5860533168 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x2bc088a9

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  4294967294  2147482623+  83  Linux

Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
90 testine, 3 settori/tracce, 21705678 cilindri, totale 5860533168 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x18bf2caf

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  4294967294  2147482623+  83  Linux
root@andrea-server:/home/andrea# mdadm --create /dev/md0 --level=raid1 --raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
Continue creating array? 
Continue creating array? (y/n) 
Continue creating array? (y/n) y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
root@andrea-server:/home/andrea# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdc1[1] sdb1[0]
      2147351360 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  0.1% (4060672/2147351360) finish=202.3min speed=176550K/sec
      
unused devices: <none>
root@andrea-server:/home/andrea# mdadm --detail --scan --verbose > /etc/mdadm/mdadm.conf
root@andrea-server:/home/andrea# mkfs.ext4 /dev/md0
mke2fs 1.42.9 (4-Feb-2014)
Etichetta del filesystem=
OS type: Linux
Dimensione blocco=4096 (log=2)
Dimensione frammento=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
134209536 inodes, 536837840 blocks
26841892 blocks (5.00%) reserved for the super user
Primo blocco dati=0
Maximum filesystem blocks=4294967296
16383 gruppi di blocchi
32768 blocchi per gruppo, 32768 frammenti per gruppo
8192 inode per gruppo
Backup del superblocco salvati nei blocchi: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848, 512000000

Allocating group tables: fatto                           
Scrittura delle tavole degli inode: fatto                           
Creating journal (32768 blocks): fatto
Scrittura delle informazioni dei superblocchi e dell'accounting del filesystem: fatto      

root@andrea-server:/home/andrea# cat /proc/mdstatPersonalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdc1[1] sdb1[0]
      2147351360 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  2.8% (61638720/2147351360) finish=199.9min speed=173813K/sec
      
unused devices: <none>
root@andrea-server:/home/andrea# mdadm -D /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Sat Mar 14 13:03:02 2015
     Raid Level : raid1
     Array Size : 2147351360 (2047.87 GiB 2198.89 GB)
  Used Dev Size : 2147351360 (2047.87 GiB 2198.89 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Sat Mar 14 13:08:15 2015
          State : active, resyncing 
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

  Resync Status : 4% complete

           Name : andrea-server:0  (local to host andrea-server)
           UUID : 4c8cd4d2:57fd7e12:407033b7:19bdd525
         Events : 2

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1
root@andrea-server:/home/andrea# fdisk -l /dev/md0

Disk /dev/md0: 2198.9 GB, 2198887792640 bytes
2 testine, 4 settori/tracce, 536837840 cilindri, totale 4294702720 settori
Unit� = settori di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x00000000

Il disco /dev/md0 non contiene una tabella delle partizioni valida
root@andrea-server:/home/andrea# 
tunnel_net
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1988
Iscrizione: venerdì 27 febbraio 2015, 15:48
Desktop: gnome
Distribuzione: ubuntu 10.04
Sesso: Maschile

Re: mdadm raid1

Messaggio da tunnel_net »

è che ci stanno un po' di cose strane
i dischi hanno partition table msdos che non supporta più di due tera "nobbuono" del resto:
WARNING: The size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can not be used on drives for volumes
larger than (2199023255040 bytes) for 512-byte sectors. Use parted(1) and GUID
partition table format (GPT).
i file system sdb1 e sdc1 li ha fatti con ID 83 "nobbuono"

il resto (non ho guardato in dettaglio) ma mi sembra a posto
apt-get moo
tasso1986
Prode Principiante
Messaggi: 41
Iscrizione: giovedì 20 novembre 2008, 10:17

Re: mdadm raid1

Messaggio da tasso1986 »

ok grazie per l'aiuto!!! ho risolto formattando i dischi con gparted utilizzando GPT.

Ho un'altra domanda... sto cercando di settare lo spin-down dei dischi in raid1 ma non riesco a farlo funzionare con hdparm.
Prima di modificare hdparm.conf ho voluto provare con i comandi:

Codice: Seleziona tutto

sudo hdparm -S 50 /dev/sdb

/dev/sdb:
 setting standby to 50 (4 minutes + 10 seconds)

Codice: Seleziona tutto

sudo hdparm -S 50 /dev/sdc

/dev/sdc:
 setting standby to 50 (4 minutes + 10 seconds)
ma dopo 5-10-15 minuti...

Codice: Seleziona tutto

andrea@andrea-server:~$ sudo hdparm -C /dev/sdc
[sudo] password for andrea: 

/dev/sdc:
 drive state is:  active/idle

Codice: Seleziona tutto

andrea@andrea-server:~$ sudo hdparm -C /dev/sdb
[sudo] password for andrea: 

/dev/sdb:
 drive state is:  active/idle
mi sapete dire come si puo impostare lo spin-down su raid1?????
i due dischi sono dei seagate nas 3tb... puo essere che su questi dischi non sia possible impostare lo spin-down in quanto sn dischi costruiti apposta per nas????
Scrivi risposta

Ritorna a “Ubuntu su server”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 18 ospiti