tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: st34520 or disklabel
@ 1998-12-08 13:06 Tom Linden
  0 siblings, 0 replies; only message in thread
From: Tom Linden @ 1998-12-08 13:06 UTC (permalink / raw)
  To: tru64-unix-managers


Below is a summary of answers received.  This was largely ignorance
on my part as to how disklabel works.

 
From: anthony.miller@vf.vodafone.co.uk

The easiest way is to do something like:

disklabel -z rznn
disklabel -wr rznn rznn
disklabel -r rznn

where rznn is the device special file.  The '-z' one will erase any
existing label.  Dont be surprised if this fails with an error message. 
Just ignore it.

The 'wr' line will write a 'default' label to the device.  The final
rznn tells disklabel to basically examine the device to see how many
blocks are available and to use this in the written label.

The 'r' will verify the label written.  You might want to change
partition sizes after this.  Particularly on raid sets etc.  If you do,
do a:

disklabel -r rznn > /tmp/label.rznn

Edit the file label.rznn accordingly.  The 'c' partition will have the
correct number of blocks available on the device by the way.  Then write
it back by doing a:

disklabel -R rznn /tmp/label.rznn

Hope this helps.


Tony

From Alan.Davis@digital.com Sun Dec  6 07:15:57 1998
Tom,

  It would be better to disklabel the new drive, putting on the
appropriate boot blocks using the -t switch and then using
the command found in the example on the vrestore man page
to clone each partition or domain.

The srm console command to change the default boot device
is : set bootdef_dev dkXn[nn]

followed by an init command to write the new value to the EEPROM.

Alan Davis
Compaq Services

From Alan.Davis@digital.com Sun Dec  6 07:15:58 1998

Tom,

 You may use the rzXX as the device type. This forces disklabel
to use the GETDEVGEOM ioctl to query the disk/controller for
it's default label. This label may then be modified using 
disklabel -e.
For example, to put a default label and advfs boot blocks on
rz5c (dka500 at the console) :

	disklabel -t advfs -wr /dev/rrz5c rzXX
	disklabel -e /dev/rrz5c

Alan Davis
Compaq Services

From alan@nabeth.cxo.dec.com Sun Dec  6 07:16:10 1998

Certain parts of the boot process (the contents of /etc/fstab)
know what the device name of the system disk is.  If the new
drive doesn't replace the old one, it will have a new device
name and those parts will be wrong.  The other device name
link of note is /sbin/swapdefault.

If the new disk is larger you'll either be wasting space, or 
will have an unused disk partition.  Since the old disk's 
partition table won't reflect the new disk's capacity you'll 
have to adjust the partition table as necessary.

Any poor file system organization will be carried over with
a dd(1), where a dump/restore or vdump/vrestore can correct
some of that.

If a significant amount of some partition is free space, you'll
be copying more data than necessary.

If you use dd(1), the contents of /mdec are just disk blocks
to be copied.  When the disk is labeled, the appropriate boot
block is written to the space for it in the label.  /mdec is
merely the source of that data.

To change the name of the boot device, change the console
variable bootdef_dev.  See Also; the first paragraph.



From Joel_Gallun/US/DCI@discovery.com Mon Dec  7 06:39:01 1998

you don't need a disktab for SCSI drives. Just 'disklabel -rw rzN foo'
Disklabel queries the device for it's size.

Joel

> From: Thomas Leitner <tom@finwds01.tu-graz.ac.at>
> To: Tom Linden <tom@kednos.com>
> Subject: Re: Formatting disk on DU
> 
> 
> Tom

> # disklabel -rw rz6 rz6
> # newfs /dev/rz6c
> # mkdir /home1
> # mount /dev/rz6c /home1
> 
> where the disk SCSI ID is 6.
> 
> If you really *need* to format the SCSI disk, you could do it with "scu".
> 
> # scu -f /dev/rrz6c
> scu> format defects all
> 
> Tom

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-12-08 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-08 13:06 SUMMARY: st34520 or disklabel Tom Linden

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox