* [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? @ 2010-05-31 19:21 Romeo Theriault 2010-05-31 20:45 ` Ray Morris 2010-06-02 9:15 ` Bryn M. Reeves 0 siblings, 2 replies; 9+ messages in thread From: Romeo Theriault @ 2010-05-31 19:21 UTC (permalink / raw) To: linux-lvm I apologize if this has been asked before but I was unable to find any references to it in the mailing list archives and googling around isn't helping much. Is there a way to directly mount, bypassing LVM, a ext3 partition that resides in a LVM LV and VG? It resides on one PV. The problem is that I have read-only copies of VM's that are backed up via a SAN based snapshot/backup tool. I'm trying to create a method to allow the VM admins to restore their files from the snapshot backed up VM's. I'm at the point where I can access the partitions and can mount the ext3 partitions fine but I'm having trouble with the LVM volumes because I can't import the pv/vg because they have the same name/uuid as the existing VG (it's really the same system) and I can't change them with something like vgimportclone because the backed up vm image files are read-only. Thanks for any help. -- Romeo Theriault ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-05-31 19:21 [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? Romeo Theriault @ 2010-05-31 20:45 ` Ray Morris 2010-05-31 21:17 ` Hull, Brett (MSE) 2010-06-01 13:23 ` Romeo Theriault 2010-06-02 9:15 ` Bryn M. Reeves 1 sibling, 2 replies; 9+ messages in thread From: Ray Morris @ 2010-05-31 20:45 UTC (permalink / raw) To: LVM general discussion and development In general, no, though in your specific case it may be that all of the extents are stored contigously and it might work. You would probably need to use losetup -o and specify the offset. This would be more of a last ditch data recovery effort than something you'd design into a production system, though. You might have better results altering one of these issues that is causing you to consider such action: > I can't import the pv/vg because they have the same name/uuid > as the existing VG (it's really the same system) and I can't change > them with something like vgimportclone because the backed up vm image > files are read-only. In other words, you would back up to one of the following questions: How can I change the names and UUIDs of the backups? How can I import an LV which has a conflicting UUID? How can I use vgimport with a read only source? Specifically, you might be able to ignore the meta data on the backup volumes with pvmetadatacopies = 0 and use "dirs" in lvm.conf, so you can change the working meta data even though they are read only. -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 05/31/2010 02:21:36 PM, Romeo Theriault wrote: > I apologize if this has been asked before but I was unable to find any > references to it in the mailing list archives and googling around > isn't helping much. > > Is there a way to directly mount, bypassing LVM, a ext3 partition that > resides in a LVM LV and VG? It resides on one PV. > > The problem is that I have read-only copies of VM's that are backed up > via a SAN based snapshot/backup tool. I'm trying to create a method to > allow the VM admins to restore their files from the snapshot backed up > VM's. I'm at the point where I can access the partitions and can mount > the ext3 partitions fine but I'm having trouble with the LVM volumes > because I can't import the pv/vg because they have the same name/uuid > as the existing VG (it's really the same system) and I can't change > them with something like vgimportclone because the backed up vm image > files are read-only. > > Thanks for any help. > > -- > Romeo Theriault > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-05-31 20:45 ` Ray Morris @ 2010-05-31 21:17 ` Hull, Brett (MSE) 2010-06-01 13:27 ` Romeo Theriault 2010-06-01 15:56 ` K. Richard Pixley 2010-06-01 13:23 ` Romeo Theriault 1 sibling, 2 replies; 9+ messages in thread From: Hull, Brett (MSE) @ 2010-05-31 21:17 UTC (permalink / raw) To: LVM general discussion and development Hello, Can you restore these backups to another system? Such as one designated to do this job? Maybe using a virtual machine? You could then create the environment restore the data and move the "recovered files" to the production box. I do not know your environment, but you might not want to change the backed up data because that is what you will use to restore if there is a full loss of data on your production system. Best regards, Brett -----Original Message----- From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On Behalf Of Ray Morris Sent: Monday, May 31, 2010 2:45 PM To: LVM general discussion and development Subject: Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? In general, no, though in your specific case it may be that all of the extents are stored contigously and it might work. You would probably need to use losetup -o and specify the offset. This would be more of a last ditch data recovery effort than something you'd design into a production system, though. You might have better results altering one of these issues that is causing you to consider such action: > I can't import the pv/vg because they have the same name/uuid > as the existing VG (it's really the same system) and I can't change > them with something like vgimportclone because the backed up vm image > files are read-only. In other words, you would back up to one of the following questions: How can I change the names and UUIDs of the backups? How can I import an LV which has a conflicting UUID? How can I use vgimport with a read only source? Specifically, you might be able to ignore the meta data on the backup volumes with pvmetadatacopies = 0 and use "dirs" in lvm.conf, so you can change the working meta data even though they are read only. -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 05/31/2010 02:21:36 PM, Romeo Theriault wrote: > I apologize if this has been asked before but I was unable to find any > references to it in the mailing list archives and googling around > isn't helping much. > > Is there a way to directly mount, bypassing LVM, a ext3 partition that > resides in a LVM LV and VG? It resides on one PV. > > The problem is that I have read-only copies of VM's that are backed up > via a SAN based snapshot/backup tool. I'm trying to create a method to > allow the VM admins to restore their files from the snapshot backed up > VM's. I'm at the point where I can access the partitions and can mount > the ext3 partitions fine but I'm having trouble with the LVM volumes > because I can't import the pv/vg because they have the same name/uuid > as the existing VG (it's really the same system) and I can't change > them with something like vgimportclone because the backed up vm image > files are read-only. > > Thanks for any help. > > -- > Romeo Theriault > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > > _______________________________________________ linux-lvm mailing list linux-lvm@redhat.com https://www.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-05-31 21:17 ` Hull, Brett (MSE) @ 2010-06-01 13:27 ` Romeo Theriault 2010-06-01 13:54 ` Ray Morris 2010-06-01 15:56 ` K. Richard Pixley 1 sibling, 1 reply; 9+ messages in thread From: Romeo Theriault @ 2010-06-01 13:27 UTC (permalink / raw) To: LVM general discussion and development Hi, > �Can you restore these backups to another system? �Such as one designated to do this job? Yes, I've thought about this a bit too. The problem that I see with this is that I'll only be able to have one restore at a time happening, since almost all our linux vm's have the same named VG's and LV's and they are on read-only media so I wouldn't be able to rename them.... I've going to have to keeping thinking about this one. Thanks for the pointers. Romeo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-06-01 13:27 ` Romeo Theriault @ 2010-06-01 13:54 ` Ray Morris 2010-06-01 14:00 ` Romeo Theriault 0 siblings, 1 reply; 9+ messages in thread From: Ray Morris @ 2010-06-01 13:54 UTC (permalink / raw) To: LVM general discussion and development > I'll only be able to have one restore at a time happening, > since almost all our linux vm's have the same named VG's > and LV's Fedora used to by default name the VG for every machine volgroup001 or something like that. They then changed to naming it after the machine, I believe. You are discovering one of the reasons why having them all named the same is a bad idea. When a SAN is involved, one can of course envision several other problems limits on future usage. Your best course of action may be to eliminate the root cause and rename the source VGs. -- Ray Morris support@bettercgi.com Strongbox - The next generation in site security: http://www.bettercgi.com/strongbox/ Throttlebox - Intelligent Bandwidth Control http://www.bettercgi.com/throttlebox/ Strongbox / Throttlebox affiliate program: http://www.bettercgi.com/affiliates/user/register.php On 06/01/2010 08:27:22 AM, Romeo Theriault wrote: > Hi, > > > �Can you restore these backups to another system? �Such as one > designated to do this job? > > Yes, I've thought about this a bit too. The problem that I see with > this is that I'll only be able to have one restore at a time > happening, since almost all our linux vm's have the same named VG's > and LV's and they are on read-only media so I wouldn't be able to > rename them.... > > I've going to have to keeping thinking about this one. > > Thanks for the pointers. > > Romeo > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-06-01 13:54 ` Ray Morris @ 2010-06-01 14:00 ` Romeo Theriault 0 siblings, 0 replies; 9+ messages in thread From: Romeo Theriault @ 2010-06-01 14:00 UTC (permalink / raw) To: LVM general discussion and development On Tue, Jun 1, 2010 at 22:54, Ray Morris <support@bettercgi.com> wrote: >> I'll only be able to have one restore at a time happening, >> since almost all our linux vm's have the same named VG's >> and LV's > > � Fedora used to by default name the VG for every machine > volgroup001 or something like that. �They then changed to > naming it after the machine, I believe. �You are discovering > one of the reasons why having them all named the same is a > bad idea. �When a SAN is involved, one can of course envision > several other problems limits on future usage. �Your best course > of action may be to eliminate the root cause and rename the > source VGs. Hmmm, interesting solution. I like it, though it's going to take some work to get all the VM's changed... Thanks! ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-05-31 21:17 ` Hull, Brett (MSE) 2010-06-01 13:27 ` Romeo Theriault @ 2010-06-01 15:56 ` K. Richard Pixley 1 sibling, 0 replies; 9+ messages in thread From: K. Richard Pixley @ 2010-06-01 15:56 UTC (permalink / raw) To: LVM general discussion and development [-- Attachment #1: Type: text/plain, Size: 4054 bytes --] You might be able to make those partitions available using nbd from the server, importing them on the vms. --rich Hull, Brett (MSE) wrote: > Hello, > > Can you restore these backups to another system? Such as one designated to do this job? Maybe using a virtual machine? You could then create the environment restore the data and move the "recovered files" to the production box. I do not know your environment, but you might not want to change the backed up data because that is what you will use to restore if there is a full loss of data on your production system. > > Best regards, > Brett > > -----Original Message----- > From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On Behalf Of Ray Morris > Sent: Monday, May 31, 2010 2:45 PM > To: LVM general discussion and development > Subject: Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? > > In general, no, though in your specific case it may be > that all of the extents are stored contigously and it might > work. You would probably need to use losetup -o and specify > the offset. This would be more of a last ditch data recovery > effort than something you'd design into a production system, > though. > > You might have better results altering one of these issues > that is causing you to consider such action: > > >> I can't import the pv/vg because they have the same name/uuid >> as the existing VG (it's really the same system) and I can't change >> them with something like vgimportclone because the backed up vm image >> files are read-only. >> > > In other words, you would back up to one of the following questions: > How can I change the names and UUIDs of the backups? > How can I import an LV which has a conflicting UUID? > How can I use vgimport with a read only source? > > Specifically, you might be able to ignore the meta data on > the backup volumes with pvmetadatacopies = 0 and use "dirs" > in lvm.conf, so you can change the working meta data even > though they are read only. > -- > Ray Morris > support@bettercgi.com > > Strongbox - The next generation in site security: > http://www.bettercgi.com/strongbox/ > > Throttlebox - Intelligent Bandwidth Control > http://www.bettercgi.com/throttlebox/ > > Strongbox / Throttlebox affiliate program: > http://www.bettercgi.com/affiliates/user/register.php > > > On 05/31/2010 02:21:36 PM, Romeo Theriault wrote: > >> I apologize if this has been asked before but I was unable to find any >> references to it in the mailing list archives and googling around >> isn't helping much. >> >> Is there a way to directly mount, bypassing LVM, a ext3 partition that >> resides in a LVM LV and VG? It resides on one PV. >> >> The problem is that I have read-only copies of VM's that are backed up >> via a SAN based snapshot/backup tool. I'm trying to create a method to >> allow the VM admins to restore their files from the snapshot backed up >> VM's. I'm at the point where I can access the partitions and can mount >> the ext3 partitions fine but I'm having trouble with the LVM volumes >> because I can't import the pv/vg because they have the same name/uuid >> as the existing VG (it's really the same system) and I can't change >> them with something like vgimportclone because the backed up vm image >> files are read-only. >> >> Thanks for any help. >> >> -- >> Romeo Theriault >> >> _______________________________________________ >> linux-lvm mailing list >> linux-lvm@redhat.com >> https://www.redhat.com/mailman/listinfo/linux-lvm >> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ >> >> >> > > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > > _______________________________________________ > linux-lvm mailing list > linux-lvm@redhat.com > https://www.redhat.com/mailman/listinfo/linux-lvm > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/ > [-- Attachment #2: Type: text/html, Size: 5648 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-05-31 20:45 ` Ray Morris 2010-05-31 21:17 ` Hull, Brett (MSE) @ 2010-06-01 13:23 ` Romeo Theriault 1 sibling, 0 replies; 9+ messages in thread From: Romeo Theriault @ 2010-06-01 13:23 UTC (permalink / raw) To: LVM general discussion and development On Tue, Jun 1, 2010 at 05:45, Ray Morris <support@bettercgi.com> wrote: > > �In general, no, though in your specific case it may be > that all of the extents are stored contigously and it might > work. You would probably need to use losetup -o and specify > the offset. �This would be more of a last ditch data recovery > effort than something you'd design into a production system, > though. Alright, was hoping for a life saver here but it doesn't sound like it's this way and you're right it doesn't sound production worthy. > > �You might have better results altering one of these issues > that is causing you to consider such action: > >> �I can't import the pv/vg because they have the same name/uuid >> as the existing VG (it's really the same system) and I can't change >> them with something like vgimportclone because the backed up vm image >> files are read-only. > > �In other words, you would back up to one of the following questions: > How can I change the names and UUIDs of the backups? > How can I import an LV which has a conflicting UUID? > How can I use vgimport with a read only source? > > �Specifically, you might be able to ignore the meta data on > the backup volumes with pvmetadatacopies �= 0 and use "dirs" > in lvm.conf, so you can change the working meta data even > though they are read only. Hmm, this sounds interesting I'll have to spend some time trying to figure out how this might be possible. Thanks for the ideas. Romeo ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? 2010-05-31 19:21 [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? Romeo Theriault 2010-05-31 20:45 ` Ray Morris @ 2010-06-02 9:15 ` Bryn M. Reeves 1 sibling, 0 replies; 9+ messages in thread From: Bryn M. Reeves @ 2010-06-02 9:15 UTC (permalink / raw) To: LVM general discussion and development On 05/31/2010 08:21 PM, Romeo Theriault wrote: > I apologize if this has been asked before but I was unable to find any > references to it in the mailing list archives and googling around > isn't helping much. > > Is there a way to directly mount, bypassing LVM, a ext3 partition that > resides in a LVM LV and VG? It resides on one PV. If you know how the volume group is laid out on the PVs you can manually construct device-mapper devices using the dmsetup command to get access to the LVs in this VG. This is a bit fiddly (need to convert from extents to sectors to pass as arguments to device-mapper) but it is possible. > The problem is that I have read-only copies of VM's that are backed up > via a SAN based snapshot/backup tool. I'm trying to create a method to > allow the VM admins to restore their files from the snapshot backed up > VM's. I'm at the point where I can access the partitions and can mount > the ext3 partitions fine but I'm having trouble with the LVM volumes > because I can't import the pv/vg because they have the same name/uuid > as the existing VG (it's really the same system) and I can't change > them with something like vgimportclone because the backed up vm image > files are read-only. If you're not able to use vgimportclone then another alternative would be to create a new copy of /etc/lvm somewhere and modify the etc/lvm/lvm.conf that it contains so that it has a filter that excludes everything apart from the devices containing this VG. Then you can set LVM_SYSTEM_DIR to point to this directory and have a "sandbox" that is restricted to just seeing the "clone" devices. You will probably still run into problems activating LVs this way since e.g. the device names and the VG directory in /dev will collide with the ones used by the system VG but at least you can run the tools verbosely this way and see the maps that would be generated for device-mapper without having to work them out by hand. Regards, Bryn. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-06-02 9:16 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-05-31 19:21 [linux-lvm] Is it possible to bypass LVM and mount contained partition directly? Romeo Theriault 2010-05-31 20:45 ` Ray Morris 2010-05-31 21:17 ` Hull, Brett (MSE) 2010-06-01 13:27 ` Romeo Theriault 2010-06-01 13:54 ` Ray Morris 2010-06-01 14:00 ` Romeo Theriault 2010-06-01 15:56 ` K. Richard Pixley 2010-06-01 13:23 ` Romeo Theriault 2010-06-02 9:15 ` Bryn M. Reeves
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).