The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Version labeling is out of control iBot UNIX and Linux RSS News 0 06-07-2008 09:40 AM
Automatic monitor disk-space anuradha Filesystems, Disks and Memory 3 01-15-2008 03:37 PM
FDA says no new labeling for nanotech products - Washington Post iBot UNIX and Linux RSS News 0 07-25-2007 04:00 PM
Automatic monitor disk-space nfbeerse Shell Programming and Scripting 3 03-01-2004 04:16 AM
automatic su omran Shell Programming and Scripting 1 08-19-2002 05:03 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-25-2006
kwachtler kwachtler is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 15
Automatic disk labeling

First post ...
Here is a script for automatic labeling of previously unlabeled disks.
Other methods exist (format -f cmd_file), but I like this because it's all in one place.
Code:
#!/bin/ksh
#----------------------
# format_label
# Automatic labeling of previously unlabeled disks
# 2006.08.31 ken.wachtler
#----------------------
 
# Enter a list of disks, as format's banner would report them
Disks="
c4t50060482CCAB2987d27
c4t50060482CCAB2987d28
c4t50060482CCAB2987d29
c4t50060482CCAB2987d30
c4t50060482CCAB2987d31
c4t50060482CCAB2987d32
c4t50060482CCAB2987d33
c4t50060482CCAB2987d34
c4t50060482CCAB2987d35
c4t50060482CCAB2987d36
c4t50060482CCAB2987d37
c4t50060482CCAB2987d38
c4t50060482CCAB2987d39
c4t50060482CCAB2987d40
c4t50060482CCAB2987d41
c4t50060482CCAB2987d42
c4t50060482CCAB2987d43
c4t50060482CCAB2987d44
c4t50060482CCAB2987d45
c4t50060482CCAB2987d46
c4t50060482CCAB2987d47
c4t50060482CCAB2987d48
c4t50060482CCAB2987d49
c4t50060482CCAB2987d50
c4t50060482CCAB2987d51
c4t50060482CCAB2987d52
c4t50060482CCAB2987d53
c4t50060482CCAB2987d54
c4t50060482CCAB2987d55
c4t50060482CCAB2987d56
c4t50060482CCAB2987d57
c4t50060482CCAB2987d58
c4t50060482CCAB2987d59
c4t50060482CCAB2987d60
c4t50060482CCAB2987d61
c4t50060482CCAB2987d62
"
 
for d in $Disks ; do
 
  # write label
  printf "label\nyes\nquit\n" | format -d $d
 
  # check label
  printf "\n\n${d}\n\n"
  prtvtoc /dev/dsk/${d}s0 | egrep '^P  |^  '
  echo "<cr> to cont: "
  read a
 
done

Last edited by blowtorch; 09-25-2006 at 10:19 PM.. Reason: to add code tags
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0