M # M #----------------- info ----------------- M # BMR commands generated Wed Apr 4 10:55:20 EDT 2007 on the server described below: M # Linux dz2mfse1 2.6.5-7.191-s390 M # z/VM userid=DZ2MFSE1 M # rpm -q said: device-mapper-1.01.01-1.2 M # rpm -q said: lvm2-2.01.14-3.6 M # M # 'BMRtool scan' mode generated this file for its other modes to read. M # Various BMRtool modes read this file and select records based on their M # column 1-2 prefix and do the Bash command that starts in record column 3. M # The command might call internal functions in BMRtool. M # You can use option -t to safely check which records a mode will select. M # M # WARNING!! Modes 'diskinit' and 'restore' will overwrite your disks! M # Mode 'diskinit' does records having prefixes 'M ' or 'D ' M # Mode 'mount' does only the prefix 'M ' records. M # Mode 'umount' does only the prefix 'U ' records. M # Mode 'restore' does only the prefix 'R ' records. M # M #----------------- drivers ----------------- M # M modprobe jbd M modprobe ext3 M modprobe dasd_mod M modprobe dasd_diag_mod M modprobe dasd_fba_mod M modprobe dasd_eckd_mod M modprobe dm_mod M modprobe ccwgroup M modprobe ipv6 M modprobe qdio M modprobe qeth M modprobe autofs M modprobe cdrom M modprobe scsi_mod M modprobe sr_mod M modprobe sd_mod M modprobe st M modprobe sg M modprobe dm_mirror M /sbin/devmap_mknod.sh D # D #----------------- preFmtPart ----------------- D #OK to get message 'Unable to find volume group...' here: D : vgchange -a n vg1 #prep before partitioning a 2nd or 3rd time M # M #----------------- actDASD ----------------- M chccwdev --online 0.0.0200 M chccwdev --online 0.0.0201 M chccwdev --online 0.0.0202 M # M #----------------- actHBA ----------------- M # M #----------------- actLUN ----------------- D # D #----------------- dasdfmt ----------------- D # D dasdfmt -b 4096 -y -m 1000 -l '0X0200' -f /dev/$(atBMR 0.0.0200 0) D # D dasdfmt -b 4096 -y -m 1000 -l '0X0202' -f /dev/$(atBMR 0.0.0202 0) D # D dasdfmt -b 4096 -y -m 1000 -l '0X0201' -f /dev/$(atBMR 0.0.0201 0) D # D #----------------- partition ----------------- D # D fdasd -c ./ptbl-0.0.0200 /dev/$(atBMR 0.0.0200 0) D # D fdasd -c ./ptbl-0.0.0202 /dev/$(atBMR 0.0.0202 0) D # D fdasd -c ./ptbl-0.0.0201 /dev/$(atBMR 0.0.0201 0) M # M #----------------- actMPIO ----------------- D # D #----------------- pvcreate ----------------- D pvcreate -ffy --uuid AU1DxB-2ua8-uGLc-nbiv-nGDZ-nQTE-ZMyl6x --restorefile ./VG-vg1 /dev/$(atBMR 0.0.0202 1) D # D pvcreate -ffy --uuid Cumo00-YDU8-Q33l-gY5D-ItJC-4kz3-ddjA3T --restorefile ./VG-vg1 /dev/$(atBMR 0.0.0201 1) D # D #This next PV of VG vg1 is not part of an LV D pvcreate -ffy --uuid lH0cLd-YglB-ZATu-arpO-i1yV-iMd4-1cn346 --restorefile ./VG-vg1 /dev/$(atBMR 0.0.0200 2) D # D # D #----------------- vgcfgrest ----------------- D # D vgcfgrestore --file ./VG-vg1 vg1 M # M #----------------- actLVM ----------------- M # M vgscan --mknodes M vgchange -a y vg1 D # D #----------------- mkfs ----------------- D # D mkfs -t ext3 -q /dev/$(atBMR 0.0.0200 1) D tune2fs -c 28 /dev/$(atBMR 0.0.0200 1) D # D mkfs -t ext3 -q /dev/mapper/vg1-usr D tune2fs -m 0 -c 36 /dev/mapper/vg1-usr D # D mkfs -t ext3 -q /dev/mapper/vg1-var D tune2fs -m 0 -c 37 /dev/mapper/vg1-var D # D mkfs -t ext3 -q /dev/mapper/vg1-opt D tune2fs -m 0 -c 21 /dev/mapper/vg1-opt D # D mkfs -t ext3 -q /dev/mapper/vg1-opt.tivoli D tune2fs -m 0 -c 30 /dev/mapper/vg1-opt.tivoli D # D mkfs -t ext3 -q /dev/mapper/vg1-opt.tivoli.db D tune2fs -m 0 -c 22 /dev/mapper/vg1-opt.tivoli.db D # D mkfs -t ext3 -q /dev/mapper/vg1-opt.tivoli.depot D tune2fs -m 0 -c 24 /dev/mapper/vg1-opt.tivoli.depot D # D mkfs -t ext3 -q /dev/mapper/vg1-home D tune2fs -m 0 -c 21 /dev/mapper/vg1-home D # D mkfs -t ext3 -q /dev/mapper/vg1-tmp D tune2fs -m 0 -c 26 /dev/mapper/vg1-tmp M # M #----------------- mount ----------------- M # M mkdir -p /mnt/a/ M mount /dev/$(atBMR 0.0.0200 1) /mnt/a/ D chmod 0755 /mnt/a/ # 0755/drwxr-xr-x D chown 0:0 /mnt/a/ # Uid: 0/ root Gid: 0/ root D mkdir -p /mnt/a/proc #type proc D mkdir -p /mnt/a/sys #type sysfs D mkdir -p /mnt/a/dev/shm #type tmpfs D mkdir -p /mnt/a/dev/pts #type devpts M # D mkdir -p /mnt/a/usr M mount /dev/mapper/vg1-usr /mnt/a/usr D chmod 0755 /mnt/a/usr # 0755/drwxr-xr-x D chown 0:0 /mnt/a/usr # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/var M mount /dev/mapper/vg1-var /mnt/a/var D chmod 0755 /mnt/a/var # 0755/drwxr-xr-x D chown 0:0 /mnt/a/var # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/opt M mount /dev/mapper/vg1-opt /mnt/a/opt D chmod 0755 /mnt/a/opt # 0755/drwxr-xr-x D chown 0:0 /mnt/a/opt # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/opt/tivoli M mount /dev/mapper/vg1-opt.tivoli /mnt/a/opt/tivoli D chmod 0755 /mnt/a/opt/tivoli # 0755/drwxr-xr-x D chown 0:0 /mnt/a/opt/tivoli # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/opt/tivoli/db M mount /dev/mapper/vg1-opt.tivoli.db /mnt/a/opt/tivoli/db D chmod 0755 /mnt/a/opt/tivoli/db # 0755/drwxr-xr-x D chown 0:0 /mnt/a/opt/tivoli/db # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/opt/tivoli/depot M mount /dev/mapper/vg1-opt.tivoli.depot /mnt/a/opt/tivoli/depot D chmod 0755 /mnt/a/opt/tivoli/depot # 0755/drwxr-xr-x D chown 0:0 /mnt/a/opt/tivoli/depot # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/home M mount /dev/mapper/vg1-home /mnt/a/home D chmod 0755 /mnt/a/home # 0755/drwxr-xr-x D chown 0:0 /mnt/a/home # Uid: 0/ root Gid: 0/ root M # D mkdir -p /mnt/a/tmp M mount /dev/mapper/vg1-tmp /mnt/a/tmp D chmod 1777 /mnt/a/tmp # 1777/drwxrwxrwt D chown 0:0 /mnt/a/tmp # Uid: 0/ root Gid: 0/ root D # D #----------------- mkswap ----------------- D # D mkswap /dev/mapper/vg1-swap1 U # U #----------------- umount ----------------- U # . . . These are 'umount' mode commands . . . U # U umount /mnt/a/{sys,proc} #In case needed after chroot mkinitrd, zipl U umount /mnt/a/tmp U umount /mnt/a/home U umount /mnt/a/opt/tivoli/depot U umount /mnt/a/opt/tivoli/db U umount /mnt/a/opt/tivoli U umount /mnt/a/opt U umount /mnt/a/var U umount /mnt/a/usr U umount /mnt/a/ R # R #----------------- restore ----------------- R # . . . These are 'restore' mode commands . . . R # dsmc is the IBM Tivoli Storage Manager (TSM) command line client R # R df -i #Show inode counts before restores R #OFT excludes backup of /tmp fs; Ok if its restore fails. R dsmc restore /tmp/ /mnt/a/tmp/ -subd=yes -replace=all -quiet R dsmc restore /home/ /mnt/a/home/ -subd=yes -replace=all -quiet R dsmc restore /opt/tivoli/depot/ /mnt/a/opt/tivoli/depot/ -subd=yes -replace=all -quiet R dsmc restore /opt/tivoli/db/ /mnt/a/opt/tivoli/db/ -subd=yes -replace=all -quiet R dsmc restore /opt/tivoli/ /mnt/a/opt/tivoli/ -subd=yes -replace=all -quiet R dsmc restore /opt/ /mnt/a/opt/ -subd=yes -replace=all -quiet R dsmc restore /var/ /mnt/a/var/ -subd=yes -replace=all -quiet R dsmc restore /usr/ /mnt/a/usr/ -subd=yes -replace=all -quiet R dsmc restore / /mnt/a/ -subd=yes -replace=all -quiet R df -i #Show inode counts after restores R #