I take that back.... something went wrong and the partition wasn’t resized
after all.   No worries.

Cheers

On Wed, Apr 25, 2018 at 13:32 Donald Russell <[email protected]> wrote:

> Thanks Stefan,
> That all worked like a charm except I can’t seem to get the file system
> expanded.
>
> I got everything copied, deleted and created a new larger partition with
> the same starting track.
>
> The file system is ccs so I booted up the new disk and thought xfs_growfs
> would do the trick.  I’m almost there, I need to read more about xfs_growfs
> I think.
>
> Cheers,
> Don
>
>
>
> On Wed, Apr 25, 2018 at 07:31 Stefan Haberland <[email protected]>
> wrote:
>
>> On 25.04.2018 05:48, Donald Russell wrote:
>> > I have a RHEL 7 zLinux on a single Mod-9 ECKD DASD.  there are three
>> > partitions:
>> > 1 - /boot
>> > 2 - swap
>> > 3 - /
>> >
>> >  From one Linux system I tried attaching a not-in-use zLinux Mod-9 and a
>> > Mod-27 and using fdasd and dd to copy the partitions.  That didn’t work,
>> > then I tried a VM DDR of the Mod-9 to  Mod-27. My thinking was I could
>> then
>> > simply expand the the third partition and expand the file system on it.
>> >
>> > When I went to delete/create a new partition fdasd thinks my Mod-27 is
>> > still a Mod-9 (10016 cyls)
>> >
>> > I’m guessing there’s something in cyl 0 that tells zLinux the size of
>> the
>> > disk.   If I can tweak that to show the disk is actually 32759 cylinders
>> > then I may have a shot at success.
>> >
>> > Does anybody have any suggestions for how to move RHEL system from
>> Mod-9 to
>> > Mod-27?
>> >
>> > Thanks,
>> > Donald Russell
>>
>> Hi,
>>
>> Expanding a CDL formatted ECKD DASD is unfortunately not that easy.(I
>> assume it is CDL formatted...)
>>
>> First of all it is important to have the new disk formatted properly in
>> the same way that the old disk is formatted - using dasdfmt.
>> It is recommended to format the new DASD _BEFORE_ you try to copy any
>> data.
>> (Side node: On RHEL7.4 there should be the possibility to format the
>> remaining part of the dasd using dasdfmt's expand mode: "dasdfmt -M
>> expand /dev/dasdX". But not sure if it is available on your system.)
>>
>> Afterwards you should (in theory) use fdasd to re-create the VTOC on the
>> disk with the new size. fdasd command "u - re-create VTOC re-using
>> existing partition sizes". And afterwards you could delete the last
>> partition and re-create it with a bigger size.
>>
>> But unfortunately (as I tried this recently) there seems to be a bug in
>> fdasd leading to a message like "BUG: specified free space extent for
>> deleting not found in FMT5 DSCB!" or something similar with a FMT7 DSCB.
>> This does not allow you to create a new partition.
>>
>> The only way I managed to get around this is the following:
>>
>> - format the new DASD using dasdfmt
>> - dd old DASD to new DASD
>> - run blockdev --flushbufs on new DASD to make sure caches are cleared
>> - write down current partition boundaries
>> - run fdasd -a on new DASD to create one single partition and fix the size
>> - run fdasd on the new DASD to
>>      - delete the one partition
>>      - create the three partitions with their old boundaries except the
>> last one, which can be enhanced to the end of the disk
>> - run tool to resize the filesystem (usually resize2fs)
>>
>> This worked for me but you have to be careful with the partition
>> boundaries as any mistake could lead to a damage of the data.
>>
>> Regards,
>> Stefan
>>
>> ----------------------------------------------------------------------
>> 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