Windows 2012 Server R2 Drive Defrag Error

Getting the message:
Microsoft-Windows-Defrag(257 - None): The volume Index Data (E:) was not optimized because an error was encountered: The slab consolidation / trim operation cannot be performed because the volume alignment is invalid. (0x89000029)
NSPITAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rindiCommented:
Trim is usually something used together with SSD's. If you are using SSD'd in your server you should never defragment them. Defragging an SSD helps in reducing it's life, and it doesn't bring you any advantage.
Seth SimmonsSr. Systems AdministratorCommented:
have you tried using powershell?

Optimize-Volume -DriveLetter E -Defrag -Verbose
noxchoGlobal Support CoordinatorCommented:
How did you create this volume? Was it created using Windows Disk Management or a third party tool? The invalid alignment of the volume is mentioned. This means the partition has either problems with geometry or it needs to be aligned to physical sectors.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

NSPITAuthor Commented:
noxcho, the drive is a LUN on a VMWare 5.5 virtual machine running windows 2012 r2 server.  Sorry, I should have included that info.
rindiCommented:
Also Virtual Disks should never be defragmented. Just disable defragging.
noxchoGlobal Support CoordinatorCommented:
As said by rindi disable defragging for LUN.
NSPITAuthor Commented:
How do I disable defrag properly and do I do it for the whole VM?
rindiCommented:
Yes, disable it for the complete VM. On most OS's you right click "Computer", select "Manage", then "Diskmanagement". Now right click one of the disks and select "Properties", then the "Tools" tab. Now click on "Defragment now", then "Configure Schedule". Now just unclick on "Run on a Schedule".

Normally a properly setup VM should have that disabled by default, though.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
noxchoGlobal Support CoordinatorCommented:
What you actually need is to check that partitions inside the VMs are properly aligned. If this is a default Windows installation then it must be aligned by default.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.