+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
Windows Thread, Defragmentation? in Technical; I must admit that I never defrag our servers. But from reading this I may consider doing it this weekend. ...
  1. #16
    Dafty's Avatar
    Join Date
    Nov 2007
    Location
    Lincolnshire
    Posts
    100
    Thank Post
    27
    Thanked 1 Time in 1 Post
    Rep Power
    0
    I must admit that I never defrag our servers. But from reading this I may consider doing it this weekend.
    The only thing I am really concerned about is the the safety of the data.

  2. #17
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,456
    Thank Post
    10
    Thanked 494 Times in 434 Posts
    Rep Power
    112
    Not directly related, but do read it if you want to know a little more about whats going on. http://www.raxco.fi/doc_images/pd_raid.pdf

    "At the core of this issue is the common perception that disk defragmentation software directly shuffles around disk clusters. That belief is incorrect."

  3. #18
    Dafty's Avatar
    Join Date
    Nov 2007
    Location
    Lincolnshire
    Posts
    100
    Thank Post
    27
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Thanks for the info DMcCoy!

    Just out of pure curiosity:

    What is the general consensus on defragging servers?

  4. #19
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,456
    Thank Post
    10
    Thanked 494 Times in 434 Posts
    Rep Power
    112
    Quote Originally Posted by Dafty View Post
    Thanks for the info DMcCoy!

    Just out of pure curiosity:

    What is the general consensus on defragging servers?
    I still do it, it does reduce the logical requests needed for a file. I just don't defrag that often. It's just not some magic performance or instability cure that it's made out to be :P

    Data loss isn't really an issue, nor is disk life (it's not really going to increase or decrease the life span - unless you run it all the time which might increase the disk wear a tiny bit).

  5. #20
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,488
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    75
    Those of you who are doing this as a scheduled task, can I ask what command you're using for a Win2K server.

  6. #21
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,765
    Thank Post
    898
    Thanked 417 Times in 350 Posts
    Blog Entries
    12
    Rep Power
    87
    Defragging mine now

    No need to do it more than 3 monthly in my opinion.

    90% of our files are static and haven't moved in years. I suspect its the same in most schools.

  7. #22
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,488
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    75
    Quote Originally Posted by ittech View Post
    No need to do it more than 3 monthly in my opinion.

    90% of our files are static and haven't moved in years. I suspect its the same in most schools.
    Depends on the drive, surely - the drive which houses the users' areas is changing almost constantly.

  8. #23
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,197
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    I schedule ours to run once a month on the servers with user folders and shared areas, i didn't do it in the past and the defragmenter showed the volume as very defragmented when i started doing it. As far as i'm concerned it improves performance and if you do it often it only takes a few mins rather than hours. Well it can take longer on very large storage but on one of our servers 100Gb is done in about 30 mins.

  9. #24
    button_ripple's Avatar
    Join Date
    Dec 2007
    Location
    Luton
    Posts
    346
    Thank Post
    93
    Thanked 20 Times in 18 Posts
    Rep Power
    17
    Quote Originally Posted by cookie_monster View Post
    Well it can take longer on very large storage but on one of our servers 100Gb is done in about 30 mins.
    2 x 500 GB Hard drives about 75-80% full take 15 mins here!!

  10. #25
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,197
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Yep the more often you run it the less time it takes. This server is very heavily used for lots of files and it a bit on the tired side as well.

  11. #26
    enjay's Avatar
    Join Date
    Apr 2007
    Location
    Reading, Berkshire, UK
    Posts
    4,488
    Thank Post
    282
    Thanked 196 Times in 167 Posts
    Rep Power
    75
    I've just had a look at our server, and there is literally NO blue on the C drive - time to defrag methinks!!

  12. #27
    Osprey's Avatar
    Join Date
    Mar 2007
    Location
    West Yorkshire
    Posts
    65
    Thank Post
    0
    Thanked 6 Times in 4 Posts
    Rep Power
    17
    We use the following vbs script

    Code:
    'defrag.vbs
    'Defrags all hard disks - Can be run as a Scheduled Task
    'Modified to create an error log and display it
    '© Doug Knox - 4/13/2002
    
    Option Explicit
    
    Dim WshShell, fso, d, dc, ErrStr(), Return, X, A(), MyFile, I, MyBox, Drive
    
    Set WshShell = WScript.CreateObject("WScript.Shell")
    Set fso = CreateObject("Scripting.FileSystemObject")
    X = 0
    
       Set dc = fso.Drives
    For Each d in DC 
    	If d.DriveType = 2 Then
    	   X = X + 1
    
    'Determine drive letter of first fixed disk
    'This is the drive that the error report will be placed on
    		If X = 1 Then
    		   Drive = d
    		End If
    	End If
    Next
    
    ReDim A(X)
    ReDim ErrStr(X)
    
    X = 0
    For Each d in dc
          If d.DriveType = 2 Then
          X = X + 1
          Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)
    
    'Determine the Error code returned by Defrag for the current drive and save it
    If return = 0 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag completed successfully" & vbCRLF
    elseif return = 1 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & " (defrag was cancelled manually) " & vbCRLF
    elseif return = 2 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & " (there was a command line error. Check your command line for valid switches and drives)" & vbCRLF
    elseif return = 3 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & " (there was an unknown error)" & vbCRLF
    elseif return = 4 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & " (defrag could not run due to insufficient memory resources)" & vbCRLF
      'errorlevel 5 is not currently used
    elseif return = 5 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & " (general error)" & vbCRLF
    elseif return = 6 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & "(System error: either the account used to run defrag is not an administrator, there is a problem loading the resource DLL, or a defrag engine could not be accessed. Check for proper user permissions and run Sfc.exe to validate system files)" & vbCRLF
    elseif return = 7 then
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with error level " & return & " (There is not enough free space on the drive. Defrag needs 15% free space to run on a volume)" & vbCRLF
    else
      ErrStr(x) = ErrStr(x) &  "Drive " & d & " Defrag aborted with an unknown error level: " & return & vbCRLF
    end if
    
           End If
       Next
    
    'Create the Error Report in the root of the first fixed disk.
    Set MyFile = fso.OpenTextFile(Drive & "\defragreport.txt", 2, True)
    MyFile.WriteLine(Date) & vbCRLF
    MyFile.WriteLine(Time) & vbCRLF
       For I = 1 to X
          MyFile.WriteLine(ErrStr(I))
       Next
       MyFile.Close
    
    Return = WshShell.Run(Drive & "\defragreport.txt",3,True)
    
    Set WshShell = Nothing
    Set fso = Nothing
    We schedule it on the servers to run at weekends when quiet, on the workstations we schedule it to run on Wednesday lunchtimes when the machines are likely to be on but not used much. To roll it out we use the following script to set up the task:

    'task.vbs - schedules defrag.vbs
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set objNewJob = objWMIService.Get("Win32_ScheduledJob")

    errJobCreated = objNewJob.Create _
    ("c:\defrag\defrag.vbs", "********123000.000000-000", _
    True , 4, , , JobID)
    Wscript.Echo errJobCreated
    The following script is used to install the defrag.vbs script on the workstations and to run the task.vbs. It checks to see if it is already installed, if it isn't it makes the folder, copies the files and runs task.vbs to set up the scheduled task. We run it as a startup script via a group policy.

    REM defrag.bat - startup script to install weekly defrag
    @ECHO OFF
    REM --- Check for an existing installation of defrag
    if exist "c:\defrag\defrag.vbs" goto _End
    REM --- Deploy to Windows 2000/XP/2003
    md "c:\defrag\"
    copy "\\server\packages$\defrag\*.*" "c:\defrag\" /y
    cscript c:\defrag\task.vbs
    REM --- End of the script
    :_End
    Hope this is of some use to someone!

  13. 3 Thanks to Osprey:

    enjay (4th April 2008), SYNACK (3rd April 2008), torledo (3rd April 2008)

  14. #28

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    We use o&o's defrag software. Weekly stealth on the servers and weekly stealth on our workstations. The only reason I did not go with Diskeeper was because of their constant daily ringing me up and flood of E-mail advertising.....

    Note: The Admins Admin Bar [ see below ] has a shortcut to the Windows defrag tool.....

  15. #29

    Join Date
    Apr 2008
    Location
    SE Asia
    Posts
    4
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Apparently automatic defragmentation is the 'hot' thing now, and scheduling a defrag is old and busted. :P From what my friends* told me, they like auto because once it's installed on the workstations they don't need to waste time scheduling or executing defrags for large numbers of machines weekly. The software uses I/O sensing and runs on unused system cycles, so no supervision required...truly install and forget it.

    (*they are the IT guys, I am merely a dilettante.)

  16. #30
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,197
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    A bit like Vista defrag :-) but everyone hated it so much that manual defrag is back in SP1 Hehehe!!!!

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •