On 9/12/19 5:19 PM, Marcy Cortes wrote:
Just went through all this a while ago!

Here's my instructions for my 101 -> 201 move

        2. Enlarge the 101 disk if not already 1000 cyl (non LVM)
# Allocate a 1000 cyl disk at address 201

vmcp link \* 201 201
chccwdev -e 201
# Lsdasd - get new disk letter
dasdfmt -f /dev/dasd? -b 4096
fdasd -a /dev/dasd?
mke2fs -j -b 4096 /dev/dasd?1
mount /dev/dasd?1 /mnt
cd /mnt
rsync -lPprvtaxS / .
cd /
for fs in dev proc sys; do mount --bind /$fs /mnt/$fs; done
chroot /mnt
mount -a

Marcy's instructions are great.

Please note, that there may be (other) cases where you need to also rebuild
your initrd with mkinitrd before re-writing the boot record with zipl.

Though, probably not in your case, as you made the new disks have the old
devnos, so the Linux device configuration content does not need to change,
making it a lot easier. :-)

FYI: While it's "mkinitrd && zipl" with SLES11
 [http://public.dhe.ibm.com/software/dw/linux390/docu/les3dd03.pdf
  Chapter "Chapter 3. Kernel and module parameters"
  Section "Specifying module parameters"
    "Including module parameters in a boot configuration"]
it will be "dracut -f && grub2-install" once you're with SLES12

[https://www.ibm.com/support/knowledgecenter/linuxonibm/com.ibm.linux.z.lhdd/lhdd_t_pitfall_scsi.html].

zipl
exit
# Edit directory entry and switch the 101 and 201 disks



-----Original Message-----
From: Linux on 390 Port <[email protected]> On Behalf Of Csaba Polgar
Sent: Thursday, September 12, 2019 8:06 AM
To: [email protected]
Subject: [LINUX-390] Replacement the root disk with a larger disk (without LVM)

Hello,

We have many system with SLES 11 SP4, and would like to upgrade these to
SLES 12 SP4.
The the root filesystem (/, on dasd 201, with ext3, and without LVM, simple
dasd) has the OS (itself the Linux, without the applications).
But this root filesystem is too small for the upgrade. So, I did the
following steps;
- I requested a new and larger disk (on 209 address)
- after the shutdown, I formatted the new disk (209) as ext3 (from another
Linux system)
- copied the full content from the small disk (201) to the larger disk
(209, with "rsync -avxHAX --progress /sourcepath/ /targetpath/" command,
with the other Linux)
- I changed the addresses of the disks in the Guest definition:
     from 201 -> to 1201
     from 209 -> to 201
- And I started the new guests, but the boot failed.

After it I compared the successful and unsuccessful boot logs, and I think
the below lines show the root cause of the fail;
in the successful log:
  dasdb:VOL1/  LBX201: dasdb1
in the unsuccessful log:
  dasdb:VOL1/  LBX209: dasdb1
In the unsuccessful log show, the 209 dsk address, but I use the new 201
dasd, and the 209 should not be important for the boot.

Somebody knows, what should be changed/updated for the usage of larger and
replaced root disk ?

FYI, the last error messages:

Before that you presumably got an error when the Linux kernel tried to open its
ramdisk.

Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

After the file system based copy, the initrd can be at a different logical
block location on the disk, so zipl with the old "bootmap" cannot find it
anymore. Zipl can then just load whatever data is at the blocks defined in the
old bootmap. The init process (user space binary executable) for preparing and
mounting the actual root-fs is inside the initrd. The Linux kernel cannot
continue booting without an init process. That causes the final init panic.

[see also https://www.mail-archive.com/[email protected]/msg61407.html
 / http://www2.marist.edu/htbin/wlvtype?LINUX-VM.85131 for more details]

--
Mit freundlichen Gruessen / Kind regards
Steffen Maier

Linux on IBM Z Development

https://www.ibm.com/privacy/us/en/
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Matthias Hartmann
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to