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

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

Niels Dettenbach (Syndicat IT&Internet) wrote:


so you guys did not understand me here.

I recommended to write to the disks or SAN (not NAS) block device file (or raw device) or partition device file (like i.e. /dev/sda ) - NOT a file onto a file system!

Well had you written that then you'd have got the answer you need. You didn't, you asked the question which we answered :

We're moving to a new SAN where we can take advantage of thin
provisioning if desired. When we migrate our disks to the new SAN,
whether windows or linux, the disks consume the whole space.

On Windows machines we can run sdelete by sysinternals on the Windows
drives, which I believe writes zeros in the deleted space. We can then
run a reclamation on the SAN disks and reclaim the deleted space.

We run different version of SLES. Are there any similar tools for linux
or a way of doing this in linux so the deleted space can be reclaimed?

You asked how to wipe the **free space** (erased data) in a filesystem - or at least that is the best interpretation I can put on it. As I read that, you migrate a drive, the SAN sees old data in free space blocks and allocates storage for it, then you wipe the free space, and finally run a process on the SAN that reclaims that space.

So we told you how to do step 3.

If you want to erase a whole block device, then the command is much the same :
  dd if=/dev/zero of=/dev/<device>
  cat /dev/zero > /dev/<device>

device might be sda which will erase an entire disk including partition tables, raid information etc. Or it might be something like sda1 which will leave the partition table intact and completely erase the filesystem within the partition.

But I'm not sure why you'd want to do this. Surely the SAN will thin provision an empty volume when you first create it, and then if you copy files over the virtual volume will expand in physical size to suit. If you do this on your disk before migrating then you'll simply erase all your files.

Either you are doing a block level volume copy (in which case you'll need to erase free space only), or you are doing a file copy in which case you'll start with an empty virtual volume which will expand in storage requirements as you copy files.
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

Xen-users mailing list



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