Good Evening,

Thanks for your fast reply Gary. I think I didn't get the point in the right 
way so heres the second try :-)

> On Tue, Nov 03, 2009 at 11:39:28AM -0800, Ralf
> Teckelmann wrote:
> > Hi and hello,
> > 
> > I have a problem confusing me. I hope someone can
> help me with it.
> > I followed a "best practise" - I think - using
> dedicated zfs filesystems for my virtual machines.
> > Commands (for completion):
> > [i]zfs create rpool/vms[/i]
> > [i]zfs create rpool/vms/vm1[/i]
> > [i] zfs create -V 10G rpool/vms/vm1/vm1-dsk[/i]
> > 
> > This command creates the file system
> [i]/rpool/vms/vm1/vm1-dsk[/i] and the according
> [i]/dev/zvol/dsk/rpool/vms/vm1/vm1-dsk[/i].
> > 
> 
> (Clarification)
> 
> Your commands create two filesystems:
> 
> rpool/vms
> rpool/vms/vm1
> 
> You then create a ZFS Volume:
> 
> rpool/vms/vm1/vm1-dsk
> 
> which results in associated dsk and rdsk devices
> being created as:
> 
> /dev/zvol/dsk/rpool/vms/vm1/vm1-dsk
> /dev/zvol/rdsk/rpool/vms/vm1/vm1-dsk
> 
> These two nodes are artifacts of the zfs volume
> implementation and are required
> to allow zfs volumes to emulate traditional disk
> devices. They will appear
> and disappear accordingly as zfs volumes are created
> and destroyed.
> 
Thanks for this information.

> > If I delete a VM i set up using this filesystem
> via[i] virsh undefine vm1[/i] the
> [i]/rpool/vms/vm1/vm1-dsk[/i] gets also deleted, but
> the [i]/dev/zvol/dsk/rpool/vms/vm1/vm1-dsk[/i] is
> left.
> > 
> 
> virsh undefine does not delete filesystems, disks or
> any other kind of
> backing storage. In order to delete the three things
> you created, you need
> to issue:
> 
> zfs destroy rpool/vms/vm1/vm1-dsk
> zfs destroy rpool/vms/vm1
> zfs destroy rpool/vms

So here comes the second try:

If I remove a VM with "virsh undefine vm1" the directory /rpool/vms/vm1/ 
representing the filesystem above the filesystem /rpool/vms/vm1/vm1-dsk is 
removed and the path /rpool/vms/vm1/vm1-dsk isn't existing anymore. So I can't 
do "zfs destroy rpool/vms/vm1/vm1-dsk" nore "zfs destroy rpool/vms/vm1". 
Considering virsh does not remove filesystems the filesystem 
"/rpool/vms/vm1/vm1-dsk" must be there anyway as well as the path does not 
exist anymore. And the fact that the 2 nodes you described above is a argument 
furthermore, but I don't have a path.

Am I completly messing around? I am new in Opensolaris and zfs and quite 
confused. I hope I am not too confusing for you.

> 
> or (more simply) you can do it recursively, if
> there's nothing else to be
> affected:
> 
> zfs destroy -r rpool/vms
> 
> Obviously you need to be careful with recursive
> destruction that no other
> filesystems/volumes are affected.
> 
> > Without [i]/rpool/vms/vm1/vm1-dsk[/i] I am not able
> to do [i]zfs destroy rpool/vms/vm1/vm1-dsk[/i] so the
> [i]/dev/zvol/dsk/rpool/vms/vm1/vm1-dsk[/i] could not
> be destroyed "and will be left forever"!? 
> > 
> > How can I get rid of this problem?
> 
> You don't have a problem. When the zfs volume is
> destroyed (as I describe
> above), then the associated devices are also removed.
> 
As i thought, great.
> > -- 
> > This message posted from opensolaris.org
> > _______________________________________________
> > zfs-discuss mailing list
> > zfs-discuss@opensolaris.org
> >
> http://mail.opensolaris.org/mailman/listinfo/zfs-discu
> ss
> 
> Hope that helps.
> 
> Gary
> -- 
> Gary Pennington
> Solaris Core OS
> Sun Microsystems
> gary.penning...@sun.com
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discu
> ss
-- 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to