Summery: fmthard question

From: Blair, John (john_blair@PremierInc.com)
Date: Tue Oct 17 2000 - 11:15:28 CDT


All,

Thanks a lot for all the responses! I knew when it was pointed out to me it
would wind up being one of those silly mistakes you just smack the forehead
and say DUH!

My script works just fine now.

Bruce explains the error of my ways very well so I'll just let his response
sum this up.

Thanks also for those of you who pointed out that I could easily use the
output from a prtvtoc command and re-feed it to fmthard. I would have loved
to have done that but this was for a boot disk which was encapsulated by
VERITAS Volume Manager and had /opt on it. /opt is not handled well by
VERITAS on a boot disk and it messes up the VTOC of the disk, hence time
consuming problems fixing a meltdown. My script is creating a "Golden" boot
disk which would be an un-encapsulated boot disk for recovering from these
problems.

-----Original Message-----
From: Bruce R. Zimmer [mailto:isdfgbrz@all-phase.com]
Sent: Tuesday, October 17, 2000 9:36 AM
To: Blair, John
Subject: RE: fmthard question

The problem is that Sun requires that partitions be aligned on cylinder
boundries and you are off by one on each. This is a common mistake and the
data file should be as follows.

0 2 0x00 0 10488912
1 0 0x00 19413440 8392072
3 3 0x01 14687304 527744
6 4 0x00 10488912 4198392
7 8 0x00 15215048 4198392

The last 2 columns are starting sector and number of sectors, but the
starting sector is actually sector # 1 when you are counting the number of
sectors. so the starting sector for the next set is starting sec + number of
sec's, not starting sec + number of sec's + 1 as you have used in your data
file. Consider the following example.

  Abs Rel
  sec sec
   # #

   0 1 -------
   1 2 Part
   2 3 0
   3 4 -------
   4 1 =======
   5 2
   6 3 Part
   7 4 1
   8 5
   9 6 =======

   This is a disk with 1 sector per track and 1 track per cylinder therefore
1 sector per cylinder. I want 2 partitions the first one 4 cylinders long
and the second 6 cylinders. My table is as follows

0 2 0x00 0 4
1 0 0x00 4 6

  The error that you were seeing is caused by not wanting the sectors to
overlap so you think that you need to add 1 to the ending sector, but since
it is a length and not an address there is no need to add the additional
sector.

  I will also point out that you have not used the disk in its entirety, but
ou probably already know that.

HTH
Bruce Zimmer

-----Original Message-----
From: owner-sun-managers@sunmanagers.ececs.uc.edu
[mailto:owner-sun-managers@sunmanagers.ececs.uc.edu]On Behalf Of Blair,
John
Sent: Monday, October 16, 2000 5:37 PM
To: 'sun-managers@sunmanagers.ececs.uc.edu'
Subject: fmthard question

Fellow Admins,

I need to create a script so that I can duplicate the VTOC data from disk A
to disk B. Therefore I need to do a fmthard on the target disk. The disk is
in a D1000 and all the disks are 18GB. The target's prtvtoc before is:

# prtvtoc /dev/rdsk/c0t9d0s2
* /dev/rdsk/c0t9d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 248 sectors/track
* 19 tracks/cylinder
* 4712 sectors/cylinder
* 7508 cylinders
* 7506 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 35368272 35368271
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       2 5 01 0 35368272 35368271

My command is:

/usr/sbin/fmthard -s /tmp/_GOLDfmthrd_4010 /dev/rdsk/c0t9d0s2

where /tmp/_GOLDfmthrd_4010 consists of:

0 2 0x00 0 10488912
1 0 0x00 19413444 8392072
3 3 0x01 14687306 527744
6 4 0x00 10488913 4198392
7 8 0x00 15215051 4198392

My problem is that I get
Partition 1 not aligned on cylinder boundary: "1 0 0x00
19413444 8392072"

If I change to fmthard -d1:0:0x00:19413444:8392072 /dev/rdsk/c0t9d0s2, I get
the same errors as well as for partitions 3,6 and 7. It only will make
partition 0 if I comment out the others.

The O/S is Solaris 2.7

Thank you in advance for any assistance.

regards,

John Blair
Technical Consultant
Premier Healthcare Informatics
Premier Inc.
http://www.premierinc.com

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@sunmanagers.ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:20 CDT