• No se han encontrado resultados

INDICADORES SECTORIALES

Overview

In this practice, you test application data redundancy by using different scenarios. First you create a ZFS mirrored pool that contains one mirror. To minimize the chances of losing data, you distribute the data over two mirrors. At this time, to address a policy change, you

reconfigure the pool to keep three copies of data, which requires you to create a three-way mirror.

Tasks

1. Verify that the Sol11-SuperServer and Sol11-Server1 virtual machines are running. This can be determined by viewing the Oracle VM VirtualBox Manager window and checking the run status for each virtual machine. If the virtual machines are not running, start them now. 2. Log in to the Sol11-Server1 virtual machine as oracle user. Use the oracle1 password.

Assume administrator privileges.

3. Execute the zpool list command to display the ZFS pools that are currently configured

in the system.

root@s11-serv1:~# zpool list

NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 32G 10.6G 21.4G 33% 1.00x ONLINE -

Currently, the only ZFS pool that is available is the root pool, which is needed to make the ZFS file system a root file system.

4. Use the zpool status command to determine the disks that are currently configured for

the ZFS rpool.

root@s11-serv1:~# zpool status rpool pool: rpool

state: ONLINE

scan: none requested config:

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

errors: No known data errors

This display shows that rpool is using the local disk c7t0d0. So while creating new pools, leave this disk untouched.

Oracle Internal & Or

5. Execute the format command to identify any additional disks configured in the system. root@s11-serv1:~# format

Searching for disks...done

AVAILABLE DISK SELECTIONS:

0. c7t0d0 <ATA-VBOX HARDDISK-1.0 cyl 4205 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0

1. c7t2d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@2,0

2. c7t3d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@3,0

3. c7t4d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@4,0

4. c7t5d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@5,0

5. c7t6d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@6,0

6. c7t7d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@7,0

7. c7t8d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@8,0

8. c7t9d0 <ATA-VBOX HARDDISK-1.0 cyl 529 alt 2 hd 128 sec 32> /pci@0,0/pci8086,2829@d/disk@9,0^D

^C

The display tells you that disks c7t2d0 to c7t9d0 are available for use.

To cancel the format command, press CTRL-C or CTRL-D.

6. Create a mirrored ZFS pool named oraclecrm by using the disks c7t2d0 and c7t3d0. Show the results.

root@s11-serv1:~# zpool create oraclecrm mirror c7t2d0 c7t3d0 root@s11-serv1:~# zpool list

NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT oraclecrm 1.02G 112K 1.02G 0% 1.00x ONLINE -

rpool 32G 10.6G 21.4G 33% 1.00x ONLINE -

Here you created a pool called oraclecrm with a mirror by using two free disks. The purpose of this pool is to store the Oracle business application Customer Relationship Management (CRM) components. Because your company required redundancy, you have created a mirror, meaning that you have an online copy of the CRM data. This online copy will come in handy in case one of the disks gets corrupted.

Oracle Internal & Or

7. Add another mirror in the oraclecrm pool.

root@s11-serv1:~# zpool add oraclecrm mirror c7t4d0 c7t5d0 root@s11-serv1:~# zpool status oraclecrm

pool: oraclecrm state: ONLINE

scan: none requested config:

NAME STATE READ WRITE CKSUM oraclecrm ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c7t2d0 ONLINE - - - c7t3d0 ONLINE - - - mirror-1 ONLINE 0 0 0 c7t4d0 ONLINE - - - c7t5d0 ONLINE - - -

errors: No known data errors

Your company is very concerned about losing data because of data or disk corruption. You are asked to spread the data over multiple disks to mitigate the risk of data loss. To satisfy this objective, you create another mirror by using two free disks. Now, the data is distributed over the two mirrors and the respective disks. This means that 50% of the data will be stored in the first mirror and 50% of the data in the second mirror. You will see a demonstration subsequently.

8. Check the capacity of both the mirrors by issuing the zpool iostat -v oraclecrm command.

root@s11-serv1:~# zpool iostat -v oraclecrm

capacity operations bandwidth pool alloc free read write read write --- --- --- --- --- --- --- oraclecrm 110K 2.05G 0 30 196 34.3K mirror 77K 1.02G 0 21 196 22.9K c7t2d0 - - 0 20 15.3K 90.5K c7t3d0 - - 0 21 15.1K 90.5K mirror 33.5K 1.02G 0 22 0 27.9K c7t4d0 - - 1 23 36.8K 197K c7t5d0 - - 1 24 36.8K 197K --- --- --- --- --- --- ---

Here you see the two mirrors listed with their details. Note that the total free space in the pool, 2.05G, has been equally distributed between the two mirrors (1.02G each). The alloc column shows the ZFS overhead.

Oracle Internal & Or

9. Determine the mount point of the top-level file system. root@s11-serv1:~# zfs list oraclecrm NAME USED AVAIL REFER MOUNTPOINT oraclecrm 94K 2.01G 31K /oraclecrm

The mount point of the pool or the top-level file system of oraclecrm is /oraclecrm. This is the root of the pool; that is, all the file systems that are created will be within this mount point.

10. Create a 2 MB file by using the mkfile command. Check the file storage allocation for the mirrors by running the zpool iostat command.

root@s11-serv1:~# mkfile 2m /oraclecrm/crmindex root@s11-serv1:~# zpool iostat -v oraclecrm

capacity operations bandwidth pool alloc free read write read write --- --- --- --- --- --- --- oraclecrm 2.26M 2.04G 0 18 128 26.5K mirror 1.06M 1.02G 0 13 128 17.2K c7t2d0 - - 0 12 9.31K 58.5K c7t3d0 - - 0 12 9.19K 58.5K mirror 1.20M 1.02G 0 9 0 14.5K c7t4d0 - - 0 9 14.4K 80.5K c7t5d0 - - 0 9 14.4K 80.5K --- --- --- --- --- --- ---

Note: Your display may show different numbers.

Your CRM analyst shared with you that a small file will be needed for storing the index of the CRM application. You create a 2 MB file called crmindex in the pool.

Note how this 2 MB worth of storage has been roughly divided between the two mirrors. This shows that all CRM data will be divided between the two mirrors.

Hint: In some cases, it may help to wait for some time before issuing the zpool iostat command to allow ZFS to complete writing to the mirrors.

11. Use the zfs list oraclecrm command to list the capacity summary for the oraclecrm pool.

root@s11-serv1:~# zfs list oraclecrm

NAME USED AVAIL REFER MOUNTPOINT oraclecrm 2.09M 2.01G 2.03M /oraclecrm

Note the space used now at the top-level file system. This reflects the 2 MB of storage used by the crmindex file.

Oracle Internal & Or

12. Use the zpool destroy oraclecrm command to delete the pool. Confirm the deletion by using the zpool list command.

root@s11-serv1:~# zpool destroy oraclecrm root@s11-serv1:~# zpool list oraclecrm cannot open 'oraclecrm': no such pool

Based on a review by the CRM analyst, there was a change in direction. It was agreed that you keep three copies of data and not distribute it over two separate mirror sets. To address this objective, you delete the current data redundancy configuration and destroy the pool to create the new configuration.

13. Re-create the mirrored ZFS pool named oraclecrm by using the disks c7t2d0 and c7t3d0. Show the results.

root@s11-serv1:~# zpool create oraclecrm mirror c7t2d0 c7t3d0 root@s11-serv1:~# zpool list

NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT oraclecrm 1.02G 126K 1.02G 0% 1.00x ONLINE -

rpool 32G 10.6G 21.4G 33% 1.00x ONLINE -

Note: The purpose of the reconfiguration is to create a three-way mirror now and reuse the existing storage disks. This will also assist you in focusing on a cleaner setup, for instance, having one mirror.

14. Use the zpool attach command to add another disk to the mirror to make it a three-way mirror. Confirm this action by using the zpool status command.

root@s11-serv1:~# zpool attach oraclecrm c7t2d0 c7t4d0 root@s11-serv1:~# zpool status oraclecrm

pool: oraclecrm state: ONLINE

scan: resilvered 86.5K in 0h0m with 0 errors on Sat Oct 15 07:51:21 2011

config:

NAME STATE READ WRITE CKSUM oraclecrm ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c7t2d0 ONLINE - - - c7t3d0 ONLINE - - - c7t4d0 ONLINE - - -

errors: No known data errors

Now this new configuration meets the objective of maintaining redundancy by keeping three copies of data on three individual disks. The application data can be created as shown earlier.

Oracle Internal & Or

Notice that the attach command specifies an existing disk in the mirror and a free disk to be included in the mirror. The result is displayed by the status command. The status display also shows the resilvering action. The purpose of resilvering is to replicate data on the newly added disk.

15. Use the zpool add command to add a cache device to the mirror to allow the cache device to be used as local pool memory. Confirm this action by using the zpool status command.

root@s11-serv1:~# zpool add oraclecrm cache c7t5d0 root@s11-serv1:~# zpool status oraclecrm

pool: oraclecrm state: ONLINE

scan: resilvered 86.5K in 0h0m with 0 errors on Sat Oct 15 07:51:21 2011

config:

NAME STATE READ WRITE CKSUM oraclecrm ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 c7t2d0 ONLINE - - - c7t3d0 ONLINE - - - c7t4d0 ONLINE - - - cache c7t5d0 ONLINE 0 0 0

errors: No known data errors

This added device will serve as local memory for the pool to boost the input/output performance. Your business analyst had indicated that you may need to boost the I/O performance of the pool.

16. Your business analyst has now indicated that you do not need to boost pool performance because of the low volume of data. Use the zpool remove command to delete the cache device. Confirm this action by using the zpool status command.

root@s11-serv1:~# zpool remove oraclecrm c7t5d0 root@s11-serv1:~# zpool status oraclecrm

pool: oraclecrm state: ONLINE

scan: resilvered 86.5K in 0h0m with 0 errors on Sat Oct 15 07:51:21 2011

config:

NAME STATE READ WRITE CKSUM oraclecrm ONLINE 0 0 0 mirror-0 ONLINE 0 0 0

Oracle Internal & Or

c7t2d0 ONLINE - - - c7t3d0 ONLINE - - - c7t4d0 ONLINE - - -

errors: No known data errors

Note that the cache device does not appear in the display.

17. Use the zpool destroy command to delete the pool. Use the zpool list command to confirm the deletion.

root@s11-serv1:~# zpool list

NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT oraclecrm 1.02G 150K 1.02G 0% 1.00x ONLINE -

rpool 32G 10.6G 21.4G 33% 1.00x ONLINE - root@s11-serv1:~# zpool destroy oraclecrm

root@s11-serv1:~# zpool list

NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 32G 10.6G 21.4G 33% 1.00x ONLINE -

The purpose of destroying this pool is to conclude working with the mirrors. In the next practice, you will create a new pool with no mirrors to simplify working with ZFS backup and recovery functions. In addition, you will create a pool with no mirrors.

Oracle Internal & Or

Documento similar