Table of Contents
Athena
all but grads and caplabs moved!
Dec 2007 data move to athena
move yongc
copy yongc to athena rsync -av yongc from alexandria to athena:/export/caplabhomes/yongc shrink athena:/export/caplabhomes/yongc
lvreduce ??
Change the entry in AD for unix home direcotry to
/home/caplabhomes/yongc
get rid of yongc on alexandria
rm -rf alexandria:/export/facultystaff/yongc
get rid of yongc on athena:/export/facultystaff
rm -rf athena:/export/facultystaff/yongc <--in progress
move facultystaff
Shrink athena:/export/facultystaff
lvreduce?? rsync -av --delete alexandria:/export/facultystaff/ athena:/export/facultystaff
copy the other partitions
rsync -av --delete alexandria:/export/undergrad/ athena:/export/undergrad rsync -av --delete alexandria:/export/video/ athena:/export/video rsync -av --delete alexandria:/export/structures/ athena:/export/structures
set each to ro on alexandria and move them
change auto.home to athena for each partition
other hints
Check filesystem blocksize
dumpe2fs -h /dev/AthenaData2/facultystaff
Check last file system check
find /dev/AlexandriaData[12]/* -exec echo DEVICE {} \; -exec dumpe2fs -h {} \; |grep -e DEVICE -e "Next check after"
or, http://www.linuxaria.com/howto/check-your-disk-usage-with-df-and-du?lang=en
df | awk '{print $1}' | grep dev\/ | xargs -i tune2fs -l {}| egrep "mounted|Next"
Disk layout
| Device | Physical Volume | Volume Group | Logical Volume | Size | Block Device | dev | Mounted on |
|---|---|---|---|---|---|---|---|
| /dev/sda1 | G | /boot | |||||
| /dev/sda2 | G | / | |||||
| /dev/sda3 | G | /tmp | |||||
| /dev/sda4 | G | extended | |||||
| /dev/sda5 | G | /var | |||||
| /dev/sda6 | 4G | swap | |||||
| /dev/sdb1 | /dev/sdb1 | AthenaData1 | 854.03G | lvm | |||
| /dev/sdc1 | /dev/sdc1 | AthenaData1 | 894.04G | lvm | |||
| /dev/sdd1 | /dev/sde1 | AthenaData1 | 1.36T | lvm | |||
| /dev/sde1 | /dev/sde1 | AthenaData1 | 1.36T | lvm |
to run tdm2, the 3ware raid controler monitor, use
https://localhost:888 from athena or
https://128.173.188.27:888 from hephaistos
Athena (SL6)
Disk layout
| /dev/sda | ||
| /dev/sda1 | /dev/md0 | RAID1 |
| /dev/sda2 | /dev/md1 | RAID1 |
| /dev/sda3 | /dev/md2 | RAID1 |
| /dev/sda5 | /dev/md3 | RAID1 |
| /dev/sda6 | /dev/md4 | RAID1 |
| /dev/sda7 | /dev/md5 | RAID0 |
| – | ||
| /dev/sdb | ||
| /dev/sdb1 | /dev/md0 | RAID1 |
| /dev/sdb2 | /dev/md1 | RAID1 |
| /dev/sdb3 | /dev/md2 | RAID1 |
| /dev/sdb5 | /dev/md3 | RAID1 |
| /dev/sdb6 | /dev/md4 | RAID1 |
| /dev/sdb7 | /dev/md5 | RAID0 |
| – | ||
| /dev/md0 | /boot | 200M |
| /dev/md1 | / | 50G |
| /dev/md2 | /var | 20G |
| /dev/md3 | /tmp | 20G |
| /dev/md4 | /l | 50G |
| /dev/md5 | swap | 20G |
| – | ||
| The following will be replaced with 2T drives | ||
| /dev/sdc | 40G | |
| /dev/sdc1 | Athenadata40G | lvm |
| /dev/sdd | 917G | |
| /dev/sdd1 | AthenaData1-7T | lvm |
| /dev/sde | 960G | |
| /dev/sde1 | AthenaData1-7T | lvm |
| /dev/sdf | 1.5T | |
| /dev/sdf1 | AthenaData2-7T | lvm |
| /dev/sdg | 1.5T | |
| /dev/sdg1 | AthenaData2-7T | lvm |
| - | ||
| Athenadata40G | ||
| Athenadata1-7T | ||
| Athenadata2-7T | ||
| - | ||
http://fedoraproject.org/wiki/Scsi-target-utils_Quickstart_Guide#Allow_all_initiators
Setup:
yum install scsi-target-utils
open up port 3260
vim /etc/sysconfig/iptables service iptables restart iptables -L
Create an LVM partition
vgscan pvdisplay vgcreate AthenaData1_7T /dev/sdd1 /dev/sde1 vgcreate AthenaData2_7T /dev/sdf1 /dev/sdg1 vgcreate AthenaData40g /dev/sdc1 lvcreate -L39G -nathena40g AthenaData40g service tgtd start tgtadm --lld iscsi --mode target --op show tgtadm --lld iscsi --mode target --op new --tid=1 --targetname iqn.aoe.vt.edu:for.all tgtadm --lld iscsi --mode target --op show tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/mapper/AthenaData40g-athena40g tgtadm --lld iscsi --mode target --op unbind --tid 1 -I ALL tgtadm --lld iscsi --mode target --op bind --tid 1 -I 128.173.188.43 tgtadm --lld iscsi --mode target --op show tgtadm --lld iscsi --mode target --op unbind --tid 1 -I 128.173.188.43 tgtadm --lld iscsi --mode target --op bind --tid 1 -I 192.168.2.29 tgtadm --lld iscsi --mode target --op bind --tid 1 -I 192.168.2.43 tgtadm --lld iscsi --mode account --op show tgtadm --lld iscsi --mode target --op show lvcreate -L2.7T -nathena2_7t AthenaData2_7T tgtadm --lld iscsi --mode target --op new --tid=2 --targetname iqn.AthenaData2-7T.aoe.vt.edu:for.all tgtadm --lld iscsi --mode target --op delete --tid=2 tgtadm --lld iscsi --mode target --op new --tid=2 --targetname iqn.AthenaData2_7T.aoe.vt.edu:for.all tgtadm --lld iscsi --mode target --op unbind --tid 2 -I ALL tgtadm --lld iscsi --mode target --op bind --tid 2 -I 192.168.2.29
To Delete first find the target ID number, then remove the target, then remove the partition:
tgtadm --lld iscsi --op show --mode target tgtadm --lld iscsi --op delete --mode target --tid 2 lvdisplay lvchange -a n /dev/AthenaData40g/athena40g (optional) lvremove /dev/AthenaData40g/athena40g vgdisplay -v vgremove AthenaData40g pvdisplay -m pvremove /dev/sdc1
http://www.cyberciti.biz/tips/howto-setup-linux-iscsi-target-sanwith-tgt.html
Setup initiator:
yum install iscsi-initiator-utils iscsiadm --mode discovery --type sendtargets --portal 192.168.2.27 iscsiadm --mode node --targetname iqn.aoe.vt.edu:for.all --portal 192.168.2.27:3260 --login iscsiadm --mode node grep -v FIREWALL /var/log/messages|tail fdisk -l fdisk /dev/sde mkfs.ext4 /dev/sde1 mkdir -p /iscsi/athena40g mount /dev/sde1 /iscsi/athena40g/ cd /iscsi/athena40g/ ls df -h iscsiadm --mode discovery --type sendtargets --portal 192.168.2.27 iscsiadm --mode node --targetname iqn.AthenaData2_7T.aoe.vt.edu:for.all --portal 192.168.2.27:3260 --login iscsiadm --mode node --targetname iqn.AthenaData2_7T.aoe.vt.edu:for.all --portal 192.168.2.27:3260 --logout iscsiadm --mode node --op delete
To use lvm on initiator:
pvcreate /dev/sdf pvdisplay vgcreate AthenaDataTest /dev/sdf pvdisplay lvcreate -L2.6T -nathenatest AthenaDataTest mkfs.ext4 /dev/mapper/AthenaDataTest-athenatest mount /dev/mapper/AthenaDataTest-athenatest /iscsi/athena2_7T/
Alexandria
Alexandria Disk layout
2 160G main drives RAID-1
1 Apple XRAID with 14 250GB with two hardware RAID-5's
Old configuration:
| Device | Physical Volume | Volume Group | Logical Volume | Size | Block Device | dev | Mounted on |
|---|---|---|---|---|---|---|---|
| /dev/sd?? | /dev/md2 | G | |||||
| /dev/sd?? | /dev/md2 | G | |||||
| /dev/md2 | AlexandriaRoot | 150G | |||||
| LogVolRoot | 20G | 253:0 | /dev/md2 | / | |||
| LogVolExport | 85G | 253:1 | /dev/AlexandriaRoot/LogVolExport | /export | |||
| LogVolTmp | 20G | 253:2 | /dev/AlexandriaRoot/LogVolRoot | /tmp | |||
| LogVolVar | 20G | 253:3 | /dev/AlexandriaRoot/LogVolVar | /var | |||
| LogVolSwap | 4G | 253:4 | swap | swap | |||
| /dev/sda1 | AlexandriaData | 1.37T | |||||
| /dev/sdb1 | AlexandriaData | 1.37T | |||||
| LogVol | 645G | 253:5 | facultystaff | /export/facultystaff | |||
| LogVol | 500G | 253:6 | grad | /export/grad | |||
| LogVol | 125G | 253:7 | apps | /export/apps | |||
| LogVol | 150G | 253:8 | misc | /export/misc | |||
| LogVol | 500G | 253:9 | grad2 | /export/grad2 | |||
| LogVol | 75G | 253:10 | sssl | /export/sssl | |||
| LogVol | 200G | 253:11 | structures | /export/structures | |||
| LogVol | 300G | 253:12 | sysadmin | /export/sysadmin | |||
| LogVol | 100G | 253:13 | undergrad | /export/undergrad | |||
| LogVol | 25G | 253:14 | design | /export/design | |||
| LogVol | 150G | 253:15 | video | /export/video | |||
Current Configuration for alexandria (12-6-2011):
| Device | Physical Volume | Volume Group | Logical Volume | Size | Block Device | dev | Mounted on |
|---|---|---|---|---|---|---|---|
| /dev/md1 | 101.89 MiB | /boot | |||||
| /dev/hda1 | |||||||
| /dev/hdc1 | |||||||
| /dev/md2 | 148.95 GiB | lvm | |||||
| /dev/hda2 | |||||||
| /dev/hdc2 | |||||||
| /dev/md2 | AlexandriaRoot | 148.95GB | |||||
| AlexandriaRoot | 20.00GB | 253:0 | /dev/AlexandriaRoot/LogVolRoot | / | |||
| AlexandriaRoot | 20.00GB | 253:2 | /dev/AlexandriaRoot/LogVolTmp | /tmp | |||
| AlexandriaRoot | 20.00GB | 253:3 | /dev/AlexandriaRoot/LogVolVar | /var | |||
| AlexandriaRoot | 4.00GB | 253:4 | /dev/AlexandriaRoot/LogVolSwap | ||||
| AlexandriaRoot | 84.94GB | 253:1 | /dev/AlexandriaRoot/LogVolExport | /export | |||
| /dev/sda | AlexandriaData1 | 2.73TB | |||||
| AlexandriaData1 | 100.00GB | 253:35 | /dev/AlexandriaData1/structures2 | /export/structures2 | |||
| AlexandriaData1 | 1.00GB | 253:33 | /dev/AlexandriaData1/facultystaff | /export/facultystaff | |||
| AlexandriaData1 | 1.00GB | 253:34 | /dev/AlexandriaData1/grad | /export/grad | |||
| AlexandriaData1 | 200.00GB | 253:19 | /dev/AlexandriaData1/facultystaff1 | /export/facultystaff1 | |||
| AlexandriaData1 | 200.00GB | 253:20 | /dev/AlexandriaData1/facultystaff2 | /export/facultystaff2 | |||
| AlexandriaData1 | 200.00GB | 253:21 | /dev/AlexandriaData1/facultystaff3 | /export/facultystaff3 | |||
| AlexandriaData1 | 200.00GB | 253:22 | /dev/AlexandriaData1/grad1 | /export/grad1 | |||
| AlexandriaData1 | 200.00GB | 253:23 | /dev/AlexandriaData1/grad2 | /export/grad2 | |||
| AlexandriaData1 | 200.00GB | 253:24 | /dev/AlexandriaData1/grad3 | /export/grad3 | |||
| AlexandriaData1 | 200.00GB | 253:25 | /dev/AlexandriaData1/grad4 | /export/grad4 | |||
| AlexandriaData1 | 200.00GB | 253:26 | /dev/AlexandriaData1/grad5 | /export/grad5 | |||
| AlexandriaData1 | 200.00GB | 253:27 | /dev/AlexandriaData1/structures | /export/structures | |||
| AlexandriaData1 | 200.00GB | 253:28 | /dev/AlexandriaData1/sysadmin | /export/sysadmin | |||
| AlexandriaData1 | 200.00GB | 253:29 | /dev/AlexandriaData1/softdist | /export/softdist | |||
| AlexandriaData1 | 200.00GB | 253:31 | /dev/AlexandriaData1/apps | ||||
| AlexandriaData1 | 200.00GB | 253:32 | /dev/AlexandriaData1/misc | /export/misc | |||
| AlexandriaData1 | 75.00GB | 253:30 | /dev/AlexandriaData1/sssl | /export/sssl | |||
| /dev/sdb | AlexandriaData2 | 2.73TB | |||||
| AlexandriaData2 | 100.00GB | 253:14 | /dev/AlexandriaData2/nsllab | /export/nsllab | |||
| AlexandriaData2 | 100.00GB | 253:15 | /dev/AlexandriaData2/schetz | /export/schetz | |||
| AlexandriaData2 | 100.00GB | 253:17 | /dev/AlexandriaData2/farhoodlab | /export/farhoodlab | |||
| AlexandriaData2 | 100.00GB | 253:18 | /dev/AlexandriaData2/seidellab | /export/seidellab | |||
| AlexandriaData2 | 100.00GB | 253:5 | /dev/AlexandriaData2/undergrad | /export/undergrad | |||
| AlexandriaData2 | 150.00GB | 253:7 | /dev/AlexandriaData2/video | /export/video | |||
| AlexandriaData2 | 200.00GB | 253:10 | /dev/AlexandriaData2/roycfd | /export/roycfd | |||
| AlexandriaData2 | 200.00GB | 253:13 | /dev/AlexandriaData2/facultystaff4 | /export/facultystaff4 | |||
| AlexandriaData2 | 200.00GB | 253:9 | /dev/AlexandriaData2/neucfd | /export/neucfd | |||
| AlexandriaData2 | 250.00GB | 253:8 | /dev/AlexandriaData2/backup | /export/backup | |||
| AlexandriaData2 | 25.00GB | 253:16 | /dev/AlexandriaData2/depthead | /export/depthead | |||
| AlexandriaData2 | 25.00GB | 253:6 | /dev/AlexandriaData2/design | /export/design | |||
| AlexandriaData2 | 450.00GB | 253:12 | /dev/AlexandriaData2/diskhogs | /export/diskhogs | |||
| AlexandriaData2 | 50.00GB | 253:36 | /dev/AlexandriaData2/sorcer | /export/sorcer | |||
| AlexandriaData2 | 550.00GB | 253:11 | /dev/AlexandriaData2/lab7 | /export/lab7 | |||
alexandria2 configuration
| Device | Physical Volume | Volume Group | Logical Volume | Size | Block Device | dev | Mounted on |
|---|---|---|---|---|---|---|---|
| /dev/md1 | 101.89 MiB | /boot | |||||
| /dev/sdc1 | |||||||
| /dev/sdd1 | |||||||
| /dev/md2 | 79.89 GiB | lvm | |||||
| /dev/sdc2 | |||||||
| /dev/sdd2 | |||||||
| /dev/md2 | VolGroupSystem | 79.89 GiB | |||||
| VolGroupSystem | 19.53GiB | 253:17 | /dev/VolGroupSystem/LogVolTmp | ||||
| VolGroupSystem | 19.53GiB | 253:18 | /dev/VolGroupSystem/LogVolVar | ||||
| VolGroupSystem | 29.28GiB | 253:0 | /dev/VolGroupSystem/LogVolRoot | ||||
| VolGroupSystem | 4.00GiB | 253:1 | /dev/VolGroupSystem/LogVolSwap | ||||
| VolGroupSystem | 992.00MiB | 253:19 | /dev/VolGroupSystem/LogVolExport | ||||
| /dev/sda | Alexandria2Data1 | 2.73TB | |||||
| Alexandria2Data1 | 100.00GiB | 253:34 | /dev/Alexandria2Data1/structures2 | ||||
| Alexandria2Data1 | 1.00GiB | 253:35 | /dev/Alexandria2Data1/facultystaff | ||||
| Alexandria2Data1 | 1.00GiB | 253:36 | /dev/Alexandria2Data1/grad | ||||
| Alexandria2Data1 | 200.00GiB | 253:20 | /dev/Alexandria2Data1/facultystaff1 | ||||
| Alexandria2Data1 | 200.00GiB | 253:21 | /dev/Alexandria2Data1/facultystaff2 | ||||
| Alexandria2Data1 | 200.00GiB | 253:22 | /dev/Alexandria2Data1/facultystaff3 | ||||
| Alexandria2Data1 | 200.00GiB | 253:23 | /dev/Alexandria2Data1/grad1 | ||||
| Alexandria2Data1 | 200.00GiB | 253:24 | /dev/Alexandria2Data1/grad2 | ||||
| Alexandria2Data1 | 200.00GiB | 253:25 | /dev/Alexandria2Data1/grad3 | ||||
| Alexandria2Data1 | 200.00GiB | 253:26 | /dev/Alexandria2Data1/grad4 | ||||
| Alexandria2Data1 | 200.00GiB | 253:27 | /dev/Alexandria2Data1/grad5 | ||||
| Alexandria2Data1 | 200.00GiB | 253:28 | /dev/Alexandria2Data1/structures | ||||
| Alexandria2Data1 | 200.00GiB | 253:29 | /dev/Alexandria2Data1/sysadmin | ||||
| Alexandria2Data1 | 200.00GiB | 253:30 | /dev/Alexandria2Data1/softdist | ||||
| Alexandria2Data1 | 200.00GiB | 253:31 | /dev/Alexandria2Data1/apps | ||||
| Alexandria2Data1 | 200.00GiB | 253:33 | /dev/Alexandria2Data1/misc | ||||
| Alexandria2Data1 | 75.00GiB | 253:32 | /dev/Alexandria2Data1/sssl | ||||
| /dev/sdb | Alexandria2Data2 | 2.73TB | |||||
| Alexandria2Data2 | 100.00GiB | 253:11 | /dev/Alexandria2Data2/nsllab | ||||
| Alexandria2Data2 | 100.00GiB | 253:12 | /dev/Alexandria2Data2/schetz | ||||
| Alexandria2Data2 | 100.00GiB | 253:14 | /dev/Alexandria2Data2/farhoodlab | ||||
| Alexandria2Data2 | 100.00GiB | 253:15 | /dev/Alexandria2Data2/seidellab | ||||
| Alexandria2Data2 | 100.00GiB | 253:2 | /dev/Alexandria2Data2/undergrad | ||||
| Alexandria2Data2 | 150.00GiB | 253:4 | /dev/Alexandria2Data2/video | ||||
| Alexandria2Data2 | 200.00GiB | 253:10 | /dev/Alexandria2Data2/facultystaff4 | ||||
| Alexandria2Data2 | 200.00GiB | 253:6 | /dev/Alexandria2Data2/neucfd | ||||
| Alexandria2Data2 | 200.00GiB | 253:7 | /dev/Alexandria2Data2/roycfd | ||||
| Alexandria2Data2 | 250.00GiB | 253:5 | /dev/Alexandria2Data2/backup | ||||
| Alexandria2Data2 | 25.00GiB | 253:13 | /dev/Alexandria2Data2/depthead | ||||
| Alexandria2Data2 | 25.00GiB | 253:3 | /dev/Alexandria2Data2/design | ||||
| Alexandria2Data2 | 450.00GiB | 253:9 | /dev/Alexandria2Data2/diskhogs | ||||
| Alexandria2Data2 | 50.00GiB | 253:16 | /dev/Alexandria2Data2/sorcer | ||||
| Alexandria2Data2 | 550.00GiB | 253:8 | /dev/Alexandria2Data2/lab7 | ||||
Commands
Commands used to mirror data on AthenaData2 Partition
pvcreate /dev/sda (example, not really used.) vgcreate AthenaData2 /dev/sda (example, not really used.)
lvcreate -L300G -nsysadmin AthenaData2 mke2fs /dev/AthenaData2/sysadmin tune2fs -j /dev/AthenaData2/sysadmin
To enable the ext4 features on an existing ext3 filesystem, use the command:
tune2fs -O extents,uninit_bg,dir_index /dev/DEV
WARNING: Once you run this command, the filesystem will no longer be mountable using the ext3 filesystem!
After running this command (specifically, after setting the uninit_bg parameter), you MUST run fsck to fix up some on-disk structures that tune2fs has modified:
e2fsck -fDC0 /dev/DEV
Mount the drive
mkdir /export/sysdamin mount /dev/AthenaData2/sysadmin /export/sysadmin rsync -avt --delete alexandria:/export/sysadmin /export/sysdamin umount /export/sysadmin
lvextend -L350 /dev/AlexandriaData2/caplab
add these to /etc/fstab
/dev/AthenaData2/facultystaff /export/video ext3 defaults 1 2 /dev/AthenaData2/design /export/design ext3 defaults 1 2 /dev/AthenaData2/undergrad /export/undergrad ext3 defaults 1 2 /dev/AthenaData2/sysadmin /export/sysadmin ext3 defaults 1 2 /dev/AthenaData2/structures /export/structures ext3 defaults 1 2 /dev/AthenaData2/sssl /export/sssl ext3 defaults 1 2 /dev/AthenaData2/grad2 /export/grad2 ext3 defaults 1 2 /dev/AthenaData2/misc /export/misc ext3 defaults 1 2 /dev/AthenaData2/apps /export/apps ext3 defaults 1 2 /dev/AthenaData2/grad /export/grad ext3 defaults 1 2 /dev/AthenaData2/facultystaff /export/facultystaff ext3 defaults 1 2
mount -a
set permissions to match alexandria
chmod 770 sssl/ chmod 770 structures/ chmod g+s structures/ chmod 775 sysadmin/ chmod g+s sysadmin/ chmod 770 video/ chmod g+s video chgrp SSSL-Users sssl chgrp Structures structures/ chgrp bigwheel sysadmin/ chgrp bigwheel video/
service nfs reload
alexandria rebuild
ip 128.173.188.43
[root@alexandria yp]# mount /dev/md4 on / type ext2 (rw) none on /proc type proc (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbdevfs on /proc/bus/usb type usbdevfs (rw) none on /dev/shm type tmpfs (rw) /dev/md0 on /boot type ext3 (rw) /dev/md3 on /var type ext3 (rw) /dev/md1 on /tmp type ext3 (rw) /dev/md5 on /export type ext3 (rw) /dev/vg0/apps on /export/apps type ext3 (rw) /dev/vg0/design on /export/design type ext3 (rw) /dev/vg0/facultystaff on /export/facultystaff type ext3 (rw) /dev/vg0/grad on /export/grad type ext3 (rw) /dev/vg0/grad2 on /export/grad2 type ext3 (rw) /dev/vg0/misc on /export/misc type ext3 (rw) /dev/vg0/sssl on /export/sssl type ext3 (rw) /dev/vg0/structures on /export/structures type ext3 (rw) /dev/vg0/sysadmin on /export/sysadmin type ext3 (rw) /dev/vg0/undergrad on /export/undergrad type ext3 (rw) /dev/vg0/video on /export/video type ext3 (rw) automount(pid2309) on /home type autofs (rw,fd=4,pgrp=2309,minproto=2,maxproto=4) /export/grad on /home/grad type none (rw,bind) /export/facultystaff on /home/facultystaff type none (rw,bind) /export/misc on /home/misc type none (rw,bind) athena.aoe.vt.edu:/export/lab7 on /home/lab7 type nfs (rw,nosuid,intr,addr=128.173.188.27) /export/sysadmin on /home/sysadmin type none (rw,bind) /export/structures on /home/structures type none (rw,bind) /export/grad2 on /home/grad2 type none (rw,bind) athena.aoe.vt.edu:/export/diskhogs on /home/diskhogs type nfs (rw,nosuid,intr,addr=128.173.188.27)
[root@alexandria yp]# fdisk -l Disk /dev/sda: 1505.9 GB, 1505973239808 bytes 64 heads, 32 sectors/track, 1436208 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sda1 1 1436208 1470676976 8e Linux LVM Disk /dev/sdb: 1505.9 GB, 1505973239808 bytes 64 heads, 32 sectors/track, 1436208 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 1436208 1470676976 8e Linux LVM Disk /dev/md0: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md0 doesn't contain a valid partition table Disk /dev/md1: 10.7 GB, 10733879296 bytes 2 heads, 4 sectors/track, 2620576 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md1 doesn't contain a valid partition table Disk /dev/md2: 2146 MB, 2146697216 bytes 2 heads, 4 sectors/track, 524096 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md3: 21.4 GB, 21476081664 bytes 2 heads, 4 sectors/track, 5243184 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md3 doesn't contain a valid partition table Disk /dev/md4: 21.4 GB, 21476081664 bytes 2 heads, 4 sectors/track, 5243184 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md4 doesn't contain a valid partition table Disk /dev/md5: 64.0 GB, 64058359808 bytes 2 heads, 4 sectors/track, 15639248 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md5 doesn't contain a valid partition table Disk /dev/hdc: 120.0 GB, 120000000000 bytes 255 heads, 63 sectors/track, 14589 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdc1 * 1 13 104391 fd Linux raid autodetect /dev/hdc2 14 2624 20972857+ fd Linux raid autodetect /dev/hdc3 2625 5235 20972857+ fd Linux raid autodetect /dev/hdc4 5236 14589 75136005 f Win95 Ext'd (LBA) /dev/hdc5 5236 6540 10482381 fd Linux raid autodetect /dev/hdc6 6541 6801 2096451 fd Linux raid autodetect /dev/hdc7 6802 14589 62557078+ fd Linux raid autodetect Disk /dev/hda: 120.0 GB, 120000000000 bytes 255 heads, 63 sectors/track, 14589 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 fd Linux raid autodetect /dev/hda2 14 2624 20972857+ fd Linux raid autodetect /dev/hda3 2625 5235 20972857+ fd Linux raid autodetect /dev/hda4 5236 14589 75136005 f Win95 Ext'd (LBA) /dev/hda5 5236 6540 10482381 fd Linux raid autodetect /dev/hda6 6541 6801 2096451 fd Linux raid autodetect /dev/hda7 6802 14589 62557078+ fd Linux raid autodetect
/etc/fstab
# Special none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/md2 swap swap defaults 0 0 # Normal /dev/md0 /boot ext3 defaults 1 2 /dev/md4 / ext2 defaults 1 1 /dev/md3 /var ext3 defaults 1 2 /dev/md1 /tmp ext3 defaults 1 2 # Data /dev/md5 /export ext3 defaults 1 2 /dev/vg0/apps /export/apps ext3 defaults 1 2 /dev/vg0/design /export/design ext3 defaults 1 2 /dev/vg0/facultystaff /export/facultystaff ext3 defaults 1 2 /dev/vg0/grad /export/grad ext3 defaults 1 2 /dev/vg0/grad2 /export/grad2 ext3 defaults 1 2 /dev/vg0/misc /export/misc ext3 defaults 1 2 /dev/vg0/sssl /export/sssl ext3 defaults 1 2 /dev/vg0/structures /export/structures ext3 defaults 1 2 /dev/vg0/sysadmin /export/sysadmin ext3 defaults 1 2 /dev/vg0/undergrad /export/undergrad ext3 defaults 1 2 /dev/vg0/video /export/video ext3 defaults 1 2 # Network Mounts discovery.cc.vt.edu:/vt /mnt/vt nfs noauto 0 0 # Removable /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
Event: 6
md5 : active raid1 hda7[0] hdc7[1]
62556992 blocks [2/2] [UU]
md2 : active raid1 hda6[0] hdc6[1]
2096384 blocks [2/2] [UU]
md1 : active raid1 hda5[0] hdc5[1]
10482304 blocks [2/2] [UU]
md3 : active raid1 hda3[0] hdc3[1]
20972736 blocks [2/2] [UU]
md4 : active raid1 hda2[0] hdc2[1]
20972736 blocks [2/2] [UU]
md0 : active raid1 hda1[0] hdc1[1]
104320 blocks [2/2] [UU]
unused devices: <none>
XRaid and LVM
vgscan vgdisplay vgchange -a y
edit fstab to include the mount points
To test one could do something like this:
mount /dev/VolGroup00/LogVol00 /mnt umount /mnt vgchange -a n
NFS Exports
- edit file to
/etc/exports# # Exports file for alexandria.aoe.vt.edu # # Please maintain this file in alphabetical order - LAS # #--- System Mounts --- # Applications for Linux/x86 machines /export/apps/aoe-linux-x86 \ aries.aoe.vt.edu(rw,sync,no_root_squash) \ athena.aoe.vt.edu(ro,sync,no_root_squash) \ bacchus.aoe.vt.edu(ro,sync,no_root_squash) \ courier.aoe.vt.edu(ro,sync,no_root_squash) \ dorcas.aoe.vt.edu(ro,sync,no_root_squash) \ drotte.aoe.vt.edu(ro,sync,no_root_squash) \ galerkin.aoe.vt.edu(ro,sync,no_root_squash) \ halley.aoe.vt.edu(ro,sync,no_root_squash) \ helios.aoe.vt.edu(ro,sync,no_root_squash) \ hephaistos.aoe.vt.edu(ro,sync,no_root_squash) \ idesk.aoe.vt.edu(ro,sync,no_root_squash) \ lotus.aoe.vt.edu(ro,sync,no_root_squash) \ lyapunov.aoe.vt.edu(ro,sync,no_root_squash) \ orion.aoe.vt.edu(ro,sync,no_root_squash) \ severian.aoe.vt.edu(ro,sync,no_root_squash) \ sirius.aoe.vt.edu(ro,sync,no_root_squash) \ typhon.aoe.vt.edu(ro,sync,no_root_squash) \ vonkarman.aoe.vt.edu(ro,sync,no_root_squash) # Applications for Linux/ia64 machines /export/apps/aoe-linux-ia64 \ ericjohnson.aoe.vt.edu(rw,sync,no_root_squash) # Applications for Solaris/Sparc machines /export/apps/aoe-solaris-sparc \ genecliff.aoe.vt.edu(rw,sync,no_root_squash) \ valkyrie.aoe.vt.edu(ro,sync,no_root_squash) # if putting these back, be sure to add the \ above # fourier.aoe.vt.edu(ro,sync,no_root_squash) \ # michigan.aoe.vt.edu(ro,sync,no_root_squash) \ # ritz.aoe.vt.edu(ro,sync,no_root_squash) # Applications for Apple XServe's /export/apps/aoe-macosx-ppc \ atlantis01.aoe.vt.edu(rw,sync,no_root_squash,insecure) \ atlantis02.aoe.vt.edu(ro,sync,no_root_squash,insecure) \ atlantis03.aoe.vt.edu(ro,sync,no_root_squash,insecure) \ atlantis04.aoe.vt.edu(ro,sync,no_root_squash,insecure) # *OLD SCHEME* Applications for Solaris/Sparc machines /export/apps/depot-SunOS \ genecliff(rw,sync,no_root_squash) # fourier(ro,sync,no_root_squash) \ # ritz(ro,sync,no_root_squash) \ # valkyrie(ro,sync,no_root_squash) ##--- Home Directories --- /export/grad2 \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ bacchus(rw,sync,no_root_squash) \ courier(rw,sync,no_root_squash) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff.aoe.vt.edu(rw,sync) \ ericjohnson(rw,sync) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos.aoe.vt.edu(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,no_root_squash) \ vonkarman(rw,sync,no_root_squash) /export/facultystaff \ aries(rw,sync,no_root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ bacchus(rw,sync,no_root_squash) \ courier(rw,sync,no_root_squash) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,no_root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,no_root_squash) \ vonkarman(rw,sync,no_root_squash) /export/grad \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ bacchus(rw,sync,no_root_squash) \ courier(rw,sync,no_root_squash) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,no_root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,no_root_squash) \ vonkarman(rw,sync,no_root_squash) /export/undergrad \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ bacchus(rw,sync,no_root_squash) \ courier(rw,sync,no_root_squash) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,no_root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,no_root_squash) \ vonkarman(rw,sync,no_root_squash) #--- Groups --- /export/design \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,root_squash) \ vonkarman(rw,sync,root_squash) #/export/lab7 \ /export/misc \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ bacchus(rw,sync,no_root_squash) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync,no_root_squash) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,root_squash) \ vonkarman(rw,sync,root_squash) /export/sssl \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,root_squash) \ vonkarman(rw,sync,root_squash) /export/structures \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync,no_root_squash) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,root_squash) \ vonkarman(rw,sync,root_squash) /export/sysadmin \ aries(rw,sync,root_squash) \ athena(rw,sync,no_root_squash) \ atlantis01(rw,sync,root_squash,insecure) \ atlantis02(rw,sync,root_squash,insecure) \ atlantis03(rw,sync,root_squash,insecure) \ atlantis04(rw,sync,root_squash,insecure) \ bacchus(rw,sync,no_root_squash) \ courier(rw,sync,no_root_squash) \ dorcas.aoe.vt.edu(rw,sync,root_squash) \ drotte.*aoe.vt.edu(rw,sync,root_squash) \ ericjohnson(rw,sync) \ galerkin.aoe.vt.edu(rw,sync) \ genecliff(rw,sync,root_squash) \ halley(rw,sync,root_squash) \ helios.aoe.vt.edu(rw,sync,root_squash) \ hephaistos(rw,sync,root_squash) \ idesk.aoe.vt.edu(rw,sync,no_root_squash) \ lotus.aoe.vt.edu(rw,sync) \ lyapunov.aoe.vt.edu(rw,sync,no_root_squash) \ orion(rw,sync) \ severian.aoe.vt.edu(rw,sync,no_root_squash) \ sirius(rw,sync,root_squash) \ typhon(rw,sync,root_squash) \ valkyrie(rw,sync,root_squash) \ vonkarman(rw,sync,root_squash)
- Add to startup services
chkconfig portmap on chkconfig nfs on
- Start the nfs server
portmap service nfs start
- Reload any nfs changes to /etc/exports
exportfs -ra
Watch out for the 16 group limit!
Samba logging
To enable audit logging:
http://moiristo.wordpress.com/2009/08/10/samba-logging-user-activity/
/etc/samba/smb.conf
vfs objects = full_audit full_audit:prefix = %u|%I|%m|%S full_audit:success = mkdir rename unlink rmdir pwrite pread full_audit:failure = none full_audit:facility = LOCAL7 full_audit:priority = NOTICE
/etc/rsyslog.conf
local7.* /var/log/samba/log.audit
Samba exports
/etc/samba/smb.conf
# This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options (perhaps too # many!) most of which are not shown in this example # # Any line which starts with a ; (semi-colon) or a # (hash) # is a comment and is ignored. In this example we will use a # # for commentry and a ; for parts of the config file that you # may wish to enable # # NOTE: Whenever you modify this file you should run the command "testparm" # to check that you have not made any basic syntactic errors. # #======================= Global Settings ===================================== [global] # workgroup = NT-Domain-Name or Workgroup-Name workgroup = AOE realm = AOE.VT.EDU # server string is the equivalent of the NT Description field server string = alexandria.aoe.vt.edu # This option is important for security. It allows you to restrict # connections to machines which are on your local network. The # following example restricts access to two C class networks and # the "loopback" interface. For more examples of the syntax see # the smb.conf man page ; hosts allow = 192.168.1. 192.168.2. 127. hosts allow = 128.173. 198.82. 127. # if you want to automatically load your printer list rather # than setting them up individually then you'll need this printcap name = /etc/printcap load printers = yes # It should not be necessary to spell out the print system type unless # yours is non-standard. Currently supported print systems include: # bsd, sysv, plp, lprng, aix, hpux, qnx ; printing = bsd # Uncomment this if you want a guest account, you must add this to /etc/passwd # otherwise the user "nobody" is used ; guest account = pcguest # this tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/%m.log # Put a capping on the size of the log files (in Kb). max log size = 50 # Security mode. Most people will want user level security. See # security_level.txt for details. ; security = domain security = domain # Use password server option only with security = server ; password server = <NT-Server-Name> password server = PLUTO, NEPTUNE # Password Level allows matching of _n_ characters of the password for # all combinations of upper and lower case. ; password level = 8 ; username level = 8 # You may wish to use password encryption. Please read # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. # Do not enable this option unless you have read those documents ; encrypt passwords = yes ; smb passwd file = /etc/samba/smbpasswd encrypt passwords = yes # The following are needed to allow password changing from Windows to # update the Linux system password also. # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. # NOTE2: You do NOT need these to allow workstations to change only # the encrypted SMB passwords. They allow the Unix password # to be kept in sync with the SMB password. ; unix password sync = Yes ; passwd program = /usr/bin/passwd %u ; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* # Unix users can map to different SMB User names ; username map = /etc/samba/smbusers # Using the following line enables you to customise your configuration # on a per machine basis. The %m gets replaced with the netbios name # of the machine that is connecting ; include = /etc/samba/smb.conf.%m # Most people will find that this option gives better performance. # See speed.txt and the manual pages for details socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them # here. See the man page for details. ; interfaces = 192.168.12.2/24 192.168.13.2/24 interfaces = 128.173.188.43/22 # Configure remote browse list synchronisation here # request announcement to, or browse list sync from: # a specific host or from / to a whole subnet (see below) ; remote browse sync = 192.168.3.25 192.168.5.255 # Cause this host to announce itself to local subnets here ; remote announce = 192.168.1.255 192.168.2.44 # Browser Control Options: # set local master to no if you don't want Samba to become a master # browser on your network. Otherwise the normal election rules apply ; local master = no # OS Level determines the precedence of this server in master browser # elections. The default value should be reasonable ; os level = 33 # Domain Master specifies Samba to be the Domain Master Browser. This # allows Samba to collate browse lists between subnets. Don't use this # if you already have a Windows NT domain controller doing this job ; domain master = yes # Preferred Master causes Samba to force a local browser election on startup # and gives it a slightly higher chance of winning the election ; preferred master = yes # Enable this if you want Samba to be a domain logon server for # Windows95 workstations. ; domain logons = yes # if you enable domain logons then you may want a per-machine or # per user logon script # run a specific logon batch file per workstation (machine) ; logon script = %m.bat # run a specific logon batch file per username ; logon script = %U.bat # Where to store roving profiles (only for Win95 and WinNT) # %L substitutes for this servers netbios name, %U is username # You must uncomment the [Profiles] share below ; logon path = \\%L\Profiles\%U # All NetBIOS names must be resolved to IP Addresses # 'Name Resolve Order' allows the named resolution mechanism to be specified # the default order is "host lmhosts wins bcast". "host" means use the unix # system gethostbyname() function call that will use either /etc/hosts OR # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf # and the /etc/resolv.conf file. "host" therefore is system configuration # dependant. This parameter is most often of use to prevent DNS lookups # in order to resolve NetBIOS names to IP Addresses. Use with care! # The example below excludes use of name resolution for machines that are NOT # on the local network segment # - OR - are not deliberately to be known via lmhosts or via WINS. ; name resolve order = wins lmhosts bcast # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server ; wins support = yes # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # WINS Proxy - Tells Samba to answer name resolution queries on # behalf of a non WINS capable client, for this to work there must be # at least one WINS Server on the network. The default is NO. ; wins proxy = yes # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names # via DNS nslookups. The built-in default for versions 1.9.17 is yes, # this has been changed in version 1.9.18 to no. dns proxy = no # Case Preservation can be handy - system default is _no_ # NOTE: These can be set on a per share basis ; preserve case = no ; short preserve case = no # Default case is normally upper case for all DOS files ; default case = lower # Be very careful with case sensitivity - it can break things! ; case sensitive = no #============================ General Policies ============================ # We don't want to share any details about this system unless the user # is authenticated browsable = no public = no guest ok = no nt acl support = yes #============================ Share Definitions ============================= ### Semi-Automatic Shares ### [homes] comment = Home Directory browseable = no writable = yes create mode = 0600 directory mode = 0700 [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes ### Utility Shares ### [Softdist] comment = Utility Share - Software Repository path = /home/sysadmin/softdist writable = no read only = yes browseable = yes [Packages-Win32] comment = Utility Share - Shared applications for Design Lab and Graduate Lab path = /export/apps/packages-win32 writable = no read only = yes browseable = no public = yes create mode = 0664 directory mode = 0775 write list = @bigwheel ### Administrative Group Shares ### [ElectronicsShop] comment = Administrative Group Share - Electronics Shop (Devenport) path = /home/misc/ElectronicsShop browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ElectronicsShop [FiscalTechnecians] comment = Administrative Group Share - Fiscal Technicians (Foushee) path = /home/misc/FiscalTechnicians browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @FiscalTechnicians [MachineShop] comment = Administrative Group Share - Machine Shop (Foushee, Devenport) path = /home/misc/MachineShop browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @MachineShop [OfficeShare] comment = Administrative Group Share - Neu path = /home/misc/officeshare browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @officeshare [StabilityTunnel] comment = Administrative Group Share - Stability Wind Tunnel (Foushee, Devenport) path = /home/misc/StabilityTunnel browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @StabilityTunnel [Sysadmin] comment = Administrative Group Share - Sysadmin Group (Scharf) path = /home/sysadmin browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @bigwheel ### Research/Project Group Shares ### [Aeroelastic] comment = Research Group Share - Aeroelastic (Patil) path = /home/misc/aeroelastic browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @aeroelastic [auvt] comment = Autonomous Underwater Vehicle Team Share path = /home/misc/auvt browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @auvt [CAPLab] # Being moved to Athena 2006-08-10 - LAS comment = Research Group Share - CAPLab (Wang) path = /home/caplab browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @grad-jowang [Lab7] # Being moved to Athena 2006-08-11 - LAS comment = Research Group Share - Lab7 (Devenport) path = /home/lab7 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @grad-lab7 [gap] comment = Research Group Share - Genetic Algorithm Project (Schaub) path = /home/misc/gap browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @gap [scfd] comment = Research Group Share - Stochastic CFD (Walters) path = /home/misc/scfd browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @scfd [ShipDesign] comment = Research Group Share - Ship Design (Neu, Brown) path = /home/misc/ShipDesign browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipDesign [ShipStructuralDesign] comment = Project Group Share - Ship Structural Design (Hughes) path = /home/misc/ShipStructuralDesign browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipStructuralDesign [ShipSurvivability] comment = Research Group Share - Ship Design (Brown) path = /home/misc/ShipSurvivability browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipSurvivability [SSSL] comment = Research Group Share - Satellite System Simulation Lab (Hall) path = /home/sssl browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @SSSL-Users [Structures] comment = Research Group Share - Structures Group (Kapania) path = /home/structures browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @Structures [VortexDynamics] comment = Research Group Share - Vortex Dynamics (Schetz) path = /home/misc/VortexDynamics browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @VortexDynamics [vthst] comment = Research Group Share - Hypersonic Wind Tunnel (Schetz) path = /home/misc/vthst browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @HypersonicWindTunnel ### Design Group Shares ### [aiaadesign2006] comment = Design Group Share (Fall 2005) path = /home/design/aiaadesign2006 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @aiaadesign2006 [acs] comment = Design Group Share - acs (Fall 2005) path = /home/design/acs browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @acs [cansat] comment = Design group share - cansat (Hall, Sprint 2006) path = /home/design/cansat browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @cansat [dyncont] comment = Design group share - dyncont (Fall 2005) path = /home/design/dyncont browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @dyncont [edt] comment = Design Group Share - Electrodynamic Teather (Spring 2006) path = /home/design/edt browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @edt [intldesign] comment = Design Group Share - International Design (Spring 2005) path = /home/design/intldesign browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @intldesign [intl0506a] comment = Design Group Share - International Design (Fall 2005) path = /home/design/intl0506a browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @intl0506a [intl0607] comment = Design Group Share - International Design (Fall 2006) path = /home/design/intl0607 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @intl0607 [hpa] comment = Design Group Share - Human Powered Aircraft (Mason, Fall 2005) path = /home/design/hpa browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @hpa [microMAPS] comment = Design Group Share - Aircraft (Mason, Fall 2005) path = /home/design/microMAPS browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @microMAPS [Morphing] comment = Design Group Share - Morphing Wing (Mason, Fall 2005) path = /home/design/Morphing browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @Morphing [Titan] comment = Design Group Share - Titan (Fall 2005) path = /home/design/Titan browseable = yes writable = yes create mode = 0660 directory mode = 1770 write list = @Titan [SoundingRocket] comment = Design Group Share - Sounding Rocket (Spring 2006) path = /home/design/SoundingRocket browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @SoundingRocket [ShipDesign07adf2] comment = Design Group Share - Ship Design (Spring 2007) path = /home/design/ShipDesign07adf2 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipDesign07adf2 [ShipDesign07adf3] comment = Design Group Share - Ship Design (Spring 2007) path = /home/design/ShipDesign07adf3 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipDesign07adf3 [ShipDesign07adf4] comment = Design Group Share - Ship Design (Spring 2007) path = /home/design/ShipDesign07adf4 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipDesign07adf4 [ShipDesign07adf5] comment = Design Group Share - Ship Design (Spring 2007) path = /home/design/ShipDesign07adf5 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipDesign07adf5 [ShipDesign07adf6] comment = Design Group Share - Ship Design (Spring 2007) path = /home/design/ShipDesign07adf6 browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @ShipDesign07adf6 [WorkStudy] comment = work study file share/depository path = /home/misc/WorkStudy browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @WorkStudy [Grading] comment = Distance grading share/depository path = /home/misc/Grading browseable = yes writable = yes create mode = 0660 directory mode = 0770 write list = @Grading
SFTP (freebie)
FTP (depending on departmental policy)
yum install vsftpd
Default settings are OK.
ypserv
Client
[root@alexandria root]# cat /etc/yp.conf # /etc/yp.conf - ypbind configuration file # Valid entries are # # domain NISDOMAIN server HOSTNAME # Use server HOSTNAME for the domain NISDOMAIN. # # domain NISDOMAIN broadcast # Use broadcast on the local net for domain NISDOMAIN # # ypserver HOSTNAME # Use server HOSTNAME for the local domain. The # IP-address of server must be listed in /etc/hosts. # # broadcast # If no server for the default domain is specified or # none of them is rechable, try a broadcast call to # find a server. # domain aoe server alexandria.aoe.vt.edu
domainname /bin/domainname aoe
“…should be some string _NOT_ normally associated with the DNS-domain name of your machine!” /sbin/portmap Create the directory /var/yp if it does not exist.
Start ypbind
/usr/sbin/ypbind rpcinfo -p localhost
Output similar to:
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100007 2 udp 758 ypbind
100007 1 udp 758 ypbind
100007 2 tcp 761 ypbind
100007 1 tcp 761 ypbind
rpcinfo -u localhost ypbind
Output similar to:
program 100007 version 1 ready and waiting
program 100007 version 2 ready and waiting
Test:
ypcat passwd.byname
Server
/etc/yp.conf
# /etc/yp.conf - ypbind configuration file # Valid entries are # # domain NISDOMAIN server HOSTNAME # Use server HOSTNAME for the domain NISDOMAIN. # # domain NISDOMAIN broadcast # Use broadcast on the local net for domain NISDOMAIN # # ypserver HOSTNAME # Use server HOSTNAME for the local domain. The # IP-address of server must be listed in /etc/hosts. # # broadcast # If no server for the default domain is specified or # none of them is rechable, try a broadcast call to # find a server. # domain aoe server alexandria.aoe.vt.edu
/var/yp/securenets
host 127.0.0.1 # Localhost # Subnets - should go away soon 255.255.252.0 128.173.188.0 # Randolph subnet (255.255.252.0) 255.255.252.0 128.173.164.0 # Hancock Subnet (255.255.252.0) 255.255.255.0 128.173.105.0 # Femoyer Subnet (255.255.255.0) # Particular Machines - the Right Way, even if Pluto and neptune don't have this. host aries.aoe.vt.edu host atlantis01.aoe.vt.edu host atlantis02.aoe.vt.edu host atlantis03.aoe.vt.edu host atlantis04.aoe.vt.edu host bacchus.aoe.vt.edu host courier.aoe.vt.edu host fourier.aoe.vt.edu host genecliff.aoe.vt.edu host halley.aoe.vt.edu host helios.aoe.vt.edu host hephaistos.aoe.vt.edu host idesk.aoe.vt.edu host lyapunov.aoe.vt.edu host michigan.aoe.vt.edu host ritz.aoe.vt.edu host sirius.aoe.vt.edu host typhon.aoe.vt.edu host valkyrie.aoe.vt.edu host vonkarman.aoe.vt.edu
/etc/ypserv.conf
# # ypserv.conf In this file you can set certain options for the NIS server, # and you can deny or restrict access to certain maps based # on the originating host. # # See ypserv.conf(5) for a description of the syntax. # # Some options for ypserv. This things are all not needed, if # you have a Linux net. # Should we do DNS lookups for hosts not found in the hosts table ? # This option is ignored in the moment. dns: no # How many map file handles should be cached ? files: 30 # xfr requests are only allowed from ports < 1024 xfr_check_port: yes # The following, when uncommented, will give you shadow like passwords. # Note that it will not work if you have slave NIS servers in your # network that do not run the same server as you. # Host : Domain : Map : Security # # * : * : passwd.byname : port # * : * : passwd.byuid : port # Not everybody should see the shadow passwords, not secure, since # under MSDOG everbody is root and can access ports < 1024 !!! * : * : shadow.byname : port * : * : passwd.adjunct.byname : port # If you comment out the next rule, ypserv and rpc.ypxfrd will # look for YP_SECURE and YP_AUTHDES in the maps. This will make # the security check a little bit slower, but you only have to # change the keys on the master server, not the configuration files # on each NIS server. # If you have maps with YP_SECURE or YP_AUTHDES, you should create # a rule for them above, that's much faster. # * : * : * : none
Start ypserv
ypserv
Test
rpcinfo -u localhost ypserv
Should get
program 100004 version 1 ready and waiting
program 100004 version 2 ready and waiting
Generate the database
/usr/lib/yp/ypinit -s pluto
Done!
You might want to edit root's crontab *on the slave* server and add the following lines:
20 * * * * /usr/lib/yp/ypxfr_1perhour
40 6 * * * /usr/lib/yp/ypxfr_1perday
55 6,18 * * * /usr/lib/yp/ypxfr_2perday
service ypxfrd start chkconfig ypxfrd on
summary:
ypinit -s start portmap, ypserv, auofs reboot
rsync backups (crontab -l)
To edit:
crontab -e
[root@alexandria root]# crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.7517 installed on Wed Apr 28 13:01:29 2004) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) SHELL=/bin/bash # Daily auto-patch @daily yum -e 0 -y update > /dev/null ; yum -e 0 -y clean packages > /dev/null @monthly rpm --verify --all # Monthly virus scan #@monthly /home/sysadmin/bin/clamscan_comprehensive.sh & disown # Hourly virus db update #@hourly sleep $[ RANDOM % 3600 ] ; /usr/bin/freshclam --quiet # Backup "special" Linux machines @hourly rsync -azt --delete-during root@courier.aoe.vt.edu:/var/spool/ /home/sysadmin/courier_var_spool/ @daily rsync -azt --delete-during root@typhon.aoe.vt.edu:/group/code/ /home/sssl/group_code_backup/ @daily rsync -azv --delete --rsync-path=/usr/freeware/bin/rsync root@enterprise.aoe.vt.edu:/usr/people/ /home/sysadmin/enterprise.aoe.vt.edu/backup/people/
To List:
crontab -l
TSM campus backups
These packages install atempting to get xclock to work:
libX11.i386 1.0.3-8.0.1.el5 installed xorg-x11-apps.i386 7.1-4.0.1.el5 installed xorg-x11-filesystem.noarch 7.1-2.fc6 installed xorg-x11-utils.i386 7.1-2.fc6 installed yum install xorg-x11-utils ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: xorg-x11-utils i386 7.1-2.fc6 sl-base 116 k Installing for dependencies: libXtst i386 1.0.1-3.1 sl-base 15 k libXv i386 1.0.1-4.1 sl-base 14 k libXxf86dga i386 1.0.1-3.1 sl-base 15 k libXxf86misc i386 1.0.1-3.1 sl-base 11 k libdmx i386 1.0.2-3.1 sl-base 13 k
On bacchus, just these two (and dependencies) got xclock working:
yum install xclock yum install xorg-x11-xauth
Add startup file from Eliza Lau's filebox http://filebox.vt.edu/users/lau/ and name it '/etc/init.d/adsmsched' with the comment symbols
Insert the following lines in /etc/init.d/adsmsched as described in 'man chkconfig'
# chkconfig: 345 99 99 # description: Start/Stop the TSM Scheduler # processname: dsmc sched
Set it to startup on reboot and/or start the process
chkconfig --add adsmsched chkconfig adsmsched on service adsmsched start
To get bacchus running dsmj,
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-base (maybe not both, but both worked) yum install java yum install xorg-x11-xfs service xfs start
Another java tip from sl mailing list
rpm -qa | grep java-1.6.0-sun-compat
TSM 61 on Athena
yum install xclock yum install xorg-x11-xauth xclock yum install java yum install compat-libstdc++-33 rpm -i TIVsm-API.i386.rpm rpm -i TIVsm-API64.i386.rpm rpm -i TIVsm-BA.i386.rpm
Grab these from http://filebox.vt.edu/~lau/
unix.dsm.opt.txt unix.dsm.sys.txt include exclude file ???
Modify dsm.sys for your system
inclexcl.opt
TSM 62 update on alexandria
wget http://service.boulder.ibm.com/storage/tivoli-storage-management/patches/client/v6r2/Linux/LinuxX86/v621/6.2.1.1-TIV-TSMBAC-LinuxX86.tar rpm -i gskcrypt32-8.0.13.3.linux.x86.rpm rpm -i gskssl32-8.0.13.3.linux.x86.rpm rpm -i TIVsm-API.i386.rpm rpm -i TIVsm-BA.i386.rpm
special Vista issue
In trying to figure out why vista can log onto athena, but not alexandria, I found this:
/etc/pam_smb.conf
AOE PLUTO NEPTUNE
Switching disks in XRaid
after changing disk raids in RaidAdmin, this command seemed to help identify the changes if the devices did not list in /dev
echo "- - -" > /sys/class/scsi_host/host1/scan
then fdisk with no partitions to rewrite the label.
Then create an LVM type
8e Linux LVM
or if using in software raid, use
fd Linux raid auto
To detect changed partition is not recognized,
partprobe
fdisk usually makes this happen though.
remove devices http://www-941.ibm.com/collaboration/wiki/pages/viewpage.action?pageId=3625
lsscsi echo 1 > /sys/bus/scsi/drivers/sd/0\:0\:0\:1/delete
Disk Quotas
for each filesystem, in the root of the filesyetem, put a aquota.user and/or aquota.group
touch aquota.user chmod 600 aquota.user quotacheck -vagum
to get state of quotas:
quotaon -guvp -a
Convert ext3 to ext
If you are upgrading /dev/sda2 that is mounted as /home, from ext3 to ext4, do the following.
umount /dev/sda2 tune2fs -O extents,uninit_bg,dir_index /dev/sda2 e2fsck -pf /dev/sda2 e2fsck -fDC0 /dev/DEV (or this one ??) mount /dev/sda2 /home