Make your own free website on Tripod.com
Last updated November 23 2004

The iR 110/150 ufsdump/ufsrestore
Network Backup Page



1.   What does this page mean to me?
2.   Why have you created this page?
3.   I'd like to see other iR110/150 hard disk backup solutions
4.   What do I need to have?
5.   What bootable CDROM can I use?
6.   What is a computer running a NFS server?
7.   How does this backup solution work?  The executive summary
8.   How does this backup solutiun work?  The techno geek summary
9.   What is the advantage of using ufsdump/ufsrestore?
10.  I'd like to see a step-by-step explanation
11.  How long does dumping or restoring take?
12.  My VTOC file is not available or when I run the restore script I am getting an error
13.  Can I modify these scripts for a specific purpose?
14.  I'd like to split/join my large backup files to/from CDROM
15.  I'd like to test the uploaded file integrity
16.  I'd like to modify this information to apply it to the Sun Fire V240
17.  Proper use of fsck



1.  What does this page mean to me?
With the information on this page, you will be able to backup part or all of the iR110/150 hard disk using ufsdump/ufsrestore


2.  Why have you created this page?
I like backing stuff up.
Especially really expensive machines  :-)
It makes playing more fun since you have a safe way out
For the SE, the information on this page can save hours of installation time.
For the customer, the iR110/150 downtime can be minimized and priceless data backed up


3.  I'd like to see other iR110/150 hard disk backup solutions
Click here for an iR110/150 hard disk backup solution using an identical hard disk
Click here for an iR110/150 hard disk backup solution using dd over NFS


4.  What do I need to have?
A Sparc64 bootable CDROM
A computer running a NFS server
Some simple scripts and files from this page


5.  What bootable CDROM can I use?
The Solaris 9 and 10 for Sparc Operating Environment Installation CD or Software 1 of 2 will work
You must login and agree to a licence in order to download it from here

or

The iR110/150 System software Release 5.x Operating System Software CD *
You cannot use the 4.82, 4.32 or earlier versions of the iR110 software

*The iR110/150 System Software Release 5.01 OS CD has an older version of bzip2 and uploads will take longer
This older version of bzip2 does not effect download speeds.
More info on this here


6.  What is a computer running a NFS server?
NFS is an acronym for Network File System
NFS allows machines to mount a disk partition on a remote machine as if it were on a local hard drive.
The computer providing the NFS server can be running Linux, Unix, or even Windows
Lots of Windows NFS servers are available
I used nfxaxe from http://labf.com/ for my tests.
Its configuration was simple and the software was rock solid
A decent Linux NFS Howto can be found here


7.  How does this backup solution work?  The executive summary
The iR110/150 is booted from CD, mounts a directory on an NFS server and runs scripts to backup/restore part or all of  the SCS's hard disk


8.  How does this backup solutiun work?  The techno geek summary
Backing up (Dump)
1. The SCS is booted with a CD
2. The SCS mounts a directory on an NFS server
3. A script is executed which will do the following;
4. An fsck -y is performed on 3 partitions (slices)  (root, var and doc library)
5. A ufsdump is performed on the SCS's 3 slices (root, var and doc library)
6. The output of ufsdump is compressed with bzip2 and stored over the network to an NFS server
7. You are then requested to have a nice day

Restore
1. The SCS is booted with a CD
2. The SCS mounts a directory on a NFS server
3. A script is executed which will do the following;
4. Provide an interactive vtoc dump (writing a new partition layout to a disk)
5. The newly created partitions are formatted (newfs)
6. The 3 slices are decompressed with bzip2, piped through ufsrestore and written to the SCS hard disk
7. A bootblock is written to the disk
8. An fsck -y is performed on 3 slices  (root, var and doc library)
9. You are then requested to have a nice day

 
9.  What are the advantages of using this ufsdump/ufsrestore solution?
1. Easy distribution
Lets say we install System Software Version 5.01 on a 20GB hard disk for a iR150
We have three parition (slice) schemes to choose from.  Large Spool, 50/50 and Small Spool
The root partition remains the same size in all three of these schemes
It is the var and document library (doclib) slices that can vary in size
Although the sizes the of var and doclib slices can be different, the data written to them is the same in all 3 slice schemes
(IE the data written to the var slice is the same for either Large Spool, 50/50, or Small spool)
Here is the easy distribution part
I have installed System Software V5.01 for the iR150 with all the necessary patches.
Now using the scripts on this page,  I can create a dump of the root (slice0), var (slice3) and doclib (slice4) and put these dump files (images) on 2 CD's for distribution
Using the restore scripts also from this page, you can write these slice images to a iR110/150 using any partition scheme you want
You can use this at a fresh installation or as a backup solution
The restore script finishes within 20 minutes with no interaction !!

2. Less CD's for distribution
The dd backup method requires 6 CD's per distribution;
5.01 iR150 Large Spool       2 CD's
5.01 iR150 50/50                 2 CD's
5.01 iR150 Small Spool       2 CD's

The ufsdump/ufsrestore method requires only 2 cd's per distribution;
5.01 iR150 Any scheme      2 CD's

In case you get an old marking engine and need to flash it up, 3.15 and 4.32 fit on 1 CD !!

3. Speed
The dd backup method writes the entire disk, including empty space.
The ufsdump/ufsrestore method does not include empty space
The images will dump/restore faster


4. No need to zero the hard disk
The dd Network Backup solution will copy the entire disk, even 1's and 0's of old, useless data
Ufsdump only backs up valid, used data



10.  I like to see a step by step explanation
Lets assume the following;
NFS Server IP is 192.168.10.50
The NFS server exported directory is /ir110
The SCS NIC hme0 is 192.168.10.100
The script files are in the /ir110 directory

A. Create the NFS
You must create a NFS server with read/write permissions so the iR110/150 SCS can upload files
I cant help you with NFS server configuration options here.  There are to many OS's and versions
Just ensure that 192.168.10.100 has read/write permissions


B. Boot SCS from OS CD
Use init 0 or whatever safe means to get the the ok prompt
Then type boot cdrom -s

 
C. Configure the SCS NIC and mount NFS
After the SCS boots up type the following
#ifconfig hme0 192.168.10.100                  (Gives the SCS's on board NIC (nearest to the video connector) an IP address)
#ifconfig hme0 up                                       (Brings this NIC interface up)
#mount 192.168.10.50:/ir110 /mnt      (Mounts the NFS directory /ir110 onto the mount point /mnt)


D.  Obtain, decompress and check the permissions of the ufsdump/ufsrestore scripts
You can get the ir110-ufsdump-scripts.zip file here
I zipped the two scripts to bypass IE download issues
Unzipping the file will reveal 2 scripts called "dump" and "restore"
You will also see several files with vtoc in the file name (more on this later)
Copy all the files to the NFS server's /ir110 directory
On the SCS, cd to the /mnt directory
You should be able to use ls and see the scripts you just copied

Now just to be safe, lets copy the scripts to the SCS's /tmp directory
#cp /mnt/dump /tmp                                  (Copies the script restore to the SCS under /tmp)
#cp /mnt/restore /tmp                                (Copies the script download to the SCS under /tmp)
#cd /tmp                                                   (CD to /tmp)

Now we have to check the permissions on the scripts
If you unzipped ir110-ufsdump-scripts.zip on a Dos/Windows machine the file permissions will be lost
If you unzipped ir110-ufsdump-scripts.zip on a Unix/Linux box, the permissions will not be lost

Do this procedure to check and change the permissions if required

Do a ls -la
Ensure root has execute permissions on the files "dump" and "restore" like the red x in this example
-rwxr--r--  1 root  wheel   222 Feb 27 22:12 dump
-rwxr--r--  1 root  wheel   214 Feb 27 22:12 restore


If you see this;
-rw-r--r--  1 root  wheel   222 Feb 27 22:12 dump
-rw-r--r--  1 root  wheel   214 Feb 27 22:12 restore

The red - indicates that root does not have execute permissions on these files

You will need to use chmod to change this
#chmod u+x dump
#chmod u+x restore


Do another ls -la to confirm the permissions are set correctly


E. Executing the scripts
From the /tmp directory, the scripts are executed as follows

To dump the SCS hard disk to an images called slice0, slice 3 and slice 4, type the following
./dump
The dump will take 1-2 hours to complete so please be patient


To restore these slice images to the SCS,  type the following
 ./restore
The restore process will take 20-30 minutes to complete

A very important part of the restore script is the writing of the vtoc file (Virtual Table of Contents)
The vtoc file is a simple text file that is to be written to the hard disk (kinda like a MBR or Master Boot Record in the PC world)
I have included several vtoc files for the 9GB and 20GB hard disks
The restore script will request you to choose the hard disk size and partition scheme you require
If all goes well, the vtoc is written to the disk
If you already have a partition or slice layout on the disk, simply choose “Skip this step and use the existing partition layout”

If the included vtoc files do not meet your needs or result in (error messages) dont worry.  See here


11.  How long does dumping or restoring take?
Here are the details of some tests

Complete Backup/Restore
Ultra 10 with no integrated MIP
256MB RAM
20 GB hard disk
3COM 10/100 switch
5.01 System Software for an iR150 with no patches
The restore script completed in 30 minutes
The dump script completed less than 1.5 hours (82 minutes)

Document Library Backup/Restore
A V4.83 Document Library slice with 2GB of data took 60 minutes to dump and 25 minutes two restore


12.  My VTOC file is not available or when I run the restore script I am getting an error

"fmthard: Partition 2 specifies the full disk and is not equal full size of disk.  The full disk capacity is xxxxx sectors"

Not a problem.  This is easy to get around
All you need to do is get out the iR110/150 System Software CD's you plan on installing
Start the installation procedure of the Operating System CD
Dont worry about host name, networking ... This data will be soon toast anyways
When you get to the partition scheme selection, choose your desired layout
Begin the installation as normal
Keep an eye on the installation script's output
After the file system is created (Creating and checking UFS file systems), it will start copying files (Starting software installation  ... XXX Mbytes remaining)
You can now hit control-c several times to stop the script
Dont sweat it, the partition layout is now on the disk
Use init 0, put back in the Sun Solaris 9 CD and do a boot cdrom -s
Start the restore script procedure again
Ensure you choose the option "Skip this step and use the existing partition layout"
Everything should go smooth from here
FYI, the VTOC files were created using this
#prtvtoc /dev/rdsk/c0t0d0s2 >vtoc    (Prints the vtoc of this hard disk device and redirects the output to a file called vtoc)
You can read this file in any editor to see how simple it really is.


13.  Can I modify these scripts for a specific purpose?
Certainly!
I often edit and use only portions of these scripts
Often I have to rem out (place a # in front of several lines) to accomplish a specific task
Perhaps you want to create a document library backup/restore procedure
Perhaps you want to re-install only the root partition ...
Whatever works for you
Just be cautious, backup often and if possible, test it out first


14.  I'd like to split/join my large backup files to/from CDROM
You may want to split up your images to back them up to CDROM for portability
You may also want to join backup files that we send to you
There are many ways to do this
Here is what worked for me

FreeBSD
split -b 620m filename.bz2                      (Splits filename.bz2 into multiple 650MB files)
cat inputfile1 inputfile2 > outputfile          (Joins inputfile1 with inputfile2 to create outputfile)

Dos
copy /b inputfile1+inputfile2  outputfile    (Joins inputfile1 with inputfile2 to create outputfile)

Windows GUI
This shareware one was great
It includes checksums and a easy to use joiner
http://www.prosplitter.co.uk/

It is very important to ensure the file is not corrupt
Consider an md5 sumcheck on the source file and compare it to the joined file before you use it

FreeBSD
md5 filename

Windows
Luke Pascoe has an excellent and free MD5Summer from http://www.md5summer.org/
Kudo's to Special Agent Jesse Kornblum for the excellent md5deep located at http://md5deep.sourceforge.net/


15.  I'd like to test the uploaded file integrity

If bzip2 is installed on the NFS server simply type this
bzip2 -t -v filename.bz2
bzip2 -t -v will finish with "ok" if the file is good
bzip2 -t -v will finish with Data integrity (CRC) error is the file is corrupt
It took 40 minutes on a P2 running FreeBSD to check a 760MB backup file


16.  I'd like to modify this information to apply it to the Sun Fire V240
No sweat
You will simply have to modify the scripts on this page with respect to the slice 2 device references (IE /dev/rdsk/c0t0d0s2)
The Ultra 10 slice 2 device reference is /dev/rdsk/c0t0d0s2
I have recently seen my first single hard disk V240 and it's slice 2 device reference was /dev/rdsk/c1t0d0s2
If there are two hard disks in the V240, you will have to adjust to taste


17.  Proper use of FSCK
In my humble opinion, I think there is a significant amount of misinformed and dangerous usage of the fsck command

Using fsck with no switches and saying no to changes is a relatively safe way of checking your hard disk

Saying yes to the changes or using fsck -y while the filesystem is mounted is dangerous

The best evidence of this danger is actually in the fsck man page:

"The operating system buffers file system data. Running  fsck on a mounted file system can cause the operating system's buffers to become out of date with respect to the disk.
For this  reason, the file system should be unmounted when fsck is used..."

Please do not try to fsck and answer yes, or fsck -y a currently mounted filesystem
It is a bad idea because the filesystem data structures are "open" and there may be changes in memory that have not been written to the disk yet.
The proper way to fsck and answer yes or fsck -y a filesystem when it's not mounted.

If you need to fsck and answer yes or fsck -y the hard disk, here is a much safer way

Grab the iR110/150 Operating System CDROM or a Solaris 8, 9 or 10 for Sparc Disk 1 and have it ready
Gracefully get the iR110/150 SCS down to the ok prompt using init 0 if you can
Pop the CDROM into the drive and type this
boot cdrom -s
It will take about 3-5 minutes to boot to a root prompt
You now have access the the fsck command on the CDROM and the iR110/150 hard disk is not mounted
Now you can fsck the hard disk is manually using this
#fsck -y /dev/rdsk/c0t0d0s0          (fsck's the root partition)
#fsck -y /dev/rdsk/c0t0d0s3          (fsck's the var partition)
#fsck -y /dev/rdsk/c0t0d0s4          (fsck's the document library)

After your fsck -y commands no longer show errors, you can use init 6 to reboot the SCS
Don't forget to eject your CD  :-)

I hope this helps



Home    Back

If you find an error or wish to comment please let me know