Operating System - OpenVMS
1753253 Members
4089 Online
108792 Solutions
New Discussion юеВ

Re: Changing Cluster size on the OS disk

 
SOLVED
Go to solution
Niall76
Frequent Advisor

Changing Cluster size on the OS disk

Hi,

I need to change the cluster size on the OS disk. (It's a long story, but when coping files from one disk to another, the file size increases and this affects programs with have that uses the exact size of the file to determine the location of certain data.)

If I do an image back and restore the image on a new Disk, the old cluster size is restored.

If I INIT another disk to my new cluster size and restore a backup/lo/ign=interlock sys$sysdevice:[000000...] onto this new disk and reboot the machine, the disk is not recognized as bootable device.

I'm out of ideas, can anyone help?

Many thanks,

Niall
10 REPLIES 10
Jan van den Ende
Honored Contributor
Solution

Re: Changing Cluster size on the OS disk

Niall,

You were nearly there!

>>>

If I do an image back and restore the image on a new Disk, the old cluster size is restored.
<<<

all you need to do, is INIT your new target disk with the wished-for qualifiers, and then
do a
$ BACKUP/IMAGE /NOinit
to the new disk.
It should be boottable, and there you are.

Success.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Bojan Nemec
Honored Contributor

Re: Changing Cluster size on the OS disk

Niall,

First initialize the system disk with the suitable cluster size. After that, restore the image backup with a /NOINITIALIZE qualifier:

$ BACKUP /IMAGE /NOINITIALIZE src dest

Bojam
Robert Gezelter
Honored Contributor

Re: Changing Cluster size on the OS disk

Niall,

I concur with Jan. /IMAGE is needed (there are aliased directories that must be restored as they are). INITIALIZE the disk as desired first, then do BACKUP/NOINITIALIZE/IMAGE to restore the files.

If it is desirable to experiment on smaller volumes, LD makes it easy to run fast experiments on small virtual volumes.

- Bob Gezelter, http://www.rlgsc.com
abrsvc
Respected Contributor

Re: Changing Cluster size on the OS disk

I don't know what you are using to determine the file sizes, but it sounds like you are using the "allocation" size of the file rather than its actual size based on EOF. Perhaps a check of how the sizing is done will prevent this need for smaller cluster sizes. Realize too that a smaller cluster size will increase the size of the bitmap as well as the potential for more file fragmentation.

Dan
Andy Bustamante
Honored Contributor

Re: Changing Cluster size on the OS disk

As a rule, most folks here will recommend not creating data files on your system disk. As Dan points out, you may be chasing the wrong issue. Unless you're attempting to run routines against system logs, can you shift your data files to other disk.

If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
Hein van den Heuvel
Honored Contributor

Re: Changing Cluster size on the OS disk

Niall,

Do you have just the 1 disk to play with?

How about just creating an LD container on the system disk, and init that with the desired cluster size.

LD CREATE
LD CONNECT
INIT /CLUS/NOHIGH/...
MOUN ...


I guess I don't need to tell you what I think about an application which reallies on the allocated file size as being meaningful to locate data :-(.

>> I'm out of ideas, can anyone help?

Is the EOF being changed on restore? If so you may be able to create a script to reset those.

Hein


Shriniketan Bhagwat
Trusted Contributor

Re: Changing Cluster size on the OS disk

Hi,

As the others said above, you need to initialize the disk with required cluster factor and then use the BACKUP/IMAGE/NOINIT qualifier to retain the disks new cluster factor. Below are the commands.

$ INITIALIZE /LABEL /CLUSTER_SIZE=< number-of-blocks >
$ MOUNT/FOR
$ BACKUP/IMAGE/NOINIT /SAVE

Is it the Alpha or IA64 machine?

Regards,
Ketan
Jon Pinkley
Honored Contributor

Re: Changing Cluster size on the OS disk

Niall,

When changing cluster size, in addition to /noinit I also recommend using /truncate.

This tells backup to use the "used" size when allocating space for the new file, which will be rounded up to the next cluster. The default behavior is to use the allocated size of the source file to determine the initial output size, which is then rounded up to the next cluster.

If you don't do this, you will get the non-intuitive result that the output disk will have less available space than the original disk.

In other words if you have a disk with a current cluster size of 17, and you want to reinitialize it with a cluster size of 8, if you do not use /truncate, all the (non-zero length) files will be created with an allocation of at least 24 (the next multiple of 8 .ge. 17).

This is one reason I like to always initialize my disks with a cluster size that is a power of 2, (1,2,4,8,16,32...). If both the source and destination disks have power of 2 cluster sizes, then the size of a file will never grow when backing up to a device with a smaller cluster size, even if you don't use /truncate. This is because the source disk with the larger cluster size will always have a cluster size that is an integral multiple of the destination disk.

I almost always use /ignore=nobackup as well. This takes a bit more time backing up "junk" like the page file, but it will preserve your SYS$ERRLOG.DMP and SYSDUMP.DMP contents, as well as any LD .DSK files that are marked /nobackup. If you don't use /ignore=nobackup, the files will be recreated but with undefined contents; the contents won't be copied unless you either set them /backup or use /ignore=nobackup.

Note that if you are using a saveset as an intermediated step, the backup command creating the saveset must use the /ignore=nobackup. Some testing I just did on Alpha 8.3 shows that the contents in the saveset are always restored, i.e. /ignore=nobackup does not seem to be required when restoring files from a saveset that was created with /ignore=nobackup.

DFU is useful to determine what files are set /nobackup. You can then determine if it is appropriate to use /ignore=nobackup

$ define/job dfu$nosmg 1 ! don't use screen management option
$ dfu search /characteristic=nobackup /sort sys$sysdevice

In summary:

$ ! if you have dfu installed, I recommend creating a report, which will show a lot of info from the home block
$ dfu report

I highly recommend doing (at least) the next parts when booted from a disk other than the src_disk, i.e. an 8.3 installation disk, or another bootable drive (preferably with at least 8.3 loaded)

I really recommend against restoring over your existing system disk. That is inherently risky. Much better to restore to a new drive; if that is the case, then why not just do a disk-to-disk image backup? The below assumes you are using two disks, and booting from a third disk (can be the 8.3 installation CD) Things in square brackets [ ] are optional.

$ init /cluster= [/limit /system /erase=init] ... ! see stuff from DFU report /header= /own /user etc.
$ mou/for
$ analyze/disk/repair
$ backup/image/noinitialize/truncate [/ignore=nobackup]
$ dismount
$ mount/ov=id
$ analyze/disk/repair
$ dism

Boot from . If SAN disk, you will need to use wwidmgr to make the new disk available for SRM booting. This assumes Alpha.

Note: if you are using something less than 8.3, then the /limit stuff will be lost as backup didn't know what to do. /NOINIT really means "use existing values when reinitializing the disk", and pre-8.3 backup didn't know about /limit.

Jon
it depends
Robert Gezelter
Honored Contributor

Re: Changing Cluster size on the OS disk

Niall,

What files change size (to wit, "... the file size increases and this affects programs that uses the exact file sizes ...")?

It may be early in the morning here in New York (and I had a late meeting last night), but I cannot offhand think of an example for what you describe. Which programs are you referring to?

- Bob Gezelter, http://www.rlgsc.com