Assuming cchccwdev is a program, Red Hat doesn't have it, so here's the 
"manual" procedure, which should work on any distro with a 2.6 kernel.

If the device is 0100, for example, then you should have a directory:

/sys/bus/ccw/devices/0.0.0100/

that contains:

availability  cmb_enable  detach_state  discipline  readonly
block         cutype      devtype       online      use_diag

if you cat the file "online", and the device is actually online, it will return 
a "1".

To put the device offline:

echo 0 > online

Then you can safely detach it via VM.

On the target system, the subdirectory "0.0.0100" won't appear until you attach 
or link device 0100 via VM.  Once that's done, you echo a "1" to the "online" 
file to bring it on.

Note that this is INDEPENDENT of the device string you pass the module in 
modprobe.conf.  Those are devices brought online AUTOMATICALLY.  Using this 
manual method, you can bring ANY DASD device online that is linked or attached 
to the guest. We use this scheme to temporarily bring the CMS 191 disk online 
during boot to copy off configuration files.

Piece of cake!

> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of
> Ranga Nathan
> Sent: Wednesday, May 10, 2006 4:58 PM
> To: LINUX-390@VM.MARIST.EDU
> Subject: Re: [LINUX-390] Is it possible to move an LVM from guest to
> guest?
> 
> 
> 
> 
> Hall, Ken (GTI) wrote:
> > Unmount the filesystem, and run "vgexport" for the volume group.
> Great.
> > Then take the volume offline via sysfs
> 
> You mean  cchccwdev -d /dev/.... ?
> sysfs manpage refers to /proc/filesystems which lists used 
> file systems.
> 
> > , and detach it from the guest (This assumes you're on the 
> 2.6 kernel.  With 2.4 it's a little more complicated).
> >
> on 2.6. Good to go!
> > Repeat the process in reverse on the other system, doing a 
> vgimport on the other side.
> Cool.
> >  I'm reasonably sure I've done this successfully.
> >
> > It's much easier to set up an NFS share though, and leave 
> the volume attached to one guest.
> >
> Agreed, NFS would be helpful, but when you have to do repairs 
> in single
> user mode, it is good  to mount the LVM in the sick guest 
> sometimes and
> do the repair, although most likely I will mount the sick volume on a
> good guest. You got me thinking.
> Thanks a bunch.
> >
> >> -----Original Message-----
> >> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] 
> Behalf Of
> >> Ranga Nathan
> >> Sent: Wednesday, May 10, 2006 2:52 PM
> >> To: LINUX-390@VM.MARIST.EDU
> >> Subject: [LINUX-390] Is it possible to move an LVM from guest
> >> to guest?
> >>
> >>
> >> I want to set up an LVM that I can move from guest to 
> guest. I have a
> >> 3390-09 volume that I want to use for this.
> >> Why? It makes it easy to re-do file systems, at least for now.
> >> I have LVM running on a couple of guests but I dont know if it is
> >> possible to move this 'utility' LVM from guest to guest
> >> easily *without*
> >> any outage to  the guests.
> >> Thanks
> >>
> >> --
> >> __________________
> >> Ranga Nathan
> >> Work: 714-442-7591
> >>
--------------------------------------------------------

If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/
--------------------------------------------------------

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

Reply via email to