[lug] Why is it SO easy to destroy cloud environments?

David L. Willson DLWillson at TheGeek.NU
Tue Oct 9 11:45:40 MDT 2012


rm -rf is terribly slow, leaves the server running, and leaves potentially undesired partitions.

# sloppy un-tested, incomplete meta-code

for each server in servers_to_clear(); do
ssh server
    for each filesystem in local_filesystems(); do
        dd if=/dev/zero of=$filesystem bs=4M count=256 &
    done
    for each disk in local_disks(); do
        dd if=/dev/zero of=$disk bs=4M count=256 &
    done
    # need another imaginary function to remove this servers entry from DNS
    while dd_is_running(); do sleep 30; done
    poweroff
done

There, that should do it.

--
David L. Willson
Trainer, Engineer, Enthusiast
RHCE Network+ A+ Linux+ LPIC-1 Ubuntu
Mobile 720-333-LANS(5267)

This is a good time for a r3VOLution.

----- Original Message -----
> > It's like a modern-day 'rm -rf /'   ;)
> 
> It's worse:
> 
> for host in *.<domain>; do
>     ssh root@$host rm -rf /
> done
> 
> Rob
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667
> channel=#hackingsociety
> 



More information about the LUG mailing list