Solved

Erase Disk - Sun Solaris 9

Posted on 2010-11-11
13
1,345 Views
Last Modified: 2013-12-27
I have a sun server which has SunOS 9. The server has 2 mirrored disks, How do I wipe off the disks. As we are planning to sell off the server and we dont want any data on the disks

-Steve
0
Comment
Question by:mnis2008
  • 5
  • 3
  • 2
  • +2
13 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
How about this -

dd if=/dev/zero bs=1024k of=<raw disk>

If you have gcc installed you could compile and run "scrub" - http://code.google.com/p/diskscrub/

... and this is how SUN recommends doing it - http://www.sun.com/blueprints/0600/scrub.pdf

wmp


0
 
LVL 16

Expert Comment

by:Joseph Gan
Comment Utility
You could also copy random numbers to the disk:

dd if=/dev/random of=/dev/rdsk/<disk> ibs=10240k obs=10240k
0
 

Author Comment

by:mnis2008
Comment Utility
Do they work if the disks have rootvg
0
 

Author Comment

by:mnis2008
Comment Utility
I think these commands can be run if we want to erase other disks in the system.
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
For rootvg you must boot from CD without mounting anything, obviously ...
0
 

Expert Comment

by:karthik2k
Comment Utility
You can also use the #newfs /dev/dsk/c#t#d#s# -i 64k command to format the disk.  It will work for all the partitons including root disk mirrors.  You can also force it to override the defaults.  

also, if you format it with new block size for ex. 64k instead of 32k in the previous one.  All the data will be completely lost and cannot be recovered.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:mnis2008
Comment Utility
Thanks Karthik I will try the command as I dont have the disk handy
0
 
LVL 14

Expert Comment

by:sentner
Comment Utility
Using newfs will only destroy the inode pointers, not actually wipe all the bits.  The easiest way to do that would be to boot from a secondary disk or  (network, cd, etc), and then write to the whole disk.  One way is to run format, and use a destructive disk write test in the analyze menu.  Another way is to use one of the "dd" commands that others have put in this thread.
0
 

Author Comment

by:mnis2008
Comment Utility
There is an error in syntax I guess

 # newfs /dev/dsk/c1t1d0 -i 64k
usage: newfs [ -v ] [ mkfs-options ] raw-special-device
where mkfs-options are:
        -N do not create file system, just print out parameters
        -T configure file system for eventual growth to over a terabyte
        -s file system size (sectors)
        -b block size
        -f frag size
        -t tracks/cylinder
        -c cylinders/group
        -m minimum free space %
        -o optimization preference (`space' or `time')
        -r revolutions/minute
        -i number of bytes per inode
        -a number of alternates per cylinder
        -C maxcontig
        -d rotational delay
        -n number of rotational positions
        -S print a textual version of the calculated superblock to stdout
        -B dump a binary version of the calculated superblock to stdout
0
 
LVL 16

Expert Comment

by:Joseph Gan
Comment Utility
You need to use the raw disk:

# newfs -i 64k /dev/rdsk/c1t1d0s#
0
 

Author Comment

by:mnis2008
Comment Utility
This answers my question but If I have a jumpstart server is there a way to wipe off a disk on a system, If so can you please let me know the procedure or is there is any web link on how to do this..??
0
 
LVL 16

Expert Comment

by:Joseph Gan
Comment Utility
Jumpstart server is for intallation OS to other server on the net, don't think can be used for wipe off a disk. You could remove the disks you want to erase form one server, and add it onto anther server to run "newfs" or "dd" commands etc.
0
 
LVL 14

Accepted Solution

by:
sentner earned 500 total points
Comment Utility
If you have a jumpstart server, you can use that to do a network boot on the host you want to erase, and then use one of the methods above to do the actual erasure.

From ok> prompt on the host you want to wipe:  boot net -s

This will give you a shell prompt, where you can run format and wipe the system disks using destructive write tests (analyze menu), or use dd to copy over the raw volume.  Don't use newfs, as that does not actually erase the data on the drive, merely the inode pointers.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now