* [linux-lvm] lvremove is not deleting the file system
@ 2013-12-30 0:58 Guy Rouillier
2013-12-30 1:46 ` Sven Eschenberg
2013-12-30 2:00 ` Alasdair G Kergon
0 siblings, 2 replies; 7+ messages in thread
From: Guy Rouillier @ 2013-12-30 0:58 UTC (permalink / raw)
To: linux-lvm
I'm using xen-create-image in an attempt to set up a new VM; host OS is
Ubuntu Server 13.10, and I'm using LVM. I failed in my first attempt
due to my inexperience, so I changed some input parameters and I'm
trying again. The first attempt had successfully created the target LVM
volumes for boot, root and swap, so I used lvremove to delete them. All
that went without error.
However, now when I try to run xen-create-image, I get the following
error at the beginning when xen-create-image tries to create the target
volumes:
Creating btrfs filesystem on /dev/dell-vg/oraclelinux-root
/dev/dell-vg/oraclelinux-root appears to contain an existing filesystem
(btrfs).
Error: Use the -f option to force overwrite.
Running command 'mkfs.btrfs /dev/dell-vg/oraclelinux-root 2>&1' failed
with exit code 256.
Aborting
I've tried searching for this error but can't find anything helpful.
I've rerun this a dozen times and get the same result each time
(deleting the created volumes and rebooting between each attempt.) I
looked in the /dev tree, and I see the dm node (dm-4) disappears after I
run lvremove. But apparently, lvremove doesn't delete the filesystem.
So when I recreate the same volume in the same order, the filesystem is
still there from the previous attempt.
How do I fix this? Thanks.
--
Guy Rouillier
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] lvremove is not deleting the file system
2013-12-30 0:58 [linux-lvm] lvremove is not deleting the file system Guy Rouillier
@ 2013-12-30 1:46 ` Sven Eschenberg
2013-12-30 1:55 ` Alasdair G Kergon
2013-12-30 2:00 ` Alasdair G Kergon
1 sibling, 1 reply; 7+ messages in thread
From: Sven Eschenberg @ 2013-12-30 1:46 UTC (permalink / raw)
To: linux-lvm
Hi Guy,
This is not really a LVM problem I think. Basically lvremove only removes
a logical volume, which means, the metadata is discarded and the PEs are
released back into the allocation pool. It does not wipe the area (which
you somehow assumed as far as I understand your post).
Think of this, once you delete a partition table and recreate it with the
same layout, all filesystems will be available, if the drive was not
touched in any way.
The question seems to be: What is your actual intention?
Regards
-Sven
On Mon, December 30, 2013 01:58, Guy Rouillier wrote:
> I'm using xen-create-image in an attempt to set up a new VM; host OS is
> Ubuntu Server 13.10, and I'm using LVM. I failed in my first attempt
> due to my inexperience, so I changed some input parameters and I'm
> trying again. The first attempt had successfully created the target LVM
> volumes for boot, root and swap, so I used lvremove to delete them. All
> that went without error.
>
> However, now when I try to run xen-create-image, I get the following
> error at the beginning when xen-create-image tries to create the target
> volumes:
>
> Creating btrfs filesystem on /dev/dell-vg/oraclelinux-root
> /dev/dell-vg/oraclelinux-root appears to contain an existing filesystem
> (btrfs).
> Error: Use the -f option to force overwrite.
> Running command 'mkfs.btrfs /dev/dell-vg/oraclelinux-root 2>&1' failed
> with exit code 256.
> Aborting
>
> I've tried searching for this error but can't find anything helpful.
> I've rerun this a dozen times and get the same result each time
> (deleting the created volumes and rebooting between each attempt.) I
> looked in the /dev tree, and I see the dm node (dm-4) disappears after I
> run lvremove. But apparently, lvremove doesn't delete the filesystem.
> So when I recreate the same volume in the same order, the filesystem is
> still there from the previous attempt.
>
> How do I fix this? Thanks.
>
> --
> Guy Rouillier
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
> _______________________________________________
> 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] 7+ messages in thread
* Re: [linux-lvm] lvremove is not deleting the file system
2013-12-30 1:46 ` Sven Eschenberg
@ 2013-12-30 1:55 ` Alasdair G Kergon
2013-12-30 2:27 ` Sven Eschenberg
0 siblings, 1 reply; 7+ messages in thread
From: Alasdair G Kergon @ 2013-12-30 1:55 UTC (permalink / raw)
To: sven, LVM general discussion and development
On Mon, Dec 30, 2013 at 02:46:45AM +0100, Sven Eschenberg wrote:
> Think of this, once you delete a partition table and recreate it with the
> same layout, all filesystems will be available, if the drive was not
> touched in any way.
Although lvcreate has a --zero option enabled by default that wipes
the beginning of the new device (and the next upstream release extends
this to wipe more signatures using libblkid).
You need to investigate precisely how your version of 'xen-create-image' is
using LVM and with which options.
Alasdair
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] lvremove is not deleting the file system
2013-12-30 0:58 [linux-lvm] lvremove is not deleting the file system Guy Rouillier
2013-12-30 1:46 ` Sven Eschenberg
@ 2013-12-30 2:00 ` Alasdair G Kergon
2013-12-30 3:28 ` Guy Rouillier
1 sibling, 1 reply; 7+ messages in thread
From: Alasdair G Kergon @ 2013-12-30 2:00 UTC (permalink / raw)
To: Guy Rouillier; +Cc: linux-lvm
On Sun, Dec 29, 2013 at 07:58:04PM -0500, Guy Rouillier wrote:
> /dev/dell-vg/oraclelinux-root appears to contain an existing filesystem
> (btrfs).
> Error: Use the -f option to force overwrite.
Does your version of xen-create-image offer a way to supply that -f?
If you're running lvremove yourself before retrying, look into running
wipefs manually on the device first.
Alasdair
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] lvremove is not deleting the file system
2013-12-30 1:55 ` Alasdair G Kergon
@ 2013-12-30 2:27 ` Sven Eschenberg
0 siblings, 0 replies; 7+ messages in thread
From: Sven Eschenberg @ 2013-12-30 2:27 UTC (permalink / raw)
To: linux-lvm
On Mon, December 30, 2013 02:55, Alasdair G Kergon wrote:
> On Mon, Dec 30, 2013 at 02:46:45AM +0100, Sven Eschenberg wrote:
>> Think of this, once you delete a partition table and recreate it with
>> the
>> same layout, all filesystems will be available, if the drive was not
>> touched in any way.
>
> Although lvcreate has a --zero option enabled by default that wipes
> the beginning of the new device (and the next upstream release extends
> this to wipe more signatures using libblkid).
Forgot about that. Then again my documentation says zero wipes the first
KB, which does not really catch BTRFS sigs (which the OP uses) nor various
mdraid signatures.
I honestly hope the libblkid dependency will be optional ;-).
>
> You need to investigate precisely how your version of 'xen-create-image'
> is
> using LVM and with which options.
The actual OP, you meant. As you noted in your other post wipefs can come
in handy. Additionally blkid and lsblk are two things that come in handy,
to see what is going on.
>
> Alasdair
>
-Sven
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] lvremove is not deleting the file system
2013-12-30 2:00 ` Alasdair G Kergon
@ 2013-12-30 3:28 ` Guy Rouillier
2013-12-30 5:18 ` Sven Eschenberg
0 siblings, 1 reply; 7+ messages in thread
From: Guy Rouillier @ 2013-12-30 3:28 UTC (permalink / raw)
To: linux-lvm
On 12/29/2013 9:00 PM, Alasdair G Kergon wrote:
> On Sun, Dec 29, 2013 at 07:58:04PM -0500, Guy Rouillier wrote:
>> /dev/dell-vg/oraclelinux-root appears to contain an existing filesystem
>> (btrfs).
>> Error: Use the -f option to force overwrite.
>
> Does your version of xen-create-image offer a way to supply that -f?
I tried supplying the -f option to xen-create-image. Unfortunately, it
did not alter the outcome.
>
> If you're running lvremove yourself before retrying, look into running
> wipefs manually on the device first.
Thank you, that solved the problem. I was then able to run
xen-create-image again and it recreated the LVs. To answer Sven's
question: "What is your actual intention?", I'm trying to rerun
xen-create-image so that I can create this xen virtual machine. I could
not do that because it failed trying to recreate the root LV.
--
Guy Rouillier
---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] lvremove is not deleting the file system
2013-12-30 3:28 ` Guy Rouillier
@ 2013-12-30 5:18 ` Sven Eschenberg
0 siblings, 0 replies; 7+ messages in thread
From: Sven Eschenberg @ 2013-12-30 5:18 UTC (permalink / raw)
To: linux-lvm
I guess my question was somewhat misleading:
I was not sure, if you had some data to keep, or if you'd planned to trash
everything. Usually the warning about an existing FS is not a coincidence,
so better make sure, people really intend to wipe it ;-).
-Sven
On Mon, December 30, 2013 04:28, Guy Rouillier wrote:
> On 12/29/2013 9:00 PM, Alasdair G Kergon wrote:
>>
>> If you're running lvremove yourself before retrying, look into running
>> wipefs manually on the device first.
>
> Thank you, that solved the problem. I was then able to run
> xen-create-image again and it recreated the LVs. To answer Sven's
> question: "What is your actual intention?", I'm trying to rerun
> xen-create-image so that I can create this xen virtual machine. I could
> not do that because it failed trying to recreate the root LV.
>
> --
> Guy Rouillier
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
> _______________________________________________
> 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] 7+ messages in thread
end of thread, other threads:[~2013-12-30 5:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-30 0:58 [linux-lvm] lvremove is not deleting the file system Guy Rouillier
2013-12-30 1:46 ` Sven Eschenberg
2013-12-30 1:55 ` Alasdair G Kergon
2013-12-30 2:27 ` Sven Eschenberg
2013-12-30 2:00 ` Alasdair G Kergon
2013-12-30 3:28 ` Guy Rouillier
2013-12-30 5:18 ` Sven Eschenberg
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).