This would have been nice, but it doesn't work.  :-(

I will prevail though!  :-)

Leland

On 2/17/2013 11:36 PM, Leland Lucius wrote:
An addendum to my previous post...

Ran into an issue this weekend where we'd added a new disk to the root VG of a 
system and that system wouldn't boot because we didn't recreate the initrd.  
Yes, really!  We actually had to recreate the initrd just because we added a 
disk to the root VG.

Being the non-conformist that I am, I couldn't abide that requirement, so a 
small script and 3 commands later, I now have that problem solved.

Save this script as /lib/mkinitrd/scripts/setup-dasd_all.sh:

<<snip>>
#!/bin/bash
#
#%stage: device
#

         cat > $tmp_mnt/etc/udev/rules.d/51-dasd-all.rules <<EOF
ACTION=="add", SUBSYSTEM=="ccw", DRIVER=="dasd-eckd", ATTR{online}="1"
ACTION=="add", SUBSYSTEM=="ccw", DRIVER=="dasd-fba", ATTR{online}="1"
ACTION=="add", SUBSYSTEM=="ccw", DRIVER=="dasd-diag", ATTR{online}="1"
EOF

         verbose "[DASD] All DASD devices"
<<snip>>

Tell mkinitrd to use it: (all one line...watch for wrappage)

ln -s ../scripts/setup-dasd_all.sh /lib/mkinitrd/setup/$(basename 
/lib/mkinitrd/setup/*-dasd.sh | cut -f 1 -d -)-dasd_all.sh

Recreate the initrd:

mkinitrd -v

You should see a line that says:

[DASD] All DASD devices

Now run zipl: (however you normally do it)

zipl

And now you're protected from missing disks in your root VG.

Leland

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/


----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to