Operating System - OpenVMS
1822034 Members
3452 Online
109639 Solutions
New Discussion юеВ

Q's about Backup and Mount disk command

 
SOLVED
Go to solution
Jorge Cocomess
Super Advisor

Q's about Backup and Mount disk command

Greetings,

I hope you guys don't mind me asking two (2) questions with one posting. The questions as follows:

1. I created this new mirrorset ($1$DGA33) and labeled as disk23. This new mirrorset Disk23 is the new replacement of our current disk23. How can I mount this new "disk23" that it doesn't interfere with the current disk23 that already mounted??

2. What is the proper backup command that I can use to backup from the current disk23 to the new disk23 with all the directories and sub-directories??

Please advise.

Thank you in advance.

Jorge
12 REPLIES 12
Ian Miller.
Honored Contributor

Re: Q's about Backup and Mount disk command

$ MOUNT/FOR $1$DGA33:
$ BACKUP/IMAGE xxx $1$DGA33:/INIT

where xxx is the device name of your current disk23.

I would ensure none was using the current disk23 when you did this.
____________________
Purely Personal Opinion
Dean McGorrill
Valued Contributor

Re: Q's about Backup and Mount disk command

hi Jorge,
you want to move a disk. the best way
is to free up the current disk and mount
it privately. mount/over=id olddisk
mount the new disk foreign. mount/for newdisk. to copy, use backup image

backup/image olddisk newdisk

the will move the files and disk label and
compress the contents that were on the old
disk. hope that helps -Dean
Andy Bustamante
Honored Contributor
Solution

Re: Q's about Backup and Mount disk command

Adding to Ian and Dean's answers:

Ideally you need to make sure no one is using the old disk23. You can either dismount it and mount it privately, disable log on or take action to force the application(s) to make sure files are closed and consistant on the source disk. Use $SHOW DEVICE $1$DGA23/FILES to check for open files. Some applications, Oracle RDB and RMU for example, have utilities to move files.

If you want to keep the same disk after the backup, change the identifiers so your new disk is changed from $1$DGA33 to $1$DGA23 and the old disk23 mirrorset is placed out of service. Sometimes this is the easiest way to deal with hard coded device references.


Andy

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
Hoff
Honored Contributor

Re: Q's about Backup and Mount disk command

I'd probably specifically initialize the disk for the new spindle, and use BACKUP /IMAGE /NOINIT ddcu-from: ddcu-to: to transfer the data over. I'd also enable dynamic volume expansion, while I had the volume off-line.

http://64.223.189.234/node/193
http://64.223.189.234/node/207

This because I'd ensure enough headers, and because I'd move to a cluster factor of 16 or a multiple, and some related changes.

Here's some info on host-based volume shadowing -- what OpenVMS calls disk mirroring -- on the chance you're not using controller-based mirroring on the array controller...

http://64.223.189.234/node/349

Stephen Hoffman
HoffmanLabs LLC
Jon Pinkley
Honored Contributor

Re: Q's about Backup and Mount disk command

Jorge,

All your questions were related, so my opinion that asking them all at once was appropriate.

I haven't seen this mentioned so far.

VMS will only allow a single instance of a volume name to be mounted in a shared fashion within the cluster.

In other words, you will not be able to mount both the old and the new using /CLUSTER, /SYSTEM or /GROUP unless you modify the volume label.

To do that, use the set volume/label=newlabel command.

If you are using logical names as displayed by f$getdvi("$1$DGA33","LOGVOLNAM") to access the drive (as you hopefully are), then you will need to dismount/remount the disk for that logical name to change.

Also, as you are moving the disk, now is the best time to use the init commands appropriate for the new disk. I would choose a /CLUSTER that is a power of 2, (current recommendations are for a clustersize of 16, but that really depends on what the disk is going to be used for). You also should at least consider initializing with /LIMIT and if you anticipate many files on the drive, you should preallocate file headers with /HEADERS and perhaps a large /MAXIMUM_FILES. If you will have a large number of files in the top level directory [000000] (MFD) consider using /DIRECTORIES.

The following can be changed later with set volume, but you may want to do it up front. If you have sufficient memory, and you expect files to grow, and therefore become fragmented, you can reduce the performance penalty by specifying /WINDOW=80 (or at least something higher than the default of 7). Note that this can also be specified at volume mount time. You can reduce fragmentation by specifying /EXTENSION to be larger than the default. Note that this is only a last resort, as it can also be set system wide with the SET RMS command. There is a current discussion about where to place the majority of the blocks used by the INDEXF.SYS file using the /INDEX=xxxx command. INDEXF.SYS contains (in addition to some other things) the file headers for all files on the disk. The file headers store meta data for each file, i.e. dates, ownership, protection, attributes, etc.

Once you have initialized the drive, then you want to backup/image/noinit so the special settings you used are not discarded.

Here's a summary of the commands I would use to do what you want.


Assuming going from $1$dga23: to $1$dga33: and using a prived account like SYSTEM.

$! stop applications using the disk
$! verify no files open
$! from each cluster member do the following:
$! show device/files $1$DGA23:

Here's an example of a disk with no files open:

$ show dev/file dkc200

Files accessed on device $4$DKC200: (SIGMA, OMEGA) on 20-JUN-2007 19:38:52.99

Process name PID File name
00000000 [000000]INDEXF.SYS;1
$

INDEXF.SYS always shows up with PID 00000000

You don't state if this disk is your system disk, if it is, you will need to boot off the VMS distribution disk to backup to the other drive.

I would change the label on the original disk at this time.

$ set volume/label=DISK23_OLD $1$DGA23:

Also, I like to do an analyze/disk/repair before the backup.

$ analyze/disk/repair $1$DGA23:

You may get an informational message about the quota file if you are not using disk quotas.

Dismount the disk clusterwide

$ dism/cluster $1$dga23:

Mount the disk for your process. /nowrite to prevent costly accidents, and so the underlying disk doesn't change while you are copying it.

$ mount/nowrite $1$dga23: disk23_old

Initialize the new disk with label DISK23_NEW and appropriate qualifiers.

$! example only, you need to determine what is right for you.

$ init $1$dga33: disk23_new /system /owner=[1,1] /cluster=16 /headers=100000 /limit ! etc.

Mount the destination disk that you have initialized with /cluster etc.

$ mount/for $1$dga33:
%MOUNT-I-MOUNTED, DISK23_NEW mounted on _$1$DGA33: (JORGE)

Backup old disk to new. I like to use /truncate when new clustersize is not integral multiple of the old clustersize. I also use /IGNORE=NOBACKUP. /VERIFY if you want to know for sure you have a good backup. Note: a /verify when going disk to disk is for the paranoid, as the probability of an error here is no worse than when the device is in normal operation. However, since the input disk is write locked, a /verify should not generate any errors. If it does, there are real problems.

$ backup/image/noinit/ignore=nobackup $1$dga23: $1$dga33: /truncate

Pay attention to any errors or warnings that are issued.

If you are not running 8.3 with patches, the /limit you used when you initialized the drive may be lost. In that case, you will need to reset it.

$ dismount $1$dga33:

$ mou/ov=id $1$dga33:
%MOUNT-I-MOUNTED, DISK23_NEW mounted on _$1$DGA33: (JORGE)

Ok, I also like to do an analyze disk after a disk-to-disk image backup.

$ analyze/disk $1$dga33:

Other than the possible QUOTA.SYS not found message, you shouldn't get any warnings or errors here. If you do, you need to investigate them before moving forward.

Note: At this point, you can still revert to the original state, all you need do is dismount the write locked $1$DGA23, mount it private, reset the volume label to DISK23 on $1$DGA23:, dismount it, and remount it clusterwide.

Assuming everything looks good on the new copy, you have two choices. Change any references to $1$DGA23 to $1$DGA33 (hopefully the only place this needs to be done is where the disk is mounted), or change the unit ID so VMS sees the new disk with the old physical name. To do that you will need to dismount both devices from all VMS nodes, and then from the disk controller unpresent the old and new devices and then present the new device with the old unit identifier. You would probably want to present the old device with the new identifier, just so you could see the way it was.

Note: At this time the volume labels still have the _OLD and _NEW tags, so you will be able to easily verify that you are working with the correct device, even if the physical device name has changed.

Either change your mount commands in your startup procedures or change the physical device name. For this example, I will assume you are going to change the unit identifiers associated with the disks, as that has fewer possible side effects.

Mount the new device.

$ mount /ov=id $1$dga23: ! note using old phy name
%MOUNT-I-MOUNTED, DISK23_NEW mounted on _$1$DGA23: (JORGE)

Verify that it is really the correct device.

Reset the volume label to DISK23 and if needed, set /LIMIT

$ set volume/label=DISK23/limit $1$DGA23:

One more dismount and then mount clusterwide

$ dism $1$dga23:
$ mount/cluster/window=80/extent=128 $1$dga23: disk23 ! /window and /extent can be set here (for example)

Ok, restart the applications, do some test, you should be done.

Good luck,

Jon
it depends
Jorge Cocomess
Super Advisor

Re: Q's about Backup and Mount disk command

The only trouble that I can think is that the disk23_old has the OSD-2 and the new disk23_new has the OSD-5.

Please advise.

Thanks,
Jorge
Jon Pinkley
Honored Contributor

Re: Q's about Backup and Mount disk command

All suggestions to this point have assumed that there is nothing on the new disk, and thay you want to recreate what was on the old disk on a possibly larger/faster etc. disk.

Do you have stuff on the new disk already? If that is the case, you do not want to use backup/image, as that will essentially owerwrite what was previously there.

If you just need the new disk to be ODS-5, you can backup the old to the new, and then convert to ODS-5 at any time you want. Going from ODS-2 to ODS-5 is easy, going back is a bit more involved; the only supported way is to use backup.

Set $ help set volume/structure

Jon
it depends
Jorge Cocomess
Super Advisor

Re: Q's about Backup and Mount disk command

Make a lot of sentence to me now. The new disk has no info. Yes, the new disk is now on the HSG80 SAN environment vs. local SCSI storage.

I do appreciate all the advice so far.

Regards,
Jorge
Jorge Cocomess
Super Advisor

Re: Q's about Backup and Mount disk command

Jon,

One more question, what if the new disk already init/created as OSD-5 and I am trying to backup all the data from the old disk w/OSD-2 data to the new disk w/OSD-5 structure?? Would this still work or I will to init the new disk again w OSD-2 structure??

Thank much!!

Jorge
Jon Pinkley
Honored Contributor

Re: Q's about Backup and Mount disk command

Oh, this works too. I just verified it using ld devices:

$ init ods5disk: /structure=5 ...
$ mou/for ods5disk:
$ backup/image/noinit ods2disk: ods5disk:

So just add "/structure=5" when you init the $1$dga33: drive, and the structure will be changed during the backup.

That's the only supported way to go from ods5 to ods2. Have you done any testing with ods5 drives? Some of your command files may need to be "fixed" if they make assumptions about filenames (for example, that filenames will always be in uppercase).

It's better to find those issue before you change (in my opinion).

You can play with ODS-5 using LDDRIVER and container files. That way you don't need to dedicate a whole HSG device for testing.

Jon

BTW, I just found what appears to me to be a bug when backing up an ODS2 disk with a file with exact placement retrieval pointers to an ods-5 disk using backup/image. I will put details of that in a new thread (after I verify that it really is a bug). More than likely that will not affect you, unless you do weird things like I do.
it depends
Jon Pinkley
Honored Contributor

Re: Q's about Backup and Mount disk command

For the record, I didn't find a "bug" in backup from ods2 to ods5, it was operator error.

The "problem" was that the output file had zero block allocated. I had used /truncate and the input file size was 0/10000, so results were what should have been expected. I had done a set file/end on the placed file so it was 10000/10000, but I had done that on physical backup of the disk, and I thought I was backing up that disk, but in fact it was the one with the 0/10000 version of the file.
it depends
Jon Pinkley
Honored Contributor

Re: Q's about Backup and Mount disk command

Jorge.

I just looked at the documentation to see if backing up from ODS-2 to ODS-5 was "supported", and it does not list that as a way to go from ODS-2 to ODS-5 in the Sysstem Manager's Essentials manaul. You should definitely read the portions of

http://h71000.www7.hp.com/doc/82FINAL/aa-pv5mj-tk/aa-pv5mj-tk.PDF

that deal with ODS-5, and how to convert back and forth. Converting is converted starting at page 325.

ODS-5 considerations are covered in the first few sections of Chapter 10.

When going from ODS-5 to ODS-2, you must use the /CONVERT switch.

I didn't use it when going from ods-2 to ods-5, and it appears to work (with or without the /convert switch). I just don't see documentation that says it is supported.
it depends