[pve-devel] FreeNAS plugin: Status

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Jun 8 09:31:41 CEST 2017


On Wed, Jun 07, 2017 at 06:57:42PM +0200, Michael Rasmussen wrote:
> Hi all,
> 
> Status for this plugin is in such a way that I hopefully should be able
> to release a beta later this week;-)
> 
>                     VM          CT
> create              YES         YES
> delete              YES         YES
> resize              YES         Note 1 (Needs fixing)
> snapshot
>    offline          YES         YES
>    live             YES         "YES" (state is not saved)
> backup
>    snapshot         YES         Waiting
>    standby          YES         YES
>    offline          YES         YES
> clone
>    full             Waiting     Waiting
>    linked           Waiting     Waiting
> 
> Note 1:
> When CT is online:
> mount.nfs: Failed to resolve server /dev/disk/by-path/ip-10.0.1.32: Name or service not known
> Failed to update the container's filesystem: command 'unshare -m -- sh -c 'mount --make-rprivate / && mount /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-103-lun-0 /tmp && resize2fs /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-103-lun-0'' failed: exit code 32
> 
> Should I bail when resize is called on a running CT?

no, IMHO this should work. I think the problem is (this time almost
certainly ;)) the colon. the path is just quoted using
PVE::Tools::shellquote, which is a wrapper around
String::ShellQuote::shell_quote. Similarly, PVE::Tools::run_command will
us shellquote, but of course does not know about the semantics of the
command which is run, so cannot decide magically whether to encode
certain special characters which are not problematic for the shell
itself.

if the "device" string of a call to "mount" contains a ':', its
autodetection seems to think you are trying to mount an NFS export
(where the ':' is the demarkation between server and export).

did you test whether anything breaks when your plugin's path method
escapes the colons?

> 
> When CT is offline:
> e2fsck 1.42.12 (29-Aug-2014)
> e2fsck: No such file or directory while trying to open /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-103-lun-0
> Possibly non-existent device?
> Failed to update the container's filesystem: command 'e2fsck -f -y /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-103-lun-0' failed: exit code 8
> 
> Seems fixable by ensuring to activate volume before hand.
> 

possibly same as above - or are you recreating the device when resizing
in your plugin? because there is a call to activate_volumes a few lines
above the call to PVE::Storage::volume_resize in PVE::API2::LXC's
resize_vm API path?




More information about the pve-devel mailing list