Re: Moving zLinux to a bigger disk - solved

2018-07-04 Thread Jan Höppner
Hi Donald,

> Just FYI... I spent many hours tinkering with VM DRR and Linux dd and
> different experiments of formatting etc etc. I had a case open with Red
> Hat, which they eventually pretty much gave up on and gave me the source
> code for fdasd and dasdfmt (which is where I learned of the --mode expand
> option in the first place. It’s not in the man pages.)
> 

that made me worry for a second. I just checked on a fresh RHEL7.5
installation and the modes option is fully documented in the man pages.

Regards,
Jan

--
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/


Re: Moving zLinux to a bigger disk - solved

2018-06-29 Thread Donald Russell
Peter,
THANK YOU !! Using fdasd option u fixed it up. I was then able to expand
the file system and I now have a happy RHEL system on a mod-27 with lots of
spare space.

Just FYI... I spent many hours tinkering with VM DRR and Linux dd and
different experiments of formatting etc etc. I had a case open with Red
Hat, which they eventually pretty much gave up on and gave me the source
code for fdasd and dasdfmt (which is where I learned of the --mode expand
option in the first place. It’s not in the man pages.)

Like so many things, when you know how, it’s simple. Once again, the
informal, no-charge listserv community out-performs the paid-for official
support. TGFL - Thank God For Listserv.  LOL

Thanks again.
Donald Russell


On Fri, Jun 29, 2018 at 05:01 Peter Oberparleiter 
wrote:

> On 29.06.2018 00:10, Donald Russell wrote:
> > On Thu, Jun 28, 2018 at 14:27 Donald Russell 
> wrote:
> >> The dasdfmt -b 4096 --mode=expand worked great.   Started formatting the
> >> disk at track 150240 as expected.  But then fdasd choked saying only the
> >> first 10016 cylinders are formatted so I can’t create the new larger
> >> partition.
> >>
> >> How can I coerce fdasd into doing the right thing? Whatever fdasd is
> >> looking at for that cylinder count I expected dasdfmt to update.
> >>
> >> Where is that data, maybe I can just zap it with some other tool like
> cms
> >> pipe read/write track.
>
> fdasd is looking at the DASD's VTOC, specifically at the format 5 DSCB
> that is supposed to list free space extents on the volume. The 'dasdfmt
> --mode expand' call doesn't add the newly formatted extent to this DSCB,
> therefore fdasd assumes that that it is not formatted.
>
> This is a bug/limitation in dasdfmt/fdasd and we plan to fix this in a
> future version of s390-tools.
>
> In the meantime, you can try the following:
>
> # fdasd /dev/dasd...
> u ('re-create VTOC re-using existing partition sizes')
> y ('yes')
> w ('write table to disk and exit')
>
> You need to perform these steps TWICE, or fdasd will terminate with a
> "BUG..." statement when you try to create/change partitions afterwards.
>
>
> Regards,
>   Peter Oberparleiter
>
> --
> Peter Oberparleiter
> Linux on Z Development - IBM Germany
>
> --
> 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/
>

--
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/


Re: Moving zLinux to a bigger disk

2018-06-29 Thread Peter Oberparleiter
On 29.06.2018 00:10, Donald Russell wrote:
> On Thu, Jun 28, 2018 at 14:27 Donald Russell  wrote:
>> The dasdfmt -b 4096 --mode=expand worked great.   Started formatting the
>> disk at track 150240 as expected.  But then fdasd choked saying only the
>> first 10016 cylinders are formatted so I can’t create the new larger
>> partition.
>>
>> How can I coerce fdasd into doing the right thing? Whatever fdasd is
>> looking at for that cylinder count I expected dasdfmt to update.
>>
>> Where is that data, maybe I can just zap it with some other tool like cms
>> pipe read/write track.

fdasd is looking at the DASD's VTOC, specifically at the format 5 DSCB
that is supposed to list free space extents on the volume. The 'dasdfmt
--mode expand' call doesn't add the newly formatted extent to this DSCB,
therefore fdasd assumes that that it is not formatted.

This is a bug/limitation in dasdfmt/fdasd and we plan to fix this in a
future version of s390-tools.

In the meantime, you can try the following:

# fdasd /dev/dasd...
u ('re-create VTOC re-using existing partition sizes')
y ('yes')
w ('write table to disk and exit')

You need to perform these steps TWICE, or fdasd will terminate with a
"BUG..." statement when you try to create/change partitions afterwards.


Regards,
  Peter Oberparleiter

-- 
Peter Oberparleiter
Linux on Z Development - IBM Germany

--
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/


Re: Moving zLinux to a bigger disk

2018-06-29 Thread Mark Post
>>> On 6/28/2018 at 06:10 PM, Donald Russell  wrote: 
> I forgot to put a subject.  Now there*s one.  :-)
> Don
> 
> On Thu, Jun 28, 2018 at 14:27 Donald Russell  wrote:
> 
-snip-
>> Any suggestions beyond install from scratch on the larger disk? :-)

What I typically do is:
1. Run dasdfmt on the whole of the new disk.
2. Copy the older/smaller volume to the new one
3. Use fdasd to print out the old partition table
4. Delete the old partition table
5. Recreate the partition table using the information from #3, but make sure 
the "last" partition goes to the end of the disk.

Even then, you have to understand just what to do with that new, larger 
partition in terms of what file system is on it, or if it's an LVM PV, etc. and 
jigger that around until the system knows just how much space it has.  The 
other possibility is to format the disk, create the partitions the way you want 
them, create any LVM PVs, LV, etc., create file systems, and then use the HOWTO 
at http://linuxvm.org/Info/HOWTOs/movefs.html to copy over the entire system.  
That will take considerably longer, since you're not doing large block I/Os, 
but depending on your comfort level with the previous method, it might be 
easier for you.


Mark Post

--
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/


Moving zLinux to a bigger disk

2018-06-28 Thread Donald Russell
I forgot to put a subject.  Now there’s one.  :-)
Don

On Thu, Jun 28, 2018 at 14:27 Donald Russell  wrote:

> I have RHEL 7 system on a mod-9 (10016 cup) ECKD DASD and want to move it
> to a mod-27 (32759 cyl).
>
> The disk is not in use, I used zVM/CMS to DDR the disk to the larger one.
> Then I attached it to a zLinux system to format the back end of the disk.
> After that I would remove the last partition and create a new partition
> extending to the end of disk and finally  resize the file system in that
> partition.
>
> The dasdfmt -b 4096 --mode=expand worked great.   Started formatting the
> disk at track 150240 as expected.  But then fdasd choked saying only the
> first 10016 cylinders are formatted so I can’t create the new larger
> partition.
>
> How can I coerce fdasd into doing the right thing? Whatever fdasd is
> looking at for that cylinder count I expected dasdfmt to update.
>
> Where is that data, maybe I can just zap it with some other tool like cms
> pipe read/write track.
>
> I also tried dasdfmt --mode=quick which fixed my fdasd issue.  It now got
> the right size of the disk but that removes the IPL record and who knows
> what else so the disk was no longer bootable.
>
> Any suggestions beyond install from scratch on the larger disk? :-)
>
> Thanks,
> Don
>
> Thu 28 Jun 20:58:17 UTC
> [root@sl55zdump] ~
> #dasdfmt -b 4096 --mode=expand /dev/dasdr
> Expansion mode active. Searching for starting position...
> Done. Unformatted part starts at track 150240.
> Drive Geometry: 32759 Cylinders * 15 Heads =  491385 Tracks
>
> I am going to format the device /dev/dasdr in the following way:
>Device number of device : 0x200
>Labelling device: yes
>Disk label  : VOL1
>Disk identifier : 0X0200
>Extent start (trk no)   : 150240
>Extent end (trk no) : 491384
>Compatible Disk Layout  : yes
>Blocksize   : 4096
>Mode: Expand
>
> Type "yes" to continue, no will leave the disk untouched: yes
> Formatting the device. This may take a while (get yourself a coffee).
>
> Finished formatting the device.
> Rereading the partition table... ok
>
> Thu 28 Jun 21:05:40 UTC
> [root@sl55zdump] ~
> #fdasd /dev/dasdr
> reading volume label ..: VOL1
> reading vtoc ..: ok
> WARNING: This device is not fully formatted! Only 10016 of 32759 cylinders
> are available.
>
>
>
>
>
>
>
>

--
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/