User Tools

Site Tools


wiki:grappolo_iii

Adding users accounts

ssh to admin@grappolo

sudo su
groupadd -g 1002 students # add a group of users called students
# add users stu1 stu2 ... stu10 
for i in $(seq 1 10) ; do 
useradd -u $(expr 2000 + $i) -g 1002 -c "Student $i" stu$i 
done
 
# Add password stu1 stu2 ... stu10 and a home directory
for i in $(seq 1 10) ; do  
echo -e "stu$i\nstu$i" | passwd stu$i 
mkdir /home/stu$i ;  done

Then ssh to node1 and node2 and do the same two loops in each node.

Move home from sd cards to usb

sudo blkid
# you find a usb name .... like "B866-7033"
# /dev/sda1: LABEL="NEW VOLUME" UUID="B866-7033" TYPE="vfat" PARTUUID="000ad8bf-01"
sudo nano /etc/fstab
# add the line below to the fstab file
# UUID=B866-7033  /media/tmp vfat   umask=0000,nofail,uid=admin,gid=students   0   0
sudo mount -a
cd /home
sudo cp -rp ./ /media/tmp
sudo umount -f /media/tmp
sudo rm -rf /media/tmp # (get rid of the tmp folder)
sudo mv /home /old_home
sudo mkdir /home
sudo nano /etc/passwd
# To have the admin not confised with students homes, change this 
# admin:x:1001:1001::/home/admin:/bin/bash
# into this
# admin:x:1001:1001::/old_home/admin:/bin/bash

Data storage

Objectives

  • Automount 3 USB drives in grappolo
  • Automount 4 USB drives in node 1 and 4 in node 2
  • move the home directory of all users from the sd card to the usb drive 1 of grappolo
You need to insert all usb stick in your rasppi. (3 usb in grappolo, 4 in node1 and 4 in node2

ssh to grappolo as admin.

sudo blkid # look at the hardware code of your usb drives
admin@grappolo:~ $                                                                 
#[sudo] password for admin: 
#/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="7771-B0BB" TYPE="vfat" PARTUUID="000e2f78-01"
#/dev/mmcblk0p2: UUID="c7f58a52-6b71-4cea-9338-65f3b8af27bf" TYPE="ext4" PARTUUID="000e2f78-02"
#/dev/sda1: LABEL="NEW VOLUME" UUID="B866-7033" TYPE="vfat" PARTUUID="000ad8bf-01"
#/dev/sdb: LABEL="UDISK" UUID="003B-0FEF" TYPE="vfat"
#/dev/mmcblk0: PTUUID="000e2f78" PTTYPE="dos"
 
 
sudo nano /etc/fstab
# add the following lines to /etc/fstab 
#UUID=B866-7033  /home           vfat    umask=0000,nofail,uid=admin,gid=students   0   0
#UUID=003B-0FEF  /media/USB1     vfat    umask=0000,nofail,uid=admin,gid=students   0   0
#UUID=018C-1CA9  /media/USB2     vfat    umask=0000,nofail,uid=admin,gid=students   0   0
# and remove this line
#UUID=B866-7033  /media/tmp vfat   umask=0000,nofail,uid=admin,gid=students   0   0
for i in $(seq 1 2) ; do   mkdir /media/USB$i ;  done
sudo mount -a

Then add the for usb drive to node1

ssh node1
sudo blkid
#dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="7771-B0BB" TYPE="vfat" PARTUUID="000e2f78-01"
#/dev/mmcblk0p2: UUID="c7f58a52-6b71-4cea-9338-65f3b8af27bf" TYPE="ext4" PARTUUID="000e2f78-02"
#/dev/sdb: LABEL="UDISK" UUID="0214-AFDB" TYPE="vfat"
#/dev/sdd: LABEL="UDISK" UUID="0026-306D" TYPE="vfat"
#/dev/sdc: UUID="90C7-6ED0" TYPE="vfat"
#/dev/sda: LABEL="UDISK" UUID="0035-39DA" TYPE="vfat"
#/dev/mmcblk0: PTUUID="000e2f78" PTTYPE="dos"
# retain the UUID for sda, sdb, sdc and add
 
sudo nano /etc/fstab # so you can add the following lines
UUID=90C7-6ED0  /media/USB1 vfat umask=0000,nofail,uid=admin,gid=students   0   0
UUID=0026-306D  /media/USB2 vfat umask=0000,nofail,uid=admin,gid=students   0   0
UUID=0214-AFDB  /media/USB3 vfat umask=0000,nofail,uid=admin,gid=students   0   0
UUID=0035-39DA  /media/USB4 vfat umask=0000,nofail,uid=admin,gid=students   0   0
for i in $(seq 1 4) ; do   mkdir /media/USB$i ;  done
sudo mount -a
Now do the same for node2 adding UUID of usb drives in the /etc/fstab file

Add user to grid engine user list

qconf -auser
#replace template with stu1

Repeat the above to all users 1 2 to 10 and admin more info on grid engine user accounts here.

wiki/grappolo_iii.txt · Last modified: 2017/12/05 22:53 (external edit)