On Wed, Mar 28, 2012 at 10:50 AM, Florian Bilek <florian.bi...@gmail.com> wrote:
> Is there a tool that would allow to increase the partition size of a DASD
> partition?

Assuming CDL, the following sequence should work.  (Is untested, but
similar to steps I have run previously.)

from the CMS side ...
   create new disk of larger size (at its own vaddr)
   CMS FORMAT the new disk for proper 4K blocks
   DDR old to new (first part will be old contents, second part will
be empty blocks)
   remove old disk
   set vaddr of new disk to match old

from the Linux side ...
   use 'fdasd' to fix-up the partition table
   use 'resize2fs' to enlarge the filesystem

DONE.  Rationale and other notes follow.  "cut here"

What Christian said is correct.  I presume you DO NOT have the free
space he mentions.  The steps listed above give the effect of
extending the underlying volume so that you have that free space and
can follow his suggestion.

Dave's recipe is very robust: create a new disk, copy the contents,
delete the old, done!

'rsync' with the right options is very very good about handling
sym-links and device files.

If you used LVM, extending filesystems would be easier.  (add another
disk as a PV, extend the LV, resize the FS, no copying per se)

Simply extending a minidisk imposes two problems.  First, it is
unlikely the cylinders following the minidisk are unused.  Second, you
would need to block just those cylinders.  (And then hope that 'fdasd'
resets the VTOC correctly.)

Not having used 'fdasd' in several months, I DO NOT KNOW when it will
and will not destroy the contents of your partition.  Ideally, running
'fdasd -a -k' against the new disk will enlarge the partition to use
the new space.  "-k" tells it to preserve the label.  We want it to
also preserve the contents.  (You would then 'e2fsck -f' and
'resize2fs'.)  Perhaps one of the Boeblingen team members can weigh in
on this point.

CKD (either CDL or LDL) requires that the disk be blocked.  In PC
parlance that's "low level formatting".  You can use 'dasdfmt' on
Linux or use CMS FORMAT.

CDL imposes a z/OS compatible first track.  I avoid 'dd' for CDL
volumes because the driver restricts what can be written to that
track.  (Thus my recommendation of instead doing DDR from CMS.)  This
first track is NOT blocked uniformly like the rest of the disk.

CMS FORMAT of CKD always performs both low level (blocking) and high
level (a CMS EDF filesystem).  For CKD vols used by Linux, the CMS EDF
filesystem is later discarded, *unless* you choose to CMS RESERVE the
disk.  The reserved file has its own merits which are beyond scope.
But if you're on VM, "reserved" is the best justification for doing
partitions at all.

I encourage people to use FBA where possible because there no "low
level" format is needed (no blocking required, already done).

When using CKD, I encourage people to use "LDL" instead of "CDL"
because all the tracks are blocked the same.

-- R;
Rick Troth
Velocity Software
http://www.velocitysoftware.com/

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu 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