Project:Infrastructure/Developer Machines/s390

s390 Admin Notes
These are various notes mainly targeted at people administrating Gentoo dev machines, although most things are probably generally useful. These are not general "how do I administrate a Gentoo box" notes.

Hostnames
These are the current systems we have available. See machine specific notes at bottom for more details.

Console Access
In order to access the s390 console, install the terminal emulator. This provides multiple UIs for connecting to a remote system. Use whichever version you prefer. We'll focus on two here:
 * x3270: Graphical X interface
 * c3270: Console ncurses interface


 * 1) Use the   command to connect to the console server (see hostnames above).
 * 2) The USERID field should be selected by default -- enter the account name for the host (see hostnames above).
 * 3) If the USERID is fully filled, the cursor moves automatically to the password, otherwise hit tab to move to the field.
 * 4) Type in the password.  Note: while the cursor will move, nothing will be displayed -- no actual characters or the common * marker.

Note: When you are done, do not use  as that kills the VM. Only use.

Common CP/CMS Commands
See the S390/z/VM tips and tricks page for details.

Kernel Management
s390 systems use the zipl tool from the package to manage booting of kernels. Things to remember:


 * Make updates to.
 * Run  whenever  is changed or kernels referred to by the config file are updated (failure to do so will break booting).
 * The bootable linux kernel is created at (e.g. under ).
 * The  shortcut usually does not do the right thing under s390.

Storage
You cannot format the "full" device as a filesystem. e.g.  will fail. The s390 VM system requires the header of the device have some metadata so the hypervisor can process things correctly.

Make sure you run  on the device before you do anything else. This creates the proper metadata structure.

Do not use  to try and format block devices. Use  instead. You can use standard mkfs tools on the partitions after that.

Linking Disks
Disks can be linked between VMs. This can be useful when recovering a broken install or rootfs as doing it from a full system can be faster than trying to netboot.

This example will assume lgentoo4's rootfs is corrupted, but lgentoo3 boots fine. Both systems have this disk layout:

00: DASD 0150 3390 MRC79A R/W      3336 CYL ON DASD  C79A SUBCHANNEL = 0006 dasda1 /boot dasda2 /usr 00: DASD 0151 3390 MRC79A R/W      3338 CYL ON DASD  C79A SUBCHANNEL = 0007 dasdb1 /

To start, go into lgentoo3's settings and add another boot entry to list the new extra disks. Copy an existing working entry and then update the  kernel option to include   at the end. Run  to save. Note: If desired, add another entry to boot lgentoo4 on lgentoo3 by swapping the existing  with   in the   setting. This might be a little more convenient in testing than having to detach/relink the disks when testing.

Next, shut off both VMs. lgentoo4 will remain off for the duration of this process. Log in to the lgentoo3 VM via the 3270 console and enter CP/CMS. Then link the disks:

# Double check the disk layout. Q DASD # Link lgentoo4's 150 DASD as lgentoo3's 152 DASD. Use W here to get write access. LINK lgentoo4 150 152 W PASS=... # Then link lgentoo4's 151 as lgentoo3's 153. LINK lgentoo4 151 153 W PASS=...

Now boot lgentoo3 using the new boot entry created earlier. It should boot & mount like normal. lgentoo4's disks should now be accessible under /dev.

# Assuming 152 is dasdf & 153 is dasdg. mount /dev/dasdg1 /mnt/tmp mount /dev/dasdf2 /mnt/tmp/usr mount /dev/dasdf1 /mnt/tmp/boot # Now chroot into /mnt/tmp and have access to lgentoo4's setup.

Once lgentoo4 is done recovering, shut down lgentoo3 again, enter CP/CMS, and detach the disks.

DETACH 152 DETACH 153

Finally boot lgentoo3 & lgentoo4 back up like normal.

/etc/zipl.conf
[defaultboot] defaultmenu = menu

[Gentoo] image = /boot/image target = /boot/zipl parameters = "no_removal_warning dasd=0150,0151,0160,0191,0200 root=/dev/dasdb1 rootfstype=ext4 panic=3 TERM=dumb init=/bin/busybox setarch linux32 /ginit"

[Gentoo_OK] image = /boot/image.ok   target = /boot/zipl parameters = "no_removal_warning dasd=0150,0151,0160,0191,0200 root=/dev/dasdb1 rootfstype=ext4 panic=3 TERM=dumb init=/ginit"

[Rescue] image = /boot/image.ok   target = /boot/zipl parameters = "no_removal_warning dasd=0150,0151,0160,0191,0200 root=/dev/dasdb1 rootfstype=ext4 panic=3 TERM=dumb init=/bin/bb rw"


 * menu

default = 1 prompt = 1 target = /boot/zipl timeout = 10 1 = Gentoo 2 = Gentoo_OK 3 = Rescue

/etc/conf.d/net
config_eth0="148.100.88.31/24 2620:91:0:688:1::31/64" routes_eth0="default via 148.100.88.1" ccwgroup_eth0="0.0.0340 0.0.0341 0.0.0342" ccwgroup_opts_eth0="layer2=1" #fake_ll=0

Manual Network Bringup
If the network device fails to come up properly, you can online it manually.


 * Load the kernels modules for ethernet.


 * Bind the hardware ports to the ethernet driver -- the x.y.zzzz numbers will depend on your system.


 * Initialize the ethernet settings.


 * Bring up the network directly -- obviously the network settings here depend on your box.

lgentoo3

 * Contact: martha.mcconaghy@marist.edu & licquia@linuxfoundation.org
 * IPv4: 148.100.88.31; netmask 255.255.255.0; gateway 148.100.88.1
 * IPv6: 2620:91:0:688:1::31/64; gateway 2620:91:0:688::1/64
 * Memory: 2G
 * vCPU: 2 IFLs (virtual)
 * Disks:

vaddr 150 and 151 are approx. 2.3G each, where SLES 11 currently resides (dasda and dasdb) vaddr 200 - large approx. 23G volume, dasde. Can be used for whatever you want. vaddr 160 - a virtual disk used by SLES for swap (exists only in z/VM memory). Don't use it to store files as it will be recreated every time the server reboots. vaddr 190-19F, 8888 - utility disks for z/VM, they are read/only. 191 is the exception, that is for SLES to boot from. Not enough space to use for anything else.

lgentoo4

 * IPv4: 148.100.88.32; netmask 255.255.255.0; gateway 148.100.88.1
 * IPv6: 2620:91:0:688:1::32/64; gateway 2620:91:0:688::1/64
 * Memory/CPU/Disk: same as lgentoo3