This discussion is archived
5 Replies Latest reply: Sep 24, 2012 2:28 PM by 964045 RSS

How to purge solaris harddrive parallely

963357 Newbie
Currently Being Moderated
Hello,

Is there a way i can purge the T2000 harddrive paralley non interactive. currently the purge takes around 2 days for single hard drive we have around 50 harddrive is there a way i can run the format/purge in parallel

Thanks
Sagar
  • 1. Re: How to purge solaris harddrive parallely
    Nik Expert
    Currently Being Moderated
    Hi.
    You can open 50 terminal (or sessions) to this server and start required number of format in interactive mode.

    You can also use
    format  -f command-file disk_device >log_file 2>&1 &

    Where command-file - content list required command of for purge drive.

    You also can use dd if=/dev/zero of=/dev/rdsk/<disk>s2 bs=1024k for purge contents of the disk.

    Regards.
  • 2. Re: How to purge solaris harddrive parallely
    963357 Newbie
    Currently Being Moderated
    I have connected via serial terminal on T2000. How can i open multiple sessions ? I tried to open another session and it said com1 port was already in use and was not able to open up another session.

    Also i tried yesterday running the format command in background

    nohup format -f command-file disk_device1 >> logfile1 & ,
    nohup format -f command-file disk_device2 >> logfile2 & ,

    But what i saw was the both format command process stopped when i started for 2nd one. and when i do "ps -eaf | grep format" i saw no process running
    it works for one process in background fine


    Thanks
    Sagar
  • 3. Re: How to purge solaris harddrive parallely
    Nik Expert
    Currently Being Moderated
    Hi.
    You first post not say that you use serial connection.... Is it possible use network ?
    You can install and use screen for have many sessions over serial connection.

    What reason for stop format show at log file ?

    Please show what you command realy you use at
    "
    nohup format -f command-file disk_device1 >> logfile1 & ,
    nohup format -f command-file disk_device2 >> logfile2 & ,
    "
    and content of command-file.

    What about dd for purge data ?
  • 4. Re: How to purge solaris harddrive parallely
    963357 Newbie
    Currently Being Moderated
    I think the below command worked.

    in the command file i have
    analyze
    purge



    nohup format -f /tmp/command-file disk_device1 >> logfile1 & ,
    nohup format -f /tmp/command-file disk_device2 >> logfile2 & ,

    I tailed both the log files and see they are running. Initially i was looking at the byte size of the log files and they did not increment for a long time but than i realize i had to wait longer

    Thanks
    Sagar
  • 5. Re: How to purge solaris harddrive parallely
    964045 Newbie
    Currently Being Moderated
    I figured it out by looking at screen tutorial. So this is what we did

    create a server#1 as NFS at the nfs shared location copy the screen binary and the library libcrypt_d.so

    connect server#2 with network
    Power on Server#2
    sc>break
    sc>console
    @{ok} boot cdrom -s ( boot from solaris sparc cdrom)
    configure the network ipadress
    mount the Nfs shared location from Server#1 [ NfS share i mounted on /mnt ]
    mount <nfsserver ip>:<source> <target>

    LD_LIBRARY_PATH=/mnt/screen/
    export LD_LIBRARY_PATH
    TERM='vt100'
    export TERM
    1.run the screen binary ( /mnt/screen/screen4-3.0 -R hd0) ---this will open terminal#1 with name hd0
    2.format
    3.select drive
    4.analyze
    5.purge
    6.cntrl-a d ---to detach

    follow steps 1-6 for purging another harddrive in parallel.. we can open as many terminal as possible


    to list the terminals
    /mnt/screen/screen4-3.0 -ls
    /mnt/screen/screen4-3.0 -R <terminal name> ---to attach so that you can see what running on that terminal



    so basically it is opening a new session with screen -R <session name>---run the format-analyze-purge---detach
    than open another session screen -R <session name>---run the format-analyze-purge---detach

    Edited by: 961042 on Sep 24, 2012 2:15 PM

    Edited by: 961042 on Sep 24, 2012 2:24 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points