LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-23-2016, 03:02 AM   #1
JoeyB
LQ Newbie
 
Registered: Aug 2004
Posts: 20

Rep: Reputation: 0
Zero out deleted files to recover disk space?


Hello All,

I have read about 100 posts, articles, blogs etc and none have really provided me with the magic answer.
In a virtual environment when you delete a lot of files, your host (vmware) says you are consuming more disk space than is truly being used.

I have seen a million people telling you to dd if=/dev/zero of=zero.file bs=1024
then once you have consumed ALL your disk space ( doesn't sound too safe ) you can delete the file you create and you can then run utilities from the host, but the reality is thats an awful solution. If you thin provision something like 1TB to prepare for growth and you are using 100GB, you then say copied 500GB more temporarily to that disk, once you erase it, you still reflect that you are using 600GB at the host level. Do that on a couple of servers and you can pretty much wipe out your host storage on fluff.

I'm hoping someone here has a better alternative to the running out of space method, that method takes hours just to fill 1 file to consume the whole servers capacity.

I appreciate your help!!
(running centos 5.x, 6.x and 7.x)

Last edited by JoeyB; 03-23-2016 at 03:11 AM.
 
Old 03-23-2016, 03:22 AM   #2
scriptkiddy
LQ Newbie
 
Registered: Feb 2016
Posts: 18

Rep: Reputation: Disabled
Not exactly what you want to hear, but we had similar issues at work and it was a "feature" of ESX at the time for our VMware. We dumped ESX later and went to NETAPP and never had a problem. Here is a link to an article that talks about VMware having this issue. Best of luck to ya in whatever you decide.
 
Old 03-23-2016, 03:43 AM   #3
JoeyB
LQ Newbie
 
Registered: Aug 2004
Posts: 20

Original Poster
Rep: Reputation: 0
Unhappy

Hoping for some magic out there, but I appreciate the feedback.
I know I can add a drive, copy files over, and dump the original, but it's just a very ridiculous process to have to do.

That link by the way is about refresh time of reporting the space, not about how much is used according to vmware....

Last edited by JoeyB; 03-23-2016 at 03:45 AM.
 
Old 03-23-2016, 07:54 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
When you create the disk as one that grows you could end up with a much larger virtual hard drive file size than you need. Most VM's offer a way to compact it.

What you are talking about on the zero deal is a situation where you may wish to use a clone tools that copies bit by bit to a real hard drive or virtual hard drive. The resulting bit by bit copy would then be more easy to use a tool like gzip or 7z as the zeros then are easy to compress.

The two things are different and have little to do with each other.

Last edited by jefro; 03-23-2016 at 07:56 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk full. Deleted files but no space available. atrejo Linux - General 3 05-03-2010 02:00 PM
Recover disk space after deleting files aiewolf Linux - Newbie 2 04-03-2007 02:44 PM
How do I recover deleted files? Hector404 Linux - General 5 12-27-2005 01:35 AM
what files can be safely deleted to save disk space? rohan208 Linux - General 9 05-27-2004 08:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration