Professional Documents
Culture Documents
Defragmentation
Module Objectives Upon completion of this module, you will be able to:
Describe the new defragmentation feature and associated commands Describe the differences between a normal and full reallocation Set an allocation schedule on a file Set, quiesce, restart and view the status with the new reallocate command
DOT 7.0
Integrated fragmentation/reallocation management CLI and FilerView Scheduled defragmentation/reallocation Status/Inquiry Improved performance
Reduce amount of data moved during defragmentation. Reallocation scan adjusts speed based on system load
Full Reallocation
Use reallocate f Or wafl scan reallocate Rearranges data more aggressively Performed on files, LUNs or Volumes One-time operation e.g. when adding a new RAID group
Data
Data
Data
Data
Data
Data
Data
Data
Data
Reallocation Scheduling Reallocation jobs are scheduled to run periodically. Three kinds of job scheduling
Interval (default) Default = 1 day between scans Specific schedule
Use * for all, - for range, , for list Do not use * for minutes
Reallocate Scheduling
Minute 0 0 0,10,20,3 0,40,50 0 0 Hour 23 10 * 23 21 Day of month * 15 * * * Day of week 6 * * 1-5 0,6 Result Scan at 11:00 P.M. every Saturday Scan at 10:00 A.M. on the 15th of the month Scan every 10 minutes Scan M-F at 11:00 P.M. Scan Saturday and Sunday at 9:00 P.M.
Reallocate command
reallocate start /vol/flex1/abc Fri Nov 5 20:17:11 GMT [wafl.scan.start:info]: Starting WAFL layout measurement on volume flex1. Reallocation scan will be started on '/vol/flex1/abc'. Monitor the system log for results.
reallocate status -v Reallocation scans are on /vol/flex1/abc: State: Idle Flags: maybe_realloc,repeat Threshold: 4 Schedule: n/a Interval: 1 day Optimization: 1 By default, starting a reallocation on a file or LUN will use an interval of 1 day, and set the fragmentation threshold to 4
To change the default interval, you can use the i <#> option. To change the default threshold value, you can use the t <#> option.
Use the o option if you want to run the job only once. This has the same action as using the reallocate start f <path> command. If you do not want to check the optimization of the file against the threshold value, you can use the n option to run the command regardless if the file is fragmented or not. Note that if you want to show all reallocation schedules, you can use the v command. You can also view specific schedules by adding the <path> to the end of the command.
Reallocate command
reallocate schedule -s "0 23 * 6" /vol/flex1/abc Reallocation for '/vol/flex1/abc' will be scheduled for '0 23 * 6'. reallocate status -v /vol/flex1/abc: State: Idle Flags: maybe_realloc,repeat Threshold: 4 Schedule: 0 23 * 6 Interval: n/a Optimization: n/a Notice that the interval is now set to N/A, as there is now a scheduled reallocation time for the file.
Reallocate command
reallocate schedule d /vol/flex1/abc Reallocation schedule for '/vol/flex1/abc' will removed.
reallocate status -v Reallocation scans are on /vol/flex1/abc: State: Idle Flags: maybe_realloc,repeat Threshold: 4 Schedule: n/a Interval: 1 day Optimization: n/a Now weve deleted the schedule and returned to using an interval value for our schedule.
Reallocate command
reallocate stop /vol/flex1/abc Fri Nov 5 20:37:12 GMT [wafl.reallocate.scan.remove:info]: Reallocation scan for '/vol/flex1/abc' is being removed. Reallocation will be stopped on '/vol/flex1/abc'. Monitor the system log for results.
reallocate status -v Reallocation scans are on No reallocation status. Now weve deleted the reallocation itself from this jobs.
Reallocate command
You can only start a one-time job on volumes.
reallocate start f /vol/flex1 Fri Nov 5 21:07:27 GMT [wafl.scan.start:info]: Starting file reallocating on volume flex1. Reallocation scan will be started on '/vol/flex1'. Monitor the system log for results.
reallocate status -v Reallocation scans are on /vol/flex1: State: Reallocating: Inode 596, block 0 of 1168 Flags: doing_force,whole_vol Threshold: 4 Schedule: n/a Interval: n/a Optimization: n/a
You can stop a one-time job on a file, LUN, or volume by using the reallocate stop <path> command. The command itself doesnt say that you are able to stop a volume reallocation, but it will allow you to do this.
Avoid fragmentation by having a regular scheduled reallocation job. Schedule reallocate job to finish before major operations (like Exchange backup/verify) Avoid full reallocation of snapshot data
If data is aggressively moved, this will result in a lot fragmented data being held in snapshots
Troubleshooting Use reallocate status v first Also wafl scan status (ADV or DIAG) View scanner speed with wafl scan speed
Hidden command
Other Points Works with Traditional or Flexible Volumes Scheduled reallocation job is independent of the file/LUN (need to create/destroy independently.) Renaming a volume renames the reallocation job paths. Destroying a volume destroys all reallocation jobs in that volume. CFO takeover/giveback handles scheduled jobs also.
Internal Information
Topic Review What command would you use to defragment your file system? What are the differences between a normal and full reallocation? When would you set an allocation schedule? What command would you use to view a reallocation job?
Exercises
Exercise Overview
This exercise is to familiarize you with the new .reallocation command.
Time Estimate
20 Minutes
Start of Exercise Set a normal reallocation schedule with the default interval.
Step 1. Action At the command prompt, enter the following: lun create s 10m t solaris /vol/flexvol/lun1 (If your volume is named something different, use the appropriate name).
2.
At the command prompt, enter the following: reallocate start /vol/flexvol/lun1 (If your volume is named something different, use the appropriate name).
3.
At the command prompt, enter the following: reallocate status View the status and note the schedule is blank, but the interval is set to 1 day. This is the default. .
6.
Wait at least one minute and you should see a console message similar to the following: filer> Thu Oct 14 09:08:00 PDT [wafl.scan.start:info]: Starting WAFL layout measurement on volume vol0 * * * * sets the reallocate schedule to do a reallocate every minute of every day. This would not be done in normal practice. It is only for demonstration purposes.
7.
At the command prompt, enter the following: reallocate schedule -s "* * - -" /vol/vol0/file1
8.
Wait one minute, console messages that say starting wafl scan No, you have set the schedule to every minute every hour, however, you have not set the day of month or the day of the week.
2.
Type the following: filer> reallocate status You should see the schedules for the above file and lun, as well as the reallocation on the volume.
3.
Type the following: filer> reallocate status -v View the status notice the difference in the two commands.
2.
Type the following: filer> reallocate quiesce /vol/vol0/file1 view the status and note that the reallocation job is quiesced..
3.
2.
3.
Type the following: filer> reallocate status -v view the status and note that the reallocation job is active.