Céation d'un raid-5 avec Zpool sur solairs 11

1. Avant-propos
1.1. Présentation
1.2. Introduction
2. 2. Création d'un RAID-5
2.1. Affichage des disques disponible
2.2. Création du raid
3. Test
3.1. Connexion à la cellule
3.2. Listage des points de montage
3.3. Création d'un gros fichier

1. Avant-propos


1.1 - Présentation.



+--------------------------------------------------+
| Serveur Solaris 11                               |
| Hostname : arecibo                               |
| Os : SunOS 5.11 11.1 i86pc i386 i86pc            |
|                                                  |
|                                                  |
| +----------------------------------------------+ |
| |                                              | |
| |     MIRROR RAID - 5                          | |
| |     NOM : TURLAN                             | |
| |     TAILLE : 30 Go                           | |
| |                                              | |
| |                                              | |
| | +--------+ +--------+ +--------+ +--------+  | |
| | | c8t1d0 | | c8t2d0 | | c8t3d0 | | c8t4d0 |  | |
| | | 10 Go  | | 10 Go  | | 10 Go  | | 10 Go  |  | |
| | +--------+ +--------+ +--------+ +--------+  | |
| |                                              | |
| +----------------------------------------------+ |
|                                                  |
|                                                  |
+--------------------------------------------------+


1.2 - Introduction


Dans l'exemple ci-dessous nous allons crééer un RAID-5 avec l'utilitaire ZFS.

2. Création d'un RAID-5


2.1 - Affichage des disques disponible


iostat -En
root@arecibo:~# iostat -En
c8t0d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: VMware,  Product: VMware Virtual S Revision: 1.0  Serial No:  
Size: 17,18GB <17179869184 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 3 Predictive Failure Analysis: 0 
c7t0d0           Soft Errors: 0 Hard Errors: 4 Transport Errors: 0 
Vendor: NECVMWar Product: VMware IDE CDR10 Revision: 1.00 Serial No:  
Size: 0,00GB <0 bytes>
Media Error: 0 Device Not Ready: 4 No Device: 0 Recoverable: 0 
Illegal Request: 1 Predictive Failure Analysis: 0 
c8t1d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: VMware,  Product: VMware Virtual S Revision: 1.0  Serial No:  
Size: 10,74GB <10737418240 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 Predictive Failure Analysis: 0 
c8t2d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: VMware,  Product: VMware Virtual S Revision: 1.0  Serial No:  
Size: 10,74GB <10737418240 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 Predictive Failure Analysis: 0 
c8t3d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: VMware,  Product: VMware Virtual S Revision: 1.0  Serial No:  
Size: 10,74GB <10737418240 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 Predictive Failure Analysis: 0 
c8t4d0           Soft Errors: 0 Hard Errors: 0 Transport Errors: 0 
Vendor: VMware,  Product: VMware Virtual S Revision: 1.0  Serial No:  
Size: 10,74GB <10737418240 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0 
Illegal Request: 0 Predictive Failure Analysis: 0 
root@arecibo:~# 

2.2 - Création du RAID-5


Une commande suffit à crééer un raid avec ZFS..
zpool create TURLAN raidz c8t1d0 c8t2d0 c8t3d0 c8t4d0
root@arecibo:~# zpool create TURLAN raidz c8t1d0 c8t2d0 c8t3d0 c8t4d0
root@arecibo:~# 

3. Test


3.1 - Listage des pools de disque


zpool status

root@arecibo:~# zpool status
  pool: TURLAN
 state: ONLINE
  scan: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    TURLAN      ONLINE       0     0     0
      raidz1-0  ONLINE       0     0     0
        c8t1d0  ONLINE       0     0     0
        c8t2d0  ONLINE       0     0     0
        c8t3d0  ONLINE       0     0     0
        c8t4d0  ONLINE       0     0     0

errors: No known data errors

  pool: rpool
 state: ONLINE
  scan: none requested
config:

    NAME      STATE     READ WRITE CKSUM
    rpool     ONLINE       0     0     0
      c8t0d0  ONLINE       0     0     0

errors: No known data errors
root@arecibo:~# 

3.2 - Listage des points de montage


Nous pouvons voir dans l'exemple ci-dessous que nous perdons la capacité d'un disque "10Go" dans notre exemple.
zfs list

root@arecibo:/TURLAN# zfs list 
NAME                              USED  AVAIL  REFER  MOUNTPOINT
TURLAN                           97,2K  29,3G  44,9K  /TURLAN
rpool                            6,96G  8,42G  4,58M  /rpool
rpool/ROOT                       4,89G  8,42G    31K  legacy
rpool/ROOT/solaris               4,89G  8,42G  3,95G  /
rpool/ROOT/solaris-backup-1        67K  8,42G  1,98G  /
rpool/ROOT/solaris-backup-1/var     1K  8,42G   758M  /var
rpool/ROOT/solaris/var            853M  8,42G   205M  /var
rpool/VARSHARE                     54K  8,42G    54K  /var/share
rpool/dump                       1,03G  8,45G  1,00G  -
rpool/export                       63K  8,42G    32K  /export
rpool/export/home                  31K  8,42G    31K  /export/home
rpool/swap                       1,03G  8,45G  1,00G  -
root@arecibo:/TURLAN# 

3.3 - Création d'un fichier (pour tester)


Pour tester notre pool de disque nous allons crééer un gros fichier de 10Go.
mkfile 10g grosfichier
root@arecibo:/TURLAN# mkfile 10g grosfichier
root@arecibo:/TURLAN# ls -l
total 4567010
-rw-------   1 root     root     10737418240 nov.  5 21:35 grosfichier
root@arecibo:/TURLAN#