Richards Center at Yale University
RC Home | Search | Table of Contents | General Information

Last Modified: Wednesday, 18-Apr-2007 14:16:43 EDT

Using ring4 and samba to transfer ISOs to Rimage server

  • Overview
  • Configure ring4 as disk server
  • Configure ring4 as samba server
  • Maintenance

    Overview

           ( .img files) NFS [linux WS] NFS (  .ISO file)
       [1] (/srv/frames)---->[ mkisofs]---->(/srv/images)
           (     on vs1)			(   on ring4)
     
           (  .ISO file) SMB [ elijah ]local(  ISO cache)
       [2] (\\Isoserver)---->[download]---->(on D: or C:)
           (   on ring4)
     
           (  ISO cache)local[ elijah ]local
       [3] (on D: or C:)---->[  burn  ]---->(DVDR)
      
    For each DVD to be burned, the following steps are performed. For multiple DVDs, they may be performed sequentialy for each DVD, or step 1 may be performed for all DVDs, followed by the other steps for all DVDs. Approximate times are indicated.
    1. 4:15 -- mkisofs. buildit script on client workstation runs mkisofs to assemble individual files into a .iso file, which is a DVD image. Buildit also creates an .xml file, which contains instructions for burning and printing the DVD, and a .pdf file containing the label to be printed on the DVD.
    2. 3:00 -- download. burnit sends the .xml file to the DVD production server on elijah. Elijah downloads the .iso from /srv/images/$USER/$project on ring4, which elijah sees as \\Isoserver\image0\$USER\$project. The DVD image is written to a cache file on drives C: or D: on elijah.
    3. 9:00 -- burn. Elijah burns the DVD from the cache file
    4. 1:20 -- print. Elijah prints the label (from /srv/image0/$USER/$project) on the DVD.
    Return to top

    Configuring ring4 as disk server

    General setup of ring4 as a disk server.

    Ring4 has been configured with openSuse 10.0, accessing two old SGI SCSI vaults. Information on the configuration can be found at http://www.csb.yale.edu/sysadm/diskstorage/linuxserver/200601-ring4.html , although details of RAID configuration differ (see below).

    Configuring RAID disks on ring4.

    Ring4 has 10 73GB SCSI disks and 2 146GB scsi disks in the SCSI vaults. We will configure 2 RAID devices, /dev/md0 and /dev/md1, which will be mounted on /mnt/csb0 and /mnt/csb1. Each will have an images/ directory with protection 777, exported to linux clients that support this procedure. Each RAID will be striped with 5x73GB disks. If any single disk dies, the entire RAID fails and must be rebuilt.

    Each disk has already been partitioned as described in http://www.csb.yale.edu/sysadm/diskstorage/linuxserver/200601-ring4.html .

    Stop existing R5 raidsets:

          ring4# raidstop /dev/md0
          ring4# raidstop /dev/md1
        
    Find out which disks are 73GB
          /etc# foreach i ( a b c d e f g h i j k l )
          foreach? fdisk -l /dev/sd$i | grep  "Disk /dev/sd"
          foreach? end
        
    Create new stripesets on 73GB disks:
          ring4# mdadm -C /dev/md0 -l stripe -n 5 --auto=md /dev/sd[bcdef]1
          ring4# mdadm -C /dev/md1 -l stripe -n 5 --auto=md /dev/sd[hijkl]1
        
    Make entries in /etc/fstab and /etc/exports
          /etc/fstab:
            /dev/md0        /mnt/csb0       ext3    defaults        1 1
            /dev/md1        /mnt/csb1       ext3    defaults        1 1
          /etc/exports:
            /mnt/csb0/images cormorant(rw,sync) coot(rw,sync) albatross(rw,sync)  \
                             loon(rw,sync)  locksmith(rw,sync)  sliderule(rw,sync) 
            /mnt/csb1/images cormorant(rw,sync) coot(rw,sync) albatross(rw,sync)  \
                             loon(rw,sync)  locksmith(rw,sync)  sliderule(rw,sync) 
        
    Finish up:
          ring4:~ # mkfs.ext3 -T largefile4 /dev/md0
          ring4:~ # mkfs.ext3 -T largefile4 /dev/md1
          ring4:~ # mount /mnt/csb0
          ring4:~ # mount /mnt/csb1
          ring4:~ # mkdir /mnt/csb0/images
          ring4:~ # mkdir /mnt/csb1/images
          ring4:~ # chmod 777 /mnt/csb0/images
          ring4:~ # chmod 777 /mnt/csb1/images
          ring4:~ # exportfs -rv
        

    Mounting /csbN/images on linux clients as /srv/images/N

    We want to access these disks from linux workstations with gigabit interfaces and capable of running the python and java client applications: loon, coot, albatross, cormorant. For NFS mounting, I tested both TCP and UDP, and there was no measurable difference in speed. So I don't specify the protocol, and let the client and server decide between them. On these workstations, we add to fstab:
        ring4:/mnt/csb0/images /srv/images/0 nfs rw,nfsvers=3,hard,async,intr,bg
        ring4:/mnt/csb1/images /srv/images/1 nfs rw,nfsvers=3,hard,async,intr,bg
        
    And of course, we make the requisite directories and mount the filesystems:
          albatross# mkdir /srv/images/0
          albatross# mkdir /srv/images/1
          albatross# mount /srv/images/1
          albatross# mount /srv/images/0
        
    Return to top

    Configuring ring4 as samba server

    The main Core samba server is set up with security = user, which means access in controlled by username/password. But we want to use security = share for this purpose, so elijah won't need a username/password. The two security levels cannot be mixed (or at least not easily) on one samba server. This is one reason we set up a separate samba server on ring4.

    The config file is /etc/samba/smb.conf, and a copy is here. After creating the file:

          ring4# /etc/init.d/smb start
          ring4# /etc/init.d/nmb start
        
    We want to have these services at startup:
          ring4:# chkconfig smb on
          ring4:# chkconfig nmb on
        
    Finally, reboot ring4 and check that everything still works.

    Return to top

    Maintenance of ring4

    In /etc/cron.hourly, keep the clocks synchronized:

         ring4:# cat > ntpdate
         /usr/sbin/ntpdate -s -t 12.0 csbtime1.core
         ring4:# chmod +x ntpdate 
       

    In /etc/cron.daily, throw out .iso and .pdf files more than a day old:

         ring4:# cat > clean-csb
         find /mnt/csb0 -type f -atime "+1" -exec rm {} \;
         find /mnt/csb1 -type f -atime "+1" -exec rm {} \;
         ring4:# chmod +x clean-csb 
       

    What to do when a disk fails

    When a disk fails, the corresponding RAIDset will fail, and we will lose /mnt/csb0 or /mnt/csb1. The easiest solution is to recreate the RAIDset using 4 disks instead of 5, then recreate the filesystem, then reboot. See Configuring RAID disks on ring4.

    It is probably not a good idea to configure a RAIDset using the 146GB drives, because they are slower.

    Return to top

    Last Modified: Wednesday, 18-Apr-2007 14:16:43 EDT


    RC Home | Search | Table of Contents | General Information
    Richards Center (www.rc.yale.edu) at Yale University (www.yale.edu)
    Contact: webmaster_at_ben^rc^yale^edu