miércoles, 27 de enero de 2010

Expandir Zpool - Staging01

1) Actualmente en la maquina se encuentra el siguiente zpool:
root@masterserver # zpool status staging01
pool: staging01
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
staging01 ONLINE 0 0 0
c5t203400A0B829E548d1 ONLINE 0 0 0

//errors: No known data errors

root@masterserver # zfs list
NAME USED AVAIL REFER MOUNTPOINT
staging01 393G 95.7G 28.5K /staging01
staging01/disk01 172G 95.7G 172G /staging01/disk01
staging01/disk02 219G 95.7G 219G /staging01/disk02
staging01/disk03 1.82G 95.7G 1.82G /staging01/disk03

Este es actualmente de 500GB

2) Para expandirlo debemos de dejar el nuevo dispositivo libre con una sola particion:
root@masterserver # format
Searching for disks...done

c5t203400A0B829E548d0: configured with capacity of 499.98GB


AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0
1. c5t203400A0B829E548d0
/pci@1f,700000/pci@0,2/SUNW,qlc@1/fp@0,0/ssd@w203400a0b829e548,0
2. c5t203400A0B829E548d1
/pci@1f,700000/pci@0,2/SUNW,qlc@1/fp@0,0/ssd@w203400a0b829e548,1
Specify disk (enter its number): 1
selecting c5t203400A0B829E548d0
[disk formatted]
Disk not labeled. Label it now? y


FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
format> p


PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
! - execute , then return
quit
partition> p
Current partition table (default):
Total disk cylinders available: 63998 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 15 128.00MB (16/0/0) 262144
1 swap wu 16 - 31 128.00MB (16/0/0) 262144
2 backup wu 0 - 63997 499.98GB (63998/0/0) 1048543232
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 32 - 63997 499.73GB (63966/0/0) 1048018944
7 unassigned wm 0 0 (0/0/0) 0

partition> q

### COMO NOS DAMOS CUENTA EN EL NUEVO VOLUMEN VEMOS QUE HAY UNA PARTICION 0, 1, Y 6. VAMOS A LIMPIARLAS Y A DEJAR SOLAMENTE LA 2 "Backup":



FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
format> disk

AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1e,600000/pci@0/pci@a/pci@0/pci@8/scsi@1/sd@0,0
1. c5t203400A0B829E548d0
/pci@1f,700000/pci@0,2/SUNW,qlc@1/fp@0,0/ssd@w203400a0b829e548,0
2. c5t203400A0B829E548d1
/pci@1f,700000/pci@0,2/SUNW,qlc@1/fp@0,0/ssd@w203400a0b829e548,1
Specify disk (enter its number)[2]: 1
selecting c5t203400A0B829E548d0
[disk formatted]
format> p


PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
! - execute , then return
quit
partition> p
Current partition table (default):
Total disk cylinders available: 63998 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 15 128.00MB (16/0/0) 262144
1 swap wu 16 - 31 128.00MB (16/0/0) 262144
2 backup wu 0 - 63997 499.98GB (63998/0/0) 1048543232
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 32 - 63997 499.73GB (63966/0/0) 1048018944
7 unassigned wm 0 0 (0/0/0) 0

partition> 6
Part Tag Flag Cylinders Size Blocks
6 usr wm 32 - 63997 499.73GB (63966/0/0) 1048018944

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting cyl[32]:
Enter partition size[1048018944b, 63966c, 63997e, 511728.00mb, 499.73gb]: 0
partition> 0
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 15 128.00MB (16/0/0) 262144

Enter partition id tag[root]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[262144b, 16c, 15e, 128.00mb, 0.12gb]: 0
partition> 1
Part Tag Flag Cylinders Size Blocks
1 swap wu 16 - 31 128.00MB (16/0/0) 262144

Enter partition id tag[swap]:
Enter partition permission flags[wu]:
Enter new starting cyl[16]:
Enter partition size[262144b, 16c, 31e, 128.00mb, 0.12gb]: 0
partition> p
Current partition table (unnamed):
Total disk cylinders available: 63998 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 unassigned wm 0 0 (0/0/0) 0
1 unassigned wu 0 0 (0/0/0) 0
2 backup wu 0 - 63997 499.98GB (63998/0/0) 1048543232
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 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0

### GUARDAMOS LOS CAMBIOS Y SALIMOS:

partition> label
Ready to label disk, continue? y

partition> q


FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
format> q


3) Ahora ya que dejamos libre el nuevo volumen vamos a adicionarlo en el zpool "staging01", el nuevo volumen tiene por wwn c5t203400A0B829E548d0: Como el nombre del zpool es staging01, le decimos que a ese zpool vamos a adicionarle el dispositivo anteriormente mensionado:

root@bksrv01 # zpool add staging01 c5t203400A0B829E548d0

# VALIDAMOS QUE EL DISPOSITIVO APARESCA EN EL ZPOOL:

root@masterserver # zpool status staging01
pool: staging01
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
staging01 ONLINE 0 0 0
c5t203400A0B829E548d1 ONLINE 0 0 0
c5t203400A0B829E548d0 ONLINE 0 0 0

errors: No known data errors

## VERIFICAMOS QUE REALMENTE SE VEA LA ESPACION A NIVEL DEL STAGING:

root@masterserver # df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 17G 8.9G 7.5G 55% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 907M 1.5M 906M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
17G 8.9G 7.5G 55% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
17G 8.9G 7.5G 55% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c0t0d0s3 9.8G 2.5G 7.2G 26% /var
swap 906M 104K 906M 1% /tmp
swap 906M 48K 906M 1% /var/run
/dev/dsk/c0t0d0s4 39G 36G 3.1G 93% /opt
staging01 977G 28K 584G 1% /staging01
staging01/disk01 977G 172G 584G 23% /staging01/disk01
staging01/disk02 977G 219G 584G 28% /staging01/disk02
staging01/disk03 977G 1.8G 584G 1% /staging01/disk03

No hay comentarios:

Publicar un comentario