Solved

Erase Disk - Sun Solaris 9

Posted on 2010-11-11
13
1,406 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
ID: 34115135
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
ID: 34115201
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
ID: 34115297
Do they work if the disks have rootvg
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

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

Expert Comment

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

Expert Comment

by:karthik2k
ID: 34120046
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
 

Author Comment

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

Expert Comment

by:sentner
ID: 34123597
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
ID: 34123639
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
ID: 34128848
You need to use the raw disk:

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

Author Comment

by:mnis2008
ID: 34128979
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
ID: 34128997
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
ID: 34129116
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

840 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