Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Erase Disk - Sun Solaris 9

Posted on 2010-11-11
13
Medium Priority
?
1,547 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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…
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…
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.
Suggested Courses

926 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