Re: How to unformat a dasd drive?

2016-05-17 Thread Alan Altmark
On Tuesday, 05/17/2016 at 06:55 GMT, "Pavelka, Tomas" 
 wrote:
> I am assuming you want to do this from Linux and not from CMS. If I 
remember it right, the DASD
> driver does not show you the entire device, only the data portion of CKD 
and also not record 0.
> This means that if dasd has been once formatted, Linux will try to 
access it as formatted drive.
>
> There is a way to access raw tracks from Linux, look in Device Drivers, 
Features and Commands and
> search for "Accessing full ECKD tracks". Unfortunately, the last time I 
tried this (a couple of
> years ago) not all kernels supported this and also even on newer 
kernels, some non-IBM devices did
> not support raw track mode from Linux.

In case it's ever needed, if you want to remove ALL formatting from a disk 
you have to *delete* the records, not just overwrite them.  To do that, 
run ICKDSF TRKFMT UNIT(dev) ERASEDATA CYLRANGE(0,20) NOVERIFY.

I have seen no other formatting program that will actually delete the 
records.  In many cases CYLRANGE(0,0) is sufficient to make an OS think 
the disk is brand new. 

Alan Altmark

Senior Managing z/VM and Linux Consultant
Lab Services System z Delivery Practice
IBM Systems & Technology Group
ibm.com/systems/services/labservices
office: 607.429.3323
mobile; 607.321.7556
alan_altm...@us.ibm.com
IBM Endicott

--
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: More on crypto

2016-05-17 Thread Marcy Cortes
thanks!   Turns out i figured things out without resorting to C sample packages.

There's something goofy with libica2 and libica-2_1_0 packaging in SP4.   At 
least this particular server ended up messed up.

Looks like you must have them both even though there is a lot of file overlap.  
 (and actually we have libica_2_0_2 as well due to upgrades along the way).  
Without the libica-2_1_0 package there isn't a /usr/lib64/libica.so link to 
anything.   The openCryptoki install pulls in libica2.

I ended up removing all the libica* packages and putting the 2_1_0 one and then 
the libica2 one on and that fixed it.
/usr/lib64/libica.so ends up being a symlink to libica-2.1.0.so.  

Not sure why libica2 package isn't really a replacement but with it only, no 
symlink for /usr/lib64/libica.so and I suspect that's what GSK is looking for.  
Turns out zypper itself needs it too and blows up without it (a prereq that it 
didn't record in the rpm database apparently).
 

Going back to my SR now...



-Original Message-
From: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Mark Post
Sent: Monday, May 16, 2016 5:03 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: [LINUX-390] More on crypto

>>> On 5/16/2016 at 07:57 PM, Marcy Cortes  
>>> wrote: 
> Thanks!
> Will have to go get the source package I guess!  Was hoping it was  in 
> some SUSE rpm I didn't have.

You should be able to download the SRPM using zypper.

zypper in -d -t srcpackage openCryptoki

Will download the source package and leave it in /var/cache/zypp/packages/...


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/

--
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: How to unformat a dasd drive?

2016-05-17 Thread Tom Huegel
If you are z/VM you can use TRACKWRITE (currently in the authors edition)
pipe stage to write just about anything you want to an ECKD device..

On Tue, May 17, 2016 at 9:36 AM, Mark Post  wrote:

> >>> On 5/17/2016 at 11:51 AM, Scott Rohling 
> wrote:
> > I'm wondering if something like this would work?:
> >
> > You can add 'count=xx' to only write so many blocks...  not sure how many
> > it takes to wipe formatting info - nothing to play with at the moment..
> >
> >
> > dd if=/dev/zero of=/dev/dasdX iflag=nocache oflag=direct bs=4096
>
> It doesn't seem to work. You're still going to be limited by the
> dasd_eckd_mod driver to writing in the formatted space and not the raw
> device itself.  I even tried turning on the raw_track_access and that
> didn't help either.  Trying to use both that and oflag=direct caused an I/O
> error and the dd aborted.
>
>
> 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/
>

--
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: How to unformat a dasd drive?

2016-05-17 Thread Mark Post
>>> On 5/17/2016 at 11:51 AM, Scott Rohling  wrote: 
> I'm wondering if something like this would work?:
> 
> You can add 'count=xx' to only write so many blocks...  not sure how many
> it takes to wipe formatting info - nothing to play with at the moment..
> 
> 
> dd if=/dev/zero of=/dev/dasdX iflag=nocache oflag=direct bs=4096

It doesn't seem to work. You're still going to be limited by the dasd_eckd_mod 
driver to writing in the formatted space and not the raw device itself.  I even 
tried turning on the raw_track_access and that didn't help either.  Trying to 
use both that and oflag=direct caused an I/O error and the dd aborted.


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/


Re: How to unformat a dasd drive?

2016-05-17 Thread Scott Rohling
I'm wondering if something like this would work?:

You can add 'count=xx' to only write so many blocks...  not sure how many
it takes to wipe formatting info - nothing to play with at the moment..


dd if=/dev/zero of=/dev/dasdX iflag=nocache oflag=direct bs=4096


On Tue, May 17, 2016 at 8:39 AM, Mark Post  wrote:

> >>> On 5/17/2016 at 02:11 AM, Dimitri John Ledkov  wrote:
>
> > Is it possible to "unformat" a dasd drive such that on Linux it
> > appears as "n/f" in lsdasd output?
>
> The typical method is to use the z/VM utility CPFMTXA to re-format the
> volume.  Linux sees that as "not formatted."
>
>
> 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/
>

--
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: How to unformat a dasd drive?

2016-05-17 Thread Mark Post
>>> On 5/17/2016 at 02:11 AM, Dimitri John Ledkov  wrote: 

> Is it possible to "unformat" a dasd drive such that on Linux it
> appears as "n/f" in lsdasd output?

The typical method is to use the z/VM utility CPFMTXA to re-format the volume.  
Linux sees that as "not formatted."


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/


Re: swapgen and rhel 7

2016-05-17 Thread David Boyes
I think we dealt with this already. Check the help files; toward the end of the 
help file there are some new options to deal with the new swap signature.

Otherwise, let's take this off list; don't need to bore everyone with the 
debugging details.

--
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: How to unformat a dasd drive?

2016-05-17 Thread Hendrik Brueckner
Hi Dimitri,

On Tue, May 17, 2016 at 07:11:34AM +0100, Dimitri John Ledkov wrote:
>
> Is it possible to "unformat" a dasd drive such that on Linux it
> appears as "n/f" in lsdasd output?

You could try to start dasdfmt and then interrupt it.  It typically
work for me.

--
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: How to unformat a dasd drive?

2016-05-17 Thread Pavelka, Tomas
I am assuming you want to do this from Linux and not from CMS. If I remember it 
right, the DASD driver does not show you the entire device, only the data 
portion of CKD and also not record 0. This means that if dasd has been once 
formatted, Linux will try to access it as formatted drive.

There is a way to access raw tracks from Linux, look in Device Drivers, 
Features and Commands and search for "Accessing full ECKD tracks". 
Unfortunately, the last time I tried this (a couple of years ago) not all 
kernels supported this and also even on newer kernels, some non-IBM devices did 
not support raw track mode from Linux.

Why do you need to unformat drives? I once had a similar need because under 
certain conditions the Linux dasd driver would go into a loop trying to access 
badly formatted drives (this happened only on certain devices, but I forgot the 
details). I ended up writing a user exit for the directory manager that would 
wipe out the first few tracks on a newly created minidisk.

HTH,
Tomas

Tomas Pavelka
CA Technologies
Sr Software Engineer

CA CZ, s.r.o 
V Parku 12, 
148 00 Praha 
Czech Republic

Office: +25996 | tomas.pave...@ca.com



Id. Císlo 25694073, z obchodního rejstříku, vedeného Městským soudem v Praze, 
oddíl C, vložka 61808 / Id. No. 25694073, registered in the Commercial Register 
maintained by the Municipal Court in Praque, Section C, File 61808


-Original Message-
From: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Dimitri 
John Ledkov
Sent: Tuesday, May 17, 2016 8:12 AM
To: LINUX-390@VM.MARIST.EDU
Subject: How to unformat a dasd drive?

Hello,

Is it possible to "unformat" a dasd drive such that on Linux it appears as 
"n/f" in lsdasd output?

--
Regards,

Dimitri.

--
For LINUX-390 subscribe / signoff / archive access instructions, send email to 
lists...@vm.marist.edu with the message: INFO LINUX-390 or visit 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.marist.edu_htbin_wlvindex-3FLINUX-2D390=DQIBaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=DK2K-NIOOl0HxbipU0v85tkUyLDvwTVlpJtE__bnwNo=WFNCiVt1kjAqOG9uGgX4U7KnbiL6iFQ2IOERde-8zdU=nM3vMo000RB2KxSiVR9roT4FQ_pYUVlbF7-wfXoUEPM=
--
For more information on Linux on System z, visit 
https://urldefense.proofpoint.com/v2/url?u=http-3A__wiki.linuxvm.org_=DQIBaQ=_hRq4mqlUmqpqlyQ5hkoDXIVh6I6pxfkkNxQuL0p-Z0=DK2K-NIOOl0HxbipU0v85tkUyLDvwTVlpJtE__bnwNo=WFNCiVt1kjAqOG9uGgX4U7KnbiL6iFQ2IOERde-8zdU=AbPFiVvF5Taw8nEjIYblCJY-mXyy5EjBLuCZOJ2qyJY=
 


How to unformat a dasd drive?

2016-05-17 Thread Dimitri John Ledkov
Hello,

Is it possible to "unformat" a dasd drive such that on Linux it
appears as "n/f" in lsdasd output?

--
Regards,

Dimitri.

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