Computing Tips and Tricks
Jump to navigation
Jump to search
- ===Screen Function===
All the scanning processes should be started in a screen function in order to be able to access from everywhere. In addition, it's very easy to kill an process when it hangs (just kill the screen).
- screen -S myscreen : create a new screen - screen -r : reattach to the screen - screen -x : additionally attach to the screen - inside the screen in order to deattach: Ctrl A D - inside the screen to close: exit
- ===Alias===
To put in your personal .bashrc file
alias 46='ssh -X scanner@lheppc46.unibe.ch' #pc46 alias 56='ssh -X scanner@lheppc56.unibe.ch' #pc56 alias 13='ssh -X scanner@lhepsun13.unibe.ch' #pcsun13
alias rm1='rdesktop -g 1272x930 -k de-ch -u scanner lheppc9' #mic1 remonte desktop alias rm1l='rdesktop -g 2200x930 -k de-ch -u scanner lheppc9' #mic1 remonte desktop large alias rm2='rdesktop -g 1272x930 -k de-ch -u scanner lheppc45' #mic2 remonte desktop alias rm2l='rdesktop -g 2200x930 -k de-ch -u scanner lheppc45' #mic2 remonte desktop large alias rm3='rdesktop -g 1272x930 -k de-ch -u scanner lheppc16' #mic3 remonte desktop alias rm3l='rdesktop -g 2200x930 -k de-ch -u scanner lheppc16' #mic3 remonte desktop large alias rm4='rdesktop -g 1272x930 -k de-ch -u scanner lheppc28' #mic4 remonte desktop alias rm4l='rdesktop -g 2200x930 -k de-ch -u scanner lheppc28' #mic4 remonte desktop large alias rm5='rdesktop -g 1272x930 -k de-ch -u scanner lheppc30' #mic5 remonte desktop alias rm5l='rdesktop -g 2200x930 -k de-ch -u scanner lheppc30' #mic5 remonte desktop large
- ===NFS disks===
To access to a directory through NFS.
Example : You want to have access to /terabig from lheppc46 on lheppc56 In this case lheppc46 is the server and lheppc56 is the client
Server configuration : - As superuser open /etc/exports - Add /terabig lheppc56(rw,all_squash,anonuid=1000,anongid=100,sync) ( more details on [[1]] in french :-) ) Remark : UID of scanner is 1000 & GUID of users is 100 - Do exportfs -ra to take into account your modifications - Start the NFS server : /etc/init.d/nfsserver start - If all is fine go to Client configuration , if not I'm sorry for you
Client configuration : - As superuser mkdir /terabig_lheppc46 - Open /etc/fstab ( TAKE CARE of this file !!!! ) - Add lheppc46:/terabig /terabig_lheppc46 nfs rw,hard,intr,timeo=10 0 0 ( more details on [[2]] ) - Start NFS client : /etc/init.d/nfs start - Now you should see the lheppc46's data on /terabig_lheppc46 , if not I'm sorry for you
- ===Mount lhepsun6 & lhepsun15 -> WORK IN PROGRESS ===
SAMBA :
As superuser do :
mount -t smbfs //lhepsun6/share /terabig/scan/lhepsun6
For the moment no rw permissions, I have to check why
Same problem with
mount -t cifs //lhepsun6/share /terabig/scan/lhepsun6
And next line in /etc/fstab doesn't work
//130.92.139.16/share /terabig/scan/lhepsun6 smbfs rw,user,username=user,password=pass 0 0
Remark : The asked password is the password login for the user scanner
- === Install BackupPC ===
File:Howto backuppc.pdf (in french)
mount and copy to terastation as backup
mount disk to pc37 or pc41
su mount -t cifs //130.92.139.16/share /terabig/scan/lhepsun6
create list of backup files, e.g. all 2008 published events, divided by mic1 and mic2 (pc41) and 3,4,5 (pc37)
pc46 /terabig/www/cgi-bin/EventTracer2008> root -l check_tracer.C (here you can define your output list by yourself) bricklist_lhepsun6_pc41() -> list saved in plots/bricklist_lhepsun6_pc41.txt bricklist_lhepsun6_pc37() -> list saved in plots/bricklist_lhepsun6_pc37.txt
run backup
execute bricklist_lhepsun6_pc41.txt on pc41 execute bricklist_lhepsun6_pc37.txt on pc37
modify etc/fstab : to get the right of writing to scanner
LABEL=/ / ext3 defaults 1 1 /dev/sda2 /terabig ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-sda3 swap swap defaults 0 0 130.92.139.96:/terabig/scan /terabig/scan/lheppc46 nfs rw,hard,intr,timeo=10 0 0 130.92.139.87:/terabig/scan /terabig/scan/lheppc37 nfs rw,hard,intr,timeo=10 0 0 130.92.139.156:/terabig/scan /terabig/scan/lheppc56 nfs rw,hard,intr,timeo=10 0 0 //130.92.139.16/share /terabig/scan/lhepsun6 cifs defaults,uid=500,gid=100 0 0
mount -a : mounts everything that is in fstab
BACKUP scanning data on terastation
- mount disc (should be already done)
lhepsun6 130.92.139.16 : various stuff on there lhepsun15 130.92.139.25: -> scanning data under /share/scan lheppc7 -> from ATLAS: mount lheppc7.unibe.ch/ngse5 lheppc7
su modify /etc/fstab in order to put the right to scanner for writing, add line like //130.92.139.16/share /terabig/scan/lhepsun6 cifs defaults,uid=500,gid=100 0 0 then mount everyting new: mount -a
the backup is done in the following steps
BE CAREFULL, YOU COULD DELETE STUFF!!!
- Decide what you want to backup
- Lheppc41 and lheppc37 are separated in the backup procedure. - Lheppc41 (mic1 and mic2) - Lheppc37 (mic3, mic4 and mic5) - Go go to corresponding directory: /terabig/scan/BACKUP (e.g. if you want to backup stuff from mic3, you go to lheppc37 /terabig/scan/BACKUP) - There is a file called manual_list.txt. In this file, all the bricks you are going to backup should be in there. The format is "brickid" "mic". - Create the list of bricks with the corresponding mic that you want to backup. You might can use the help of EventTracer.root file. - Once the list is ready, those bricks will be backup.
- Create processing list
- In /terabig/scan/BACKUP run root -l manual_list.C - This will produce you 4 files (rsync.sh, remove.txt, symlink.sh and toAdd.txt) - This process crosschecks with the BACKUP_OK_LIST.txt. This file includes the bricks that are already in backup or that you don't want to backup) - For special bricks that are not labeled the standard way, you have to make a manual list (the list of those bricks is under BACKUP_NOLINK_LIST.txt -> no simlink is created for those)
- Run manual_list_rsync.sh
- This file contains all the sync commands - This process syncronizes the data to the location mentioned int he command - This can take a long time and fill up the network traffic - chmod 777 manual_list_rsync.sh in order to make the list executable
- Run manual_list_remove.txt
- BE CAREFULL, YOU ARE ABOUT TO DELETE DATA - Copy file: cp manual_list_remove.txt manual_list_remove.sh (security reason not sh in first place) - chmod 777 manual_list_remove.txt in order to make the list executable - Run manual_list_remove.sh (this deletes the files)
- Run manual_list_symlink.sh
- Run manual_list_symlink.sh that creates the simlinks from the backup to the original place
- Add manual_list_toAdd.txt
- Add the content of manual_list_toAdd.txt to BACKUP_OK_LIST.txt so that we know that we did backup this data
- Exit working space clean and clear
- Open manual_list.txt and delete content. The next backup put again bricks inside here. - Make a folder backupYEARMONTHDAY and put all files insdie (except BACKUP_OK_LIST.txt, BACKUP_NOLINK_LIST.txt, manual_list.C and manual_list.txt)
BACKUP TO DO
- Backup data from pc46 and pc56. pc56 maybe already transferred -> to be checked.
- Install new backups server that we get from ATLAS