[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Xen-users] Lost images..


  • To: "'Ian Campbell'" <Ian.Campbell@xxxxxxxxxx>
  • From: "Stephan Viljoen" <steph@xxxxxxxxx>
  • Date: Thu, 26 Jun 2014 17:04:21 +0200
  • Cc: 'xen-devel' <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 27 Jun 2014 07:21:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQKKZfWp0pxzy0XOQQctciao48mbzgGjI+DrAeTadhEByPalHgHsDQbKAik+Gz+ZwqDjIA==

Sorry . I probably  missed  the past where you've asked for the output in all 
the excitement.

I've attached it as a txt file , I hope this is ok ?

-steph


-----Original Message-----
From: Ian Campbell [mailto:Ian.Campbell@xxxxxxxxxx] 
Sent: Thursday, June 26, 2014 4:55 PM
To: Stephan Viljoen
Cc: xen-devel
Subject: Re: [Xen-users] Lost images..

(copying the list again)

The mapping from blkback to /dev/loop* would have been in the xenstore-ls -fp 
output I asked for. Look for the physical-device node associated with each 
device. It will contain the major and minor numbers of the loop device..

Ian.

On Thu, 2014-06-26 at 16:50 +0200, Stephan Viljoen wrote:
> Hi Ian,
> 
> Not sure whether you've received the email I've sent before you've replied? I 
> think my images are attached to /dev/loop$ but I'm not really sure how to 
> figure out which /dev/loop device belongs to which image?
>  2354 ?        Sl     3:38 /usr/lib/xen/bin/qemu-dm -d 4 -serial pty 
> -domain-name test-01 -videoram 4 -k en-us -vnc 0.0.0.0:0 -vncunused -M xenpv
> 
> I'm guessing blkback has mounted the two images under /dev/loop  ?
>  2567 ?        S      1:16 [blkback.4.xvda]
>  2568 ?        S      2:31 [blkback.4.xvdb]
> 
> Also , I'm running xen 4.2.2-22 on Centos 6.4.
> 
> xen-ocaml-4.2.2-22.el6.centos.alt.x86_64
> xen-hypervisor-4.2.2-22.el6.centos.alt.x86_64
> libvirt-daemon-xen-0.10.2.4-5.el6.centos.alt.x86_64
> centos-release-xen-6-2.el6.centos.x86_64
> xen-libs-4.2.2-22.el6.centos.alt.x86_64
> libvirt-daemon-driver-xen-0.10.2.4-5.el6.centos.alt.x86_64
> xen-4.2.2-22.el6.centos.alt.x86_64
> xen-licenses-4.2.2-22.el6.centos.alt.x86_64
> xen-doc-4.2.2-22.el6.centos.alt.x86_64
> xen-runtime-4.2.2-22.el6.centos.alt.x86_64
> 
> -----Original Message-----
> From: Ian Campbell [mailto:Ian.Campbell@xxxxxxxxxx]
> Sent: Thursday, June 26, 2014 4:21 PM
> To: Stephan Viljoen
> Cc: xen-users@xxxxxxxxxxxxx
> Subject: Re: [Xen-users] Lost images..
> 
> On Thu, 2014-06-26 at 15:47 +0200, Stephan Viljoen wrote:
> > Ok , I think I understand now. 
> > 
> > 2354 ?        Sl     3:36 /usr/lib/xen/bin/qemu-dm -d 4 -serial pty 
> > -domain-name test-01 -videoram 4 -k en-us -vnc 0.0.0.0:0 -vncunused -M xenpv
> > So if the domains runs under PID 2354 for instance , then I should be able 
> > to recover the image from the following folder ?
> > /proc/2354/fd
> > 
> > Here's the content of the directory , how do I actually go about recovering 
> > the actual disk image ?
> 
> I was expecting one of those things to be a link to the filesystem image. But 
> I don't see it, so it may be that this qemu process is not providing disk 
> services (just other stuff).
> 
> What version of Xen are you running? What toolstack? and what does your 
> domain cfg file contain? Can you also post the output of "xenstore-ls -fp".
> 
> Ian.
> 
> 
> > 
> > dr-x------ 2 root root  0 Jun 26 15:46 .
> > dr-xr-xr-x 8 root root  0 Jun 26 15:45 ..
> > lr-x------ 1 root root 64 Jun 26 15:46 0 -> /dev/null
> > l-wx------ 1 root root 64 Jun 26 15:46 1 -> 
> > /var/log/xen/qemu-dm-test-01.log
> > lrwx------ 1 root root 64 Jun 26 15:46 10 -> /proc/xen/xenbus
> > lr-x------ 1 root root 64 Jun 26 15:46 11 -> pipe:[14474]
> > l-wx------ 1 root root 64 Jun 26 15:46 12 -> pipe:[14474]
> > lrwx------ 1 root root 64 Jun 26 15:46 13 -> /proc/xen/privcmd
> > lrwx------ 1 root root 64 Jun 26 15:46 14 -> /dev/xen/evtchn
> > lrwx------ 1 root root 64 Jun 26 15:46 15 -> /dev/xen/gntdev
> > lrwx------ 1 root root 64 Jun 26 15:46 16 -> /dev/ptmx
> > lrwx------ 1 root root 64 Jun 26 15:46 17 -> /dev/xen/evtchn
> > lrwx------ 1 root root 64 Jun 26 15:46 18 -> /dev/xen/evtchn
> > lrwx------ 1 root root 64 Jun 26 15:46 19 -> socket:[15403]
> > l-wx------ 1 root root 64 Jun 26 15:46 2 -> 
> > /var/log/xen/qemu-dm-test-01.log
> > lr-x------ 1 root root 64 Jun 26 15:46 20 -> pipe:[15405]
> > l-wx------ 1 root root 64 Jun 26 15:46 21 -> pipe:[15405]
> > lrwx------ 1 root root 64 Jun 26 15:46 25 -> 
> > /var/run/xend/dm-4-1403189404.fifo
> > lr-x------ 1 root root 64 Jun 26 15:46 3 -> pipe:[14469]
> > l-wx------ 1 root root 64 Jun 26 15:46 4 -> pipe:[14469]
> > lrwx------ 1 root root 64 Jun 26 15:46 5 -> /proc/xen/privcmd
> > lrwx------ 1 root root 64 Jun 26 15:46 6 -> /proc/xen/xenbus
> > lrwx------ 1 root root 64 Jun 26 15:46 7 -> /dev/ptmx
> > lrwx------ 1 root root 64 Jun 26 15:46 8 -> /var/run/tap/qemu-read-4
> > lrwx------ 1 root root 64 Jun 26 15:46 9 -> 
> > /var/run/tap/qemu-write-4
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: xen-users-bounces@xxxxxxxxxxxxx 
> > [mailto:xen-users-bounces@xxxxxxxxxxxxx] On Behalf Of Ian Campbell
> > Sent: Thursday, June 26, 2014 2:58 PM
> > To: Stephan Viljoen
> > Cc: xen-users@xxxxxxxxxxxxx
> > Subject: Re: [Xen-users] Lost images..
> > 
> > On Thu, 2014-06-26 at 14:41 +0200, Stephan Viljoen wrote:
> > > I just made one hell of screw up by accidently deleting the wrong 
> > > folder containing all my xend domain images. Now the strange part 
> > > is , all those hosts are still alive and thankfully Iâm able to 
> > > make backups for the content so I was wondering whether thereâs a 
> > > way to somehow restore the images?
> > 
> > If this were happening with normal processes (i.e. you've deleted a file 
> > which some process has open) then you'd be able to recover it via 
> > /proc/$PID/fd.
> > 
> > So if the domains are using a userspace process as a disk backend (e.g.
> > tapdisk or qdisk) then you could probably apply that technique to the 
> > backend processes.
> > 
> > If the domains are using loop+blkback then I guess you might find the 
> > content in /dev/loop*.
> > 
> > If the domains are using just blkback directly then I think you might be 
> > stuck, or at least I don't know what to suggest. You said folder of images 
> > so I'm hopeful you don't fall into this case.
> > 
> > Ian.
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Xen-users mailing list
> > Xen-users@xxxxxxxxxxxxx
> > http://lists.xen.org/xen-users
> > 
> 
> 
> 


Attachment: xenstore.txt
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.