Freing up some space in virtual server so called Proxmox.

ozgurerdogan

Verified User
Joined
Apr 20, 2008
Messages
343
I did not (yet) get a reply from proxmox forum so I thought maybe someone knows about it.
I tried these:
Code:
dd if=/dev/zero of=zero.small.file bs=1024 count=102400
dd if=/dev/zero of=zero.file bs=1024
rm zero.small.file
sync ; sleep 60 ; sync
rm zero.file

But I got:
[root@antispam ~]# dd if=/dev/zero of=zero.small.file bs=1024 count=102400
102400+0 records in
102400+0 records out
104857600 bytes (105 MB) copied, 6.50482 seconds, 16.1 MB/s
[root@antispam ~]# dd if=/dev/zero of=zero.file bs=1024
dd: writing `zero.file': No space left on device
28806481+0 records in
28806480+0 records out
29497835520 bytes (29 GB) copied, 1268.94 seconds, 23.2 MB/s
[root@antispam ~]# rm zero.small.file
rm: remove regular file `zero.small.file'? yes

Other forum has same discussion:
http://forum.proxmox.com/threads/8976-Too-large-size-of-a-backup-copy-Why?p=50856#post50856
 
With those commands you do not free any space, but create new files zero.small.file and zero.file of specified size.
 
Again, with that you won't free space on your disk, with that you can only wipe already deleted files from disk.
 
Again, with that you won't free space on your disk, with that you can only wipe already deleted files from disk.

That's what I am trying to do. Wipe deleted files. But getting that "dd: writing `zero.file': No space left on device" error ?
 
Did you delete files prior to running dd? Anyway I don't see what troubles you? As soon as you fill all free space, that is for sure you'll get such an error message.
 
Is that normal you mean? After I got that no space left message, I should delete those zero.file. And wiping disk is done?

This is a hosting box with virtual disk and for two years I did not wipe disk but deleted many hosting accounts. So because its a virtual disk, backups size is very large. After wiping windows boxes, backup sizes decsreased dramatically with Sdelete.exe. So I am trying to do same with linux boxes... I hope this time I could tell what I try to do :) I do not know if that no space left message is error or normal. Trying to figure out.
 
I know nothing about your server configuration, and know nothing what exactly backups you are referring to either. So I won't say will it help you to achieve the desired or not.

Yes, you should delete the created with dd files.
 
I know nothing about your server configuration, and know nothing what exactly backups you are referring to either. So I won't say will it help you to achieve the desired or not.

Yes, you should delete the created with dd files.

I think you do not need to know about my server config. All I want is to wipe deleted files from disk. Anyway thank you. Maybe some one else can comment something.
 
OK, generally these forums are for Diretadmin related issues only. So when you mentioned backups I did not think that you mean a backup of a VM. So if you're talking about backups of VM running on a virtual disk, then it might be the solution. And I guess it would be also actual for XEN/KVM virtual machines also running on virtual disks.
 
@ozgurerdogan:
You got me curious, and I have a friend who tells me I should look at proxmox, so I decided to look into this about. Note that at some point above you asked if when you got the error message that meant all the free space on the drive is zeroed out.

The answer is yes, that's correct. The dd program will stop with that error when it runs out of free space on the drive, and at that point, all the free space should be overwritten with zeros.

Jeff
 
@ozgurerdogan:
You got me curious, and I have a friend who tells me I should look at proxmox, so I decided to look into this about. Note that at some point above you asked if when you got the error message that meant all the free space on the drive is zeroed out.

The answer is yes, that's correct. The dd program will stop with that error when it runs out of free space on the drive, and at that point, all the free space should be overwritten with zeros.

Jeff



Ahh thanks god I finally got the answer. But one more thing, are there really considerable difference between:

Code:
cat /dev/zero > zero.file
rm zero.file

and

Code:
dd if=/dev/zero of=zero.small.file bs=1024 count=102400
cat /dev/zero > zero.file
rm zero.small.file
rm zero.file

and

Code:
dd if=/dev/zero of=zero.small.file bs=1024 count=102400
shred -z zero.small.file
cat /dev/zero > zero.file
rm zero.small.file
shred -z zero.file
rm zero.file
First one is simplest way I guess. I go with it.

I have been using proxmox for 2 years with many linux and windows guests. KVM version. They just released v2 which is much better. And I know many people migrated from Vmware! You should definetly spend some time and decide... Also stuff is so friendly like directadmins'.
 
There is no such thing as removing deleted files. Once you delete them they are gone forever. Use the du and df commands to find where your space is being used to remove un-needed files.
 
@ozgurerdogan:

I don't know what cat /dev/zero does; on my local system it seems to run but not provide any output, so I don't know what anything using it will do.

The shred command overwrites existing files with random data; probably not what you want to do since it appears from the notes on the proxmox site that their backup excludes specifically sections of the drive with all zeros, which is what the dd command fills space with if you're using /dev/zero as the input file.

@scsi:
It appears that proxmox uses zero byte fill as the way it decides to not backup, so it's still going to back up all space when doing a drive backup, unless it's filled with zeros.

Jeff
 
@ozgurerdogan:

I don't know what cat /dev/zero does; on my local system it seems to run but not provide any output, so I don't know what anything using it will do.

The shred command overwrites existing files with random data; probably not what you want to do since it appears from the notes on the proxmox site that their backup excludes specifically sections of the drive with all zeros, which is what the dd command fills space with if you're using /dev/zero as the input file.

@scsi:
It appears that proxmox uses zero byte fill as the way it decides to not backup, so it's still going to back up all space when doing a drive backup, unless it's filled with zeros.

Jeff


Thank you very much. You helped lot...again...
 
Back
Top