Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Erase Disk - Sun Solaris 9

Posted on 2010-11-11
13
Medium Priority
?
1,508 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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 …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:
Suggested Courses

670 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