Thin Provisionning problems.. need to zero LVM disks before deleting a VM

whinpo

Renowned Member
Jan 11, 2010
140
0
81
Hi everybody ;)

I got a performance and disk space problem on my SAN (Datacore San Melody) due to the fact I've created/deleted too many VM's on the iSCSI LVM.
Datacore suggests us to zero disks before doing lvremove to tell the SAN the space is really available and to allow San Melody to reclaim the unused space.

I want to modify Storage.pm to add a the dd command before the lvremove, but the problem is that is lasts from seconds to minuts... and the GUI session waits for the end of the dd before allowing me to do anything else..

how to tell Proxmox VE to do it in batch like the migration does (showing status in an other frame) ?

You'll find below the code I've added (the first 4 lines)
Code:
        my ($sizepo, $formatpo) = file_size_info("/dev/$vg/$volname");
        my $sizepoMo = int($sizepo/1024);
        my $cmd = ['dd', 'bs=1M', "count=$sizepoMo", 'if=/dev/zero', "of=/dev/$vg/$volname"];
        run_command ($cmd);

            my $cmd = ['/sbin/lvremove', '-f', "$vg/$volname"];
            run_command ($cmd);


thank you for you help ;)
 
Ok so i'll manage to do it manually before removing the VM and I'll join the list;)

Thanks :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!