Sponsored Content
Full Discussion: Automatic disk labeling
Operating Systems Solaris Automatic disk labeling Post 302090410 by kwachtler on Monday 25th of September 2006 12:17:12 PM
Old 09-25-2006
Automatic disk labeling

First post Smilie ...
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 11:19 PM.. Reason: to add code tags
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automatic monitor disk-space

Hello, I am trying to find a shell script to monitor diskspace. When the script encounteres a disk which above the treashold, I want an email notification. My system runs on a Sun Solaris. Is there anybode around who can help me with such a script? Norbert (3 Replies)
Discussion started by: nfbeerse
3 Replies

2. Filesystems, Disks and Memory

Automatic monitor disk-space

Hello, I am trying to find a shell script to monitor diskspace of all the directories in the server. When the script encounteres a disk which above the treashold, I want an email notification. My system runs on AIX. Is there anybody around who can help me with such a script? ... (3 Replies)
Discussion started by: anuradha
3 Replies

3. UNIX for Dummies Questions & Answers

Numerical Labeling using sed

Hi, I have been working on this problem, but could only get so far. I have a file that looks like this (cat,chimp,(((dog,cat,cow),orangutan),((horse,((cat,dog),(cow,pig))),cat,mouse,rat))); I would like after each instance of the word 'cat' to have an incrementing numerical label. I... (5 Replies)
Discussion started by: cavanac2
5 Replies

4. Solaris

Labeling VTOC

How to relabeling the disk VTOC if i relabel the disk the previous data is available or not (5 Replies)
Discussion started by: chandu.bezawada
5 Replies

5. Shell Programming and Scripting

PHP Labeling/Punctuation Syntax Question

Greetings! My first PHP question; and, no doubt, a "no-brainer" for the initiated :) The question centers around the proper syntax for input field labeling. The snippet which puzzles me (and the candidate which I wish to modify) goes like this:<?php _e('Hello World'); ?>:<br />What I'd like... (0 Replies)
Discussion started by: LinQ
0 Replies

6. Solaris

EFI disk labeling / understand the parition table / sectors not continue

Hi all, I have a EFI disk and it is use in zfs pool. partition> p Volume: rpool Current partition table (original): Total disk sectors available: 1172107117 + 16384 (reserved sectors) Part Tag Flag First Sector Size Last Sector 0 usr wm ... (8 Replies)
Discussion started by: javanoob
8 Replies
install-solaris(1M)													       install-solaris(1M)

NAME
install-solaris - install the Solaris operating system SYNOPSIS
install-solaris install-solaris invokes the Solaris Install program. Depending on graphical capability and available memory at the time of invocation, install-solaris invokes either a text-based installer or a graphical installer. The following minimum requirements for physical memory dictate which features are available during installation: For SPARC machines: 128 MB Minimum physical memory for all installation types 128 MB Minimum physical memory required for windowing system 384 MB Minimum physical memory required for graphical-based installation For x86 machines: 256 MB Minimum physical memory for all installation types 256 MB Minimum physical memory required for windowing system 512 MB Minimum physical memory required for graphical-based installation In some cases, even if the minimum physical memory is present, available virtual memory after system startup can limit the number of fea- tures available. install-solaris exists only on the Solaris installation media (CD or DVD) and should be invoked only from there. Refer to the for more details. install-solaris allows installation of the operating system onto any standalone system. install-solaris loads the software available on the installation media. Refer to the for disk space requirements. Refer to the for more information on the various menus and selections. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcdrom (Solaris instal- | | |lation media) | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ pkginfo(1), install(1M), pkgadd(1M), attributes(5) It is advisable to exit install-solaris by means of the exit options in the install-solaris menus. 23 Sep 2005 install-solaris(1M)
All times are GMT -4. The time now is 05:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy