[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Clean deleted space in linux diks?



> >Just to recap, I am trying to erase the free space only. I assume the
> >new SAN is doing a block level copy, which is why it consumes the whole
> >space. Once I erase the free space there is a reclamation process on the
> >SAN that will make the disk thin/sparse.
> >
> >Yes, if I take a newly created thin disk, and do a file level restore or
> >copy, the disk remains thin.
> >
> >For this example I have a disk called xvda. It has two partitions:
> >xvda1 (swap)
> >xvda2 (system)
> >
> >I would like to erase the free space on xvda2, which is running on
> >sles11 with ext3.
> >
> >Several things were mentioned. If you don't mind repeating, what do you
> >feel is the final solution?
> 
> My apologies, I mixed up who said what. Niels gave you information on 
> erasing an entire partition (ie nuke the entire filesystem as well), 
> I gave you information on  erasing free space only.
> 
> If I were doing it, I'd do one of these :
> 
> If there's a lot of free space and making huge files may be an issue
> 
> a=0 ; while [ $a -lt X ]
> do
>    dd if=/dev/zero of=null-file-$a bs=1024k count=1024
> done
> rm null-file*
> X needs to be > amount of free space in GBytes.
> 
> If there isn't a huge amount of free space and/or making one big file 
> isn't an issue.
> dd if=/dev/zero of=null-file bs=1024k ; rm null-file
> or
> cat /dev/zero > null-file ; rm null-file
> 
> Both of these will write nulls into file(s) until the filesystem is 
> full, then delete them. Depending on the space involved, they may 
> take some time, and to avoid problems if anything tries to write a 
> file while the disk is full you should stop as many processes as 
> possible.

I have had no luck with this. Apparently zero'ing out the file system is
not enough because of the data still in the super blocks. Specifically
my vendor says:

"So basically the OS needs to zero out the data and compress the super
blocks after reuse."

Can that be done? I've googled and not found much. 

Thanks,
James


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.