tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: Problem with disklabel
@ 1999-10-11  8:16 Isidoro Sepe
  0 siblings, 0 replies; 2+ messages in thread
From: Isidoro Sepe @ 1999-10-11  8:16 UTC (permalink / raw)
  To: tru64-unix-managers

Thanks to:
Anthony Miller,
Chuck Taylor,
Alan,
Serguei Patchkovskii,
Miguel Figuer.

Hi gurus!

My problem was:

I can't  mark unused  the c partition of an HSZ70 18GB disk:

      1) the disk partition have the c-partition ADVFS
      2) I do disklabel -z
      3) then disklabel -wr mydisk hsz70; disklabel -r mydisk
      4) but the c partition is still an ADVFS one.


I still have the problem but I think that the information I received can
help other guys.

The hints:
1) (...)
Make sure that the rz device has been fully removed from LSM.  Do a
voldisk list | grep -i rz?? to make sure its completely gone.  If not, do a
voldisk rm rz??
Then try zeroing the label before writing a new one.
If this works, but you cant add the device back to lsm (voldiskadd rz??),
try using voldiskadd rz??c.  i.e.., use the c partition.  This will probably
work.  If this is unacceptable to you (i.e.., rz??c in LSM) then the only
option is to reboot and the voldiskadd will work.
This is a known problem to DEC - but there seems little will to fix it as it
only occurs very occasionally(...).

2)(...)
If you have another disk of the same type copy the disklabel from that disk
to a text file like this:
(assume that your working disk has a device name of rza18 for a moment)

disklabel -r rza18 > rza18_label  (writes the disklabel to a file called
rza18_label in your current directory)

Now you can use the editor of your choice to modify the disklabel to make it
whatever you want it to be.  Specifically, modify the type field of each
partition to unused.  Don't worry about the sizes of the partitions at this
point - your will fix that later.  After you have modified the file change
its name to something other than the name of the original disk - you would
not want to restore that label to the original disk - that would be bad at
this point (assume that you rename the file to test_label for now).

Next use the disklabel command to write the newly modified disklabel to the
new disk (assume rzb24 for now) like this:

/sbin/disklabel -R [-r] [-t ufs | AdvFS] disk protofile [disktype |
primary-boot secondary-boot]

disklabel -R -r rzb24 testlabel rzxx

3) (...)
Was the disk ever under the control of LSM?  LSM has a long memory even
when it doesn't look like it knows about a disk.  It keeps
around disk records which keep the disk open, making it
impossible to change the label.  I think the "voldisk rm"
command will clean these up without having to resort to a
reboot.

4) (...)
Make sure that "mydisk" isn't the C partition of the disk.
Either disklabel the program, or the kernel support for it
can't change the information for an open partition.  If
you want to change C you have use some other partition
that starts at the beginning of the disk (usually A).

5)(...)
Well, you can always do 'disklabel -e mydisk' and change the type
to whatever you want manually ...

6) (...)
- recreate a domain on the device, and check if there's any
  remaining fileset (use #showfsets)
- hand editing of the label
- newfs of the device
- recreate the device files ( via rm and MAKEDEV )
- put a picture of Maradona on top of the disk and try again ;-)




Thanks.
Isidoro.
_____________________________________________
Isidoro Sepe
Telesoft Spa
Via Nuova Poggioreale,snc
80143 Napoli

phone +390817564486
fax      +390817564252
e-mail isidoro.sepe@tlsoft.it
______________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread
* SUMMARY: Problem with disklabel
@ 2002-08-29  8:33 lawries
  0 siblings, 0 replies; 2+ messages in thread
From: lawries @ 2002-08-29  8:33 UTC (permalink / raw)


Many thanks to all who replied (to may to list) with advise and suggestions. The were many interesting replies regarding the possible pit falls of disklabel and I have learnt a lot.

Colin Bull hit the nail on the head by asking if there were sym links addressing the device special file. There are. They are used by informix for access to raw disk partitions.

It transpires that the DBA had not closed all Informix instances which address the new disk and hence it was locked.

Many thanks Colin.

Lawrie.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-29  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-10-11  8:16 Summary: Problem with disklabel Isidoro Sepe
  -- strict thread matches above, loose matches on Subject: below --
2002-08-29  8:33 SUMMARY: " lawries

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