Clonner le rpool d’un OpenSolaris

Dans ma configuration j’ai un ssd de 40 Go :

c5t4d0 <DEFAULT cyl 4862 alt 2 hd 255 sec 63>

et deux nouveaux ssd de 80 Go :
c5t3d0 <ATA-INTEL SSDSA2M080-02HD-74.53GB>
c5t5d0 <ATA-INTEL SSDSA2M080-02HD-74.53GB>

Le but et d’avoir les deux ssd de 80 go avec un miroir de 40 go de la partition de boot, puis 6 go de miroir de pour le zlogs puis le reste en stripping pour le cache.

# format
Searching for disks...done
c5t3d0: configured with capacity of 74.51GB
c5t5d0: configured with capacity of 74.51GB
AVAILABLE DISK SELECTIONS:
[...]
4. c5t3d0 <ATA-INTELSSDSA2M080-02HD cyl 9727 alt 2 hd 255 sec 63>
/pci@0,0/pci15d9,f580@1f,2/disk@3,0
5. c5t4d0 <DEFAULT cyl 4862 alt 2 hd 255 sec 63>
/pci@0,0/pci15d9,f580@1f,2/disk@4,0
6. c5t5d0 <ATA-INTELSSDSA2M080-02HD cyl 9727 alt 2 hd 255 sec 63>
/pci@0,0/pci15d9,f580@1f,2/disk@5,0

[...]

Specify disk (enter its number): 4
[disk formatted]
No Solaris fdisk partition found.
format> fdisk
No fdisk table exists. The default partition for the disk is:

  a 100% "SOLARIS System" partition

Type "y" to accept the default partition,  otherwise type "n" to edit the
 partition table.
y
format> partition
partition> modify
Select partitioning base:
        0. Current partition table (original)
        1. All Free Hog
Choose base (enter number) [0]? 1

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0               0         (0/0/0)            0
  1       swap    wu       0               0         (0/0/0)            0
  2     backup    wu       0 - 9725       74.50GB    (9726/0/0) 156248190
  3 unassigned    wm       0               0         (0/0/0)            0
  4 unassigned    wm       0               0         (0/0/0)            0
  5 unassigned    wm       0               0         (0/0/0)            0
  6        usr    wm       0               0         (0/0/0)            0
  7 unassigned    wm       0               0         (0/0/0)            0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
  9 alternates    wm       0               0         (0/0/0)            0

Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 3
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: 37.24gb
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: 5gb
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]: 0
Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]: 0

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       1 - 4862       37.24GB    (4862/0/0)  78108030
  1       swap    wu    4863 - 5515        5.00GB    (653/0/0)   10490445
  2     backup    wu       0 - 9725       74.50GB    (9726/0/0) 156248190
  3 unassigned    wm    5516 - 9725       32.25GB    (4210/0/0)  67633650
  4 unassigned    wm       0               0         (0/0/0)            0
  5 unassigned    wm       0               0         (0/0/0)            0
  6        usr    wm       0               0         (0/0/0)            0
  7 unassigned    wm       0               0         (0/0/0)            0
  8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
  9 alternates    wm       0               0         (0/0/0)            0

Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "bootclemmm"

Ready to label disk, continue? y
Onts a donc partitionnĂ© les deux disques, ont les “ataches” au zpool “rpool”
# zpool attach -f rpool c5t4d0s0 c5t3d0s0
Please be sure to invoke installgrub(1M) to make 'c5t3d0s0' bootable.
Make sure to wait until resilver is done before rebooting.
# zpool attach -f rpool c5t4d0s0 c5t5d0s0
Please be sure to invoke installgrub(1M) to make 'c5t5d0s0' bootable.
Make sure to wait until resilver is done before rebooting.
Onts regarde la progression du miroir zpool "rpool"
# zpool status rpool pool: rpool state: ONLINE scrub: resilver completed after 0h2m with 0 errors on Mon May 3 11:04:22 2010 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c5t4d0s0 ONLINE 0 0 0 c5t3d0s0 ONLINE 0 0 0 10.6G resilvered c5t5d0s0 ONLINE 0 0 0 10.6G resilvered errors: No known data errors
Onts instale le boot grub sur les deux disques "rpool"

# installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c5t3d0s0
Updating master boot sector destroys existing boot managers (if any).
continue (y/n)?y
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 273 sectors starting at 50 (abs 16115)
stage1 written to master boot sector

# installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c5t5d0s0
Updating master boot sector destroys existing boot managers (if any).
continue (y/n)?y
stage1 written to partition 0 sector 0 (abs 16065)
stage2 written to partition 0, 273 sectors starting at 50 (abs 16115)
stage1 written to master boot sector

0 Responses to “Clonner le rpool d’un OpenSolaris”


  • No Comments

Leave a Reply