[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding DASD to a Debian guest



On Thu, 13 Aug 2015 07:02:21 -0400 (EDT), Howard V. Hardiman wrote:
> 
> Hello,
> 
> I am configuring a golden image that will live on one piece of dasd
> with LVM.

OK.

> When I clone it I will need to add more dasd to certain of
> the cloned guests.  So, now I am attempting to do a fresh install that
> has LVM for the golden image, because my current golden image does not
> use LVM.  As you mentioned, in this process I am letting the
> 'installer' do the job.  But, during one of the last steps of the
> install I get the error about zipl bootloader not being able to
> download and I have to skip that step.  The install finishes but I
> cannot boot with the ipl command. 
> 
> Here is a run down of what I have done relating to the LVM.
> 
> (1.) Placed a 100M partition on the dasd and made it the /boot partition 
> (2.) Placed the remainder of dasd in a virtual group vg1 
> (3.) Created logical volume lv1 = '/' and lv2=swap, using vg1 
> (4.) Wrote partitions and moved on with install process
> 
> If I proceed in the installation it says that I can manually boot
> with the /vmlinuz kernel on partition /dev/dasda1 and root
> /dev/mapper/vg1-lv1 passed as kernel argument.  How do I do that?
> If that works, can I then load zipl or some bootloader that will allow
> me to be able to ipl the OS like normal?

First of all, the /boot partition cannot be in an LVM2 logical volume.
The "/boot" partition must be a partition on a "physical" DASD volume,
that is, a volume which appears as a physical volume to an operating
system running in the z/VM virtual machine.  In reality, this can be
a z/VM minidisk, but not an LVM2 logical volume.

I'm not sure if the "/" partition can be in a logical volume either.
But even if it can, I don't recommend it.  There are a number of
maintenance situations where one wants to (or needs to) unmount
the file system in order to perform maintenance on it.  Since "/" is
always mounted, that presents a problem.  I highly recommend that
the "/" file system be a partition on a physical volume as well.

Here is a scenario that has worked well for me.  I create four
minidisks in z/VM, with virtual device numbers 200, 201, 202, and 203.
During Debian installation I create a single partition on each device
which occupies the entire device (except for the required metadata
at the beginning: track 0 reserved for the IPL records and the
volume label, and track 1 reserved for the VTOC).  I use the partition
on 200 as the "/" filesystem.  I use the partition on 201 as the
"/boot" filesystem.  I use the partition on 202 as the "/home"
filesystem, and I use the partition on 203 as a swap partition.

After installation, I boot the machine with "IPL 201".

I would probably make /boot about 100 cylinders.  Now if you want
to use LVM2, you can.  For example, if you're going to be building
packages from source, you might want to create a logical volume
and mount it on /usr/src.  Or maybe you are going to be needing
a lot of space for SQL data, such as with mariadb or postgresql.
You might want to create a logical volume for that and mount it
on /dbase, or whatever mount point the database wants to use.
You can put /home on a logical volume too, if you want.  But I
wouldn't put /boot or / or a swap partition on a logical volume.
You can have multiple swap partitions anyway, so expanding swap
space is not an issue.  I would make / big enough so that after
installation is complete it is no more than 50% full, to allow
for future growth.

Let me know how it goes.

If you add new DASD devices to your system after installation,
whether you mount them directly or add them to a logical volume,
be sure to create files in /etc/sysconfig/hardware so that
sysconfig-hardware will bring them online at the next boot.

-- 
  .''`.     Stephen Powell    <zlinuxman@wowway.com>
 : :'  :
 `. `'`
   `-


Reply to: