[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1634
  • Last Modified:

Erase Disk - Sun Solaris 9

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
mnis2008
Asked:
mnis2008
  • 5
  • 3
  • 2
  • +2
1 Solution
 
woolmilkporcCommented:
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
 
Joseph GanSystem AdminCommented:
You could also copy random numbers to the disk:

dd if=/dev/random of=/dev/rdsk/<disk> ibs=10240k obs=10240k
0
 
mnis2008Author Commented:
Do they work if the disks have rootvg
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
mnis2008Author Commented:
I think these commands can be run if we want to erase other disks in the system.
0
 
woolmilkporcCommented:
For rootvg you must boot from CD without mounting anything, obviously ...
0
 
karthik2kCommented:
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
 
mnis2008Author Commented:
Thanks Karthik I will try the command as I dont have the disk handy
0
 
sentnerCommented:
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
 
mnis2008Author Commented:
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
 
Joseph GanSystem AdminCommented:
You need to use the raw disk:

# newfs -i 64k /dev/rdsk/c1t1d0s#
0
 
mnis2008Author Commented:
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
 
Joseph GanSystem AdminCommented:
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
 
sentnerCommented:
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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 5
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now