Re: fmthard and misallignment issues
- From: "merrittr" <merrittr@xxxxxxxxx>
- Date: 20 Apr 2006 23:23:01 -0700
Thanks Darren that makes sense.
I also came up with something a little more "Monkey with a hammer"
like:
do you think this will work?
first
SRC=c0t0d0
DEST=c0t1d0
dd if=/dev/rdsk/${SRC}s2 of=/dev/rdsk/${DEST}s2 bs=2048
this seemed to match up the partitions for me then at this point I can
fmthard and installboot then worry about ufsrestoreing the partitions
unfortunatlay this means keeping around a dd image as well as ufsdump
partition images.
do you have a better way that Is there a better way to script Solaris
format command
to do the same thing
-give me the exact same partitions on a bigger disk and loose out on
the rest of the disk.
-or using your advice scale up the partitions making use of the whole
disk still automating the partition creation
my goal is to be able to hook up this external 9gig scsi to any sunbox
run this script and image the backup ufsdump image from the failed
sparcbox withnthe only manual intervention being vfstab editing after
the imaging script finishes
Darren Dunham wrote:
merrittr <merrittr@xxxxxxxxx> wrote:
Hi
I am trying to script a solution to allow build a replacement boot disk
for 4 different machines anyway where its coming off the tracks is:
t0 t1 are different sized disks (t0=2.1gig t1=9gig)
Then you probably won't be able to have identical layouts for them.
prtvtoc /dev/rdsk/c0t0d0s2 > /tmp/vtoc #get partiotion from rootdisk
fmthard -s /tmp/vtoc /dev/rdsk/c0t1d0s2 # format the spare external
scsi to be like t0
.
.
.
here I get
Partition 0 not aligned on cylinder boundary: " 0 2 00
0 1638560 1638559 /"
so how do I fdisk t1 so the partitions look the same
Don't fdisk, that has nothing to do with the VTOC label. (and you
wouldn't use it on SPARC anyway).
You'd need to massage the data so that your slices are on cylinder
boundaries. The bits at the top give you that information...
* 512 bytes/sector
* 80 sectors/track
* 19 tracks/cylinder
* 1520 sectors/cylinder
* 3500 cylinders
* 2733 accessible cylinders
Notice that all the slices on this disk are multiples of 1520 sectors in
size (the number of sectors in a cylinder).
You'll need to read the vtoc from your target disk, get the cylinder
size, then make the slices you need muliples of that size. Presumably
you'd want to round up where necessary.
You don't need to specify slice 2, just let it remain.
fdisk -F /tmp/vtoc /dev/rdsk/c0t1d0s2
doesn't work
No. 'fdisk' is used for x86 partition tables, not for Solaris VTOC
management.
--
Darren Dunham ddunham@xxxxxxxx
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
.
- Follow-Ups:
- Re: fmthard and misallignment issues
- From: Darren Dunham
- Re: fmthard and misallignment issues
- References:
- fmthard and misallignment issues
- From: merrittr
- Re: fmthard and misallignment issues
- From: Darren Dunham
- fmthard and misallignment issues
- Prev by Date: iostat -En does not show serial number
- Next by Date: Getting GUI for Solaris!
- Previous by thread: Re: fmthard and misallignment issues
- Next by thread: Re: fmthard and misallignment issues
- Index(es):
Relevant Pages
|