Skip to content

Author: admin-joel

Converting RAID to LVM-on-RAID

OUT OF DATE as of 2008-11-01.

We decided to convert the Raid1 array to LVM instead of a monolithic partition. This will make life easier.

Commands:

  1. pvcreate /dev/md0
    makes a physical volume out of the RAID array device
  2. vgcreate VolGroup01 /dev/md0
    creates a new volume group to which we can add logical volumes
  3. Use Redhat Logical Volume Management tool to create partitions on the new device
    • /docs (5 gigs)
    • /home (50 gigs)
    • /etc/secret (10 gigs)
    • /data (399 gigs)
  4. Modified /etc/exports on Algol to export the new partitions
  5. Modified /etc/fstab on the client computers to use the new partitions
  • mkdir /docs
  • mkdir /data
  • added lines to /etc/fstab:
    algol:/data /data nfs defaults 1 1
    algol:/docs /docs nfs defaults 1 1
  1. Un-tarred the backups from /bkup, which I created with the command:
    cd /bkup & tar -czvpf home.tgz /home
  2. Untar by going to desired directory and running:
    tar -xzvpf /bkup/secret.tgz
    Both of these commands put the directory INTO the desired directory. Once unpacked, it’s necessary to move the contents to the proper location.
  3. Modified /etc/cron.weekly/quotacheck.cron to be:
    #!/bin/bash
    # Update the database that keeps track of quotas
    # Created by Mark Knight (4.13.06)
    # Modified by Mark Knight (5.06.06)
    quotaoff -a
    quotacheck -agum
    quotaon -a

    exit 0

  4. Also, had to modify /etc/fstab to add quotas back on to the new mount line for /home

All in all, not that hard. The permissions are all correct, so hopefully this was just as easy & painless as I think it was.

Changes to Algol

OUT OF DATE as of 2008-11-01.

Modified Algol:

  1. Added to /etc/hosts:
    137.22.1.23 boston-ac.its.carleton.edu boston-ac boston
    137.22.6.48 rigel.physics.carleton.edu rigel
    137.22.6.10 alcor.physics.carleton.edu alcor
    137.22.6.11 mizar.physics.carleton.edu mizar
    137.22.6.12 castor.physics.carleton.edu castor
    137.22.6.13 pollux.physics.carleton.edu pollux
    137.22.6.15 canopus.physics.carleton.edu canopus
    137.22.6.13 pollux.physics.carleton.edu pollux
    137.22.6.72 sirius.physics.carleton.edu sirius
    137.22.6.89 mirzam.physics.carleton.edu mirzam
    137.22.6.71 deneb.physics.carleton.edu deneb
  2. Add line to /etc/exports:
    /home @physics(rw,sync,no_root_squash)
  3. Using system-config-services, enable and start nfs daemon

Configure hosts.allow & hosts.deny

hosts.allow:

#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the ‘/usr/sbin/tcpd’ server.
#
sshd: ALL
ALL: .physics.carleton.edu
ALL: LOCAL
ALL: 127.0.0.1

hosts.deny

#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the ‘/usr/sbin/tcpd’ server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
ALL: ALL

Set up group, passwd, shadow

OUT OF DATE as of 2008-11-01.

Put script in cron.daily on Algol:
#!/bin/bash
# Copy /etc/passwd /etc/shadow /etc/groups to /etc/secret directory
# Created by:
# Mark Knight
# 4/25/06
/bin/cp /etc/shadow /etc/secret/
/bin/cp /etc/passwd /etc/secret/
/bin/cp /etc/group /etc/secret/
/bin/chmod -R u=r,go= /etc/secret/
exit 0

Copy script to local /etc/ folder on clients:

#!/bin/bash
# Copy /etc/passwd /etc/shadow /etc/groups from /etc/secret directory
# Created by:
# Mark Knight
# 4/25/06

/bin/cp /etc/secret/shadow /etc/
/bin/cp /etc/secret/passwd /etc/
/bin/cp /etc/secret/group /etc/

/bin/chmod u=rw,go=r /etc/group
/bin/chmod u=rw,go=r /etc/passwd
/bin/chmod u=r,go= /etc/shadow

exit 0
Include client computer in Algol’s /etc/exports, and put /etc/secret in client computer’s NFS mounts in /etc/fstab.

Create a new shared directory

To create the directory “test” in /home, execute as root:

  1. mkdir /home/test
  2. chmod -vcR u=rwx,g=rwxs,o=- /home/test
    OR
    chmod -R 2770 /home/test
    (these two commands both do the same thing)
  3. groupadd testgrp
    (create a new group.)
  4. chgrp -vcR testgrp /home/test
  5. usermod -a -G testgrp knightm
    (add user knightm to the group so he has permissions. Repeat for all users in group. To check, run “groups knightm”)

Adding quotas

OUT OF DATE as of 2008-11-01.

Steps: (from http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/admin-primer/s1-storage-quotas.html)

  1. Modified /etc/fstab entry for /home and rebooted:
    /dev/md0 /home ext3 defaults,usrquota,grpquota 1 2
  2. Run:
    quotacheck -avug

    If that fails, can try:
    quotacheck -avugcm

  3. Added the quotacheck command to /etc/cron.weekly with the script:#!/bin/bash
    # Update the database that keeps track of quotas
    # Created by Mark Knight (4.13.06)
    # Modified by Mark Knight (5.06.06)
    quotaoff -a
    quotacheck -agum
    quotaon -a

    exit 0

  4. Set user quotas:
    1. Command:
      edquota knightm
    2. Disk quotas for user knightm (uid 500):
      Filesystem blocks soft hard inodes soft hard
      /dev/md0 1420 512000 1000000 126 0 0

      This sets a soft limit of 512 MB on the user “knightm,” with a hard limit of 1 gig.
  5. Check limits on quotas with
    repquota /home

Bring-up plan for Algol

OUT OF DATE as of 2008-11-01.

2/4/2009: This is old stuff (old server, old setup). Move to trash? –James Fuller

The plan for making Algol the Arcy replacement:

  1. Register system
  2. Go through current Arcy accounts & purge inactive or old
  3. Get LDAP set up to authenticate off of ITS servers
    1. Set up accounts locally for all users on current Arcturus
  4. Set up email list on lists.carleton.edu
  5. Establish quotas for users (200 megs?)
  6. Install software
    1. IDL – new version
    2. SFTP server
    3. Mathematica
  7. Figure out directory structure (how do users share data?)
  8. Mount network drive script (HOME, COLLAB, COURSES)
  9. Set up AMANDA with SDLT tape drive ::frown!::

Note: we are NOT setting up the mail server.

RAID

OUT OF DATE as of 2008-11-01.

The state of the RAID-1 array can be checked with: lsraid -A -a /dev/md0