LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-12-2007, 01:20 AM   #1
sunram
LQ Newbie
 
Registered: Oct 2007
Location: India
Posts: 23

Rep: Reputation: 15
Exclamation How to delete HDD data?


hi friends,


we are taking six server in rental (ultra,e250,etc).now return the all server.But important data stored in the HDD.we delete the all data. How to delete the data or how to delete the HDD label.


regards
sunram
 
Old 10-12-2007, 01:38 AM   #2
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Code:
# while true; do dd < /dev/random > /dev/dsk/c0d0p0; done
 
Old 10-12-2007, 02:19 AM   #3
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
For best results do this from a bootable CD, otherwise the the script will get confused when the bash and dd commands get wiped.
 
Old 10-12-2007, 03:03 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by vermaden View Post
Code:
# while true; do dd < /dev/random > /dev/dsk/c0d0p0; done
1: This won't work on SPARC H/W, that should be c0d0t0s2 there.
2: This will crash the system before all the disk has been overwritten, which may be sufficient or not, as the question is self-contradictory (we delete all the data. How to delete the data ?).
 
Old 10-12-2007, 03:21 AM   #5
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Quote:
Originally Posted by jlliagre View Post
1: This won't work on SPARC H/W, that should be c0d0t0s2 there.
2: This will crash the system before all the disk has been overwritten, which may be sufficient or not, as the question is self-contradictory (we delete all the data. How to delete the data ?).
I generally do not use Solaris too much, so I will propably mess strict Solaris things like devices, I just wanted to show idea of how to do that.

Of course from some LiveCD, or by ataching the drive to other box ane wipe it there.
 
Old 10-12-2007, 07:08 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
No problem, Solaris (SVR4 actually) device naming scheme is often tricky to understand for Linux admins.

Beware that when used from a live distro, your command will not only wipe the disk but may eventually destroy it after a (long) while, as it never ends.

Also, to have a better performance with this kind of commands better to use:
- the faster and less resource consuming /dev/urandom instead of /dev/random
- dd blocking factor to improve writing throughput

eg.
Code:
dd if=/dev/urandom of=/dev/dsk/xxxx bs=1024k
 
Old 10-13-2007, 09:43 AM   #7
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
It's actually possible (but difficult) to recover data from files that have only been overwritten once. There are DOD standards for data obliteration and typically the data should be overwritten 7 times, with all 0's, with all 1's, with a pattern of 0101010, etc.

I observed once a situation where a couple of aspiring programmers were demonstrating their software for a software company. They were convinced to demo it on one of the companies computers. When done, they deleted and overwrote their stuff. After they left, the companies developers descended on the computer and successfully recovered the code. The aspiring programmers never got a call back to buy their work.

Lots of people actually destroy or seriously degauss drives before disposing of computers. Obviously, you can't do that, because you are dealing with rental machines that you are returning.

There was a lengthy discussion on the Sunmanagers list not too long ago that is summarized here:

http://www.sunmanagers.org/pipermail...er/005686.html

There was a more recent discussion of the same topic, but I was having trouble finding it just now. Anyway, there is also now a sourceforge project for doing this:

http://dban.sourceforge.net/
 
Old 10-13-2007, 10:32 AM   #8
vermaden
Member
 
Registered: Jan 2006
Location: pl_PL.lodz
Distribution: FreeBSD
Posts: 406

Rep: Reputation: 89
Quote:
Originally Posted by choogendyk View Post
It's actually possible (but difficult) to recover data from files that have only been overwritten once. There are DOD standards for data obliteration and typically the data should be overwritten 7 times, with all 0's, with all 1's, with a pattern of 0101010, etc.
Thaat is why I added infinite loop for that, while true ...

Code:
# while true; do dd < /dev/random > /dev/dsk/c0d0p0 bs=8m; done
25 times should be ok imho.

There is also Linux utility shred (gshred on FreeBSD) which does that, shreds all data from disk by /dev/zero or /dev/random, example:

Code:
# gshred --verbose --zero /dev/c0d0p0
 
Old 10-13-2007, 10:35 AM   #9
iAlta
Member
 
Registered: Oct 2005
Distribution: Ubuntu 7.10, OpenSUSE 10.3, Linux Mint, Arch
Posts: 92

Rep: Reputation: 15
Derik's Boot and Nuke

deleted by user

Last edited by iAlta; 10-13-2007 at 10:37 AM. Reason: del
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it safe for me to delete the MBR on my HDD? Vegetaman Linux - General 11 10-13-2007 08:24 PM
How to delete HDD data? sunram Solaris / OpenSolaris 3 10-12-2007 02:57 AM
dump is delete my data Linux For Ever Linux - General 1 09-21-2006 06:13 AM
Advice needed on transferring data from HDD to HDD denimglen Linux - Newbie 3 03-04-2006 07:33 PM
Cannot Delete incomplete partitions or Start HDD truhuska Linux - Software 4 04-30-2004 11:43 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration