Updated November 23 2004

The iR110/150 dd
Network Backup Page



1.    What does this page mean to me?
2.    Why did I create 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 an NFS server?
7.    How does this entire process work?  The executive summary
8.    How does this entire process work?  The techno geek summary
9.    What about hard disk sizes and partition layout?
10.  Can I modify the procedure to backup and restore a specific partition or slice?
11.   I like to see a step by step explanation of a Network Backup of the whole disk
12.  How long does uploading or downloading take?
13.  I'd like to split/join my large backup files to/from CDROM
14.  When I try to use the dd command I get a corrupt label - wrong magic number error
15.   I am getting huge upload times with the iR110/150 5.x OS CD.  Why
16.  Why are you not using Ghost for Unix (G4U) instead?
17.   I'd like to change the time zone on the SCS.  I need help
18.  I'd like to modify this information to apply it to the Sun Fire V240
19.  Proper use of FSCK




1.  What does this page mean to me?
With the procedures outlined in this page, it is possible to backup and restore the iR110/150 hard disk over the network



2.  Why did I create this page?
I wanted to enhance the existing iR110/150 Hard Disk cloning page to add a networking solution



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 using UFSDUMP/UFSRESTORE over NFS



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



5.  What bootable CDROM can I use?
The Solaris 9 or 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.x OS CD has an older version of bzip2 and uploads will take 5 times 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 some tests. Its configuration was simple
A decent Linux NFS Howto can be found here



7.  How does this entire process work?  The executive summary
An NFS server is created on the network to store or retrieve the backup files
The iR110/150 is booted from CD, configured and executes scripts to upload or download backup files on the NFS server



8.  How does this entire process work?  The techno geek summary
On the network, an NFS server is created.
The NFS server is configured to provide read/write access for the iR110/150 SCS
The iR110/150 SCS is booted from CDROM, given an IP address and mounts the NFS partition
The backup scripts are obtained, decompressed, checked for permissions and copied to the SCS
Finally, the backup scripts are executed, to upload or download the SCS hard disk image to the NFS server

The scripts both have references to /dev/rdsk/c0t0d0s2
/dev/rdsk/c0t0d0Is the logical disk device name
s2 is Slice 2 which is the entire disk
If you need more information, a reference to some Sun Docs is here

The upload script looks something like this
dd if=/dev/rdsk/c0t0d0s2 | bzip2 > /mnt/backup.bz2        (Convert and copy the specified hard disk, compress the output and write the output file to a NFS server as /mnt/backup.bz2)

The download script looks something like this
bzcat /mnt/backup.bz2 | dd of=/dev/rdsk/c0t0d0s2          (Decompress /mnt/backup.bz2 to the specified harddisk)

One of the beautifull aspects of Unix, Linux ...is the pipe command or the | symbol
By using a pipe, the output of one command becomes the input to the next command.



9.  What about hard disk sizes and partition layout?
The Ultra 10 SCS can currently have either a 9 18 or 20 GB Sun hard disk
The whole disk (Slice 2) backups created with the information from this page use the dd command
When dd is used, the hard disk geometry must be considered
This means your backups should be restored to an identical hard disk (both size and type)

Please remember that these hard disks can be partitioned in three ways as well;
Large Spool, Large Library or 50/50

You should consider labelling your backups to accurately describe the source disk size and partition layout




10.  Can I modify the procedure to backup and restore a specific partition or slice?
Certainly
The current scripts backup and restore slice 2, the whole disk as in
/dev/rdsk/c0t0d0s2

You should be able to backup a specific slice like perhaps slice 4, the document library
/dev/rdsk/c0t0d0s4

All that is required is the editing of the scripts to change the specific slice number
Under Linux or Unix, editing these scripts is easy and stable
Under Dos or Windows use a simple editor like notepad.  Be carefull not to corrupt the file




11.  I like to see a step by step explanation
Please read all the steps first, especially step F below

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 scripts
You can get the ir110-backup-scripts.zip file here
I zipped the two scripts to bypass IE download issues
Unzipping the file will reveal 2 scripts called "upload" and "download"
Copy these 2 scripts 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/upload /tmp                                  (Copies the script upload to the SCS under /tmp)
#cp /mnt/download /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-backup-scripts.zip on a Dos/Windows machine the file permissions will be lost
If you unzipped ir110-backup-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 "download" and "upload" like the red x in this example
-rwxr--r--  1 root  wheel   222 Feb 27 22:12 download
-rwxr--r--  1 root  wheel   214 Feb 27 22:12 upload


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

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 upload
#chmod u+x download

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 upload the SCS hard disk to an image called backup.bz2, type the following
./upload backup.bz2
The upload will take 3-4 hours to complete so please be patient


To download an image called backup.bz2 to the SCS,  type the following
 ./download backup.bz2
The download process will take a minumum of 45-60 minutes to complete



F. Optionally "zero" the hard disk
If you are doing a fresh install, you may want to consider "zeroing" the hard drive
This will write zero's to the entire hard disk
Any old hard disk data will be overwritten by zero's
This will make your backups signicantly smaller
More info on this here
Here is how
Use the OS CD as follows
# init 0
ok boot cdrom -s
#dd if=/dev/zero of=/dev/rdsk/c0t0d0s2 bs=2048k
This process should take less than 30 minutes

Note:  
Using dd after zeroing the drive may result in errors lile
Warning: /pci@1f,0/pci@1,1/ide3/dad@0,0 (dad0):
corrupt label - wrong magic number
dd: /dev/rdsk/c0t0d0s2: open: I/O error

See Step 14 below to get around this error

G. You may want 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




12.  How long does uploading or downloading take?
Here are the details of some tests
Ultra 10 with no integrated MIP
256MB RAM
20 GB hard disk
3COM 10/100 switch
4.82 System Software with no patches
df-k shows 1.55GB of  used disk space
The backup file is 760MB

The older iR110/150 5.x OS CD bzip2 version accounts for the huge upload time differences
The newer Solaris 9 OE 12/02 for Sparc CD's account for the download time differences

As you can see, the best times are with the Solaris 9 CD's


CD type
Upload Time Hours:Minutes
Download Time Hours:Minutes
iR110/150 5.x OS CD 14:30
1:04
Solaris 9 OE 12/02 for Sparc CD's 3:30
0:43




13.  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 650m 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 included 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
I use Luke Pascoe's excellent and free MD5Summer from http://www.md5summer.org/



14.  When I try to use the dd command I get a corrupt label - wrong magic number error

You may get this error if you recently zero'd the disk;

Warning: /pci@1f,0/pci@1,1/ide3/dad@0,0 (dad0):
corrupt label - wrong magic number
dd: /dev/rdsk/c0t0d0s2: open: I/O error

You can use the format command to fix this
#format
Choose your disk
Choose Label
Choose Y to continue
Use Control D to quit.
Now your dd command should now work without errors



15.  I am getting huge upload times with the iR110/150 5.x OS CD.  Why?
The iR110/150 System software Release 5.x Operating System Software CD bzip2 version is 0.9.0c
The Solaris 9 for Sparc Operating Environment 12/02 Installation CD or Software 1 of 2 bzip2 version is 1.0.1
Here is a snip from the bzip2 man page
"Files containing very long runs of repeated symbols, like "aabaabaabaab..." (repeated  several hundred times) may compress more slowly than normal.
Versions 0.9.5 and above fare much better than previous versions in this respect.
Decompression speed is unaffected by these phenomena."

I'm pretty sure that explains this issue quite well



16.  Why are you not using Ghost for Unix (G4U) instead?
I first got the idea for this page from Hubert Feyrer's excellent Ghost  For Unix (G4U)
G4U's NetBSD scripts basically uses DD, GZIP and FTP.
I originally wanted to use GFU but as of March 2003, I still could not yet find a working NetBSD Sparc 64 boot CDROM.
As soon as one becomes available, I will add it to this page.

In the meantime, I tried to reverse engineer the G4U scripts for the
iR110/150  Boot CD's but ran into problems
1.  No Gzip, but rather had only Bzip2 available
2.  Uploads went OK but downloads filled the iR110/150's swap space (256MB RAM) before writing was complete and crashed the system
I then figured the best solution was to do this whole thing over the network using NFS.



17.   I'd like to change the time zone on the SCS.  I need help
As root, edit TZ= in the following file and reboot
#
/etc/default/init
Here are some TZ examples
Canada/Atlantic
Canada/East-Saskatchewan
Canada/Mountain
Canada/Pacific
Canada/Central
Canada/Eastern
Canada/Newfoundland
Canada/Yukon

US/Alaska
US/Central US/Hawaii
US/Pacific
US/Aleutian
US/East-Indiana
US/Michigan
US/Pacific-New
US/Arizona
US/Eastern
US/Mountain
US/Samoa


18.  I'd like to modify this information to apply it to the Sun Fire V240
No sweat
You will simply have to modify the upload and download scripts 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


19.  Proper use of FSCK
In my humble opinion, I think there is a significant amount of misinformed and dangerous usage of the fsck command
Read more about this here


Home    Back

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