[pve-devel] [PATCH pve-storage 0/5] v5 fix regression and indentation
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Jun 19 12:57:24 CEST 2017
On Mon, Jun 19, 2017 at 11:59:10AM +0200, datanom.net wrote:
> On 2017-06-19 09:33, Fabian Grünbichler wrote:
> >
> > AFAICT, mount will always guess NFS if there is a ':' anywhere in the
> > source path:
> >
>
> No, mount only guess NFS if run through PVE::Tools:run_command. Running the
> exact same command as produced in PVE::LXC::API2 from the command line works
> as intended.
tested both on Jessie and Stretch:
root at stretch:/home/user# 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-113-lun-0 /tmp && resize2fs /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-113-lun-0'
mount.nfs: Failed to resolve server /dev/disk/by-path/ip-10.0.1.32: Name or service not known
root at stretch:/home/user# 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-113-lun-0 /tmp && resize2fs /dev/disk/by-path/ip-10.0.1.32\:3260-iscsi-iqn.2005-10.org.freenas.ctl\:vm-113-lun-0'
mount.nfs: Failed to resolve server /dev/disk/by-path/ip-10.0.1.32: Name or service not known
root at stretch:/home/user# unshare -m -- sh -c 'mount --make-rprivate / && mount -t nonfs /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-113-lun-0 /tmp && resize2fs /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-113-lun-0'
mount: special device /dev/disk/by-path/ip-10.0.1.32:3260-iscsi-iqn.2005-10.org.freenas.ctl:vm-113-lun-0 does not exist
but it seems like there is some kind of test run earlier, because when I
manually symlink an actual block device to a path with a colon in it,
mounting it works as expected, both with run_command and manually. maybe
the root cause is still something like returning from activate_volume
too soon?
>
> >
> > > mount: special device /dev/disk/by-path/ip-10.0.1.323260-iscsi-iqn.2005-10.org.freenas.ctl:vm-113-lun-0
> > > does not exist
> >
> > because the path of course does not exist on my test system ;)
> >
> > IMHO adding this is not problematic, because we never have container
> > volumes which are a whole NFS export, and if we had, they could not be
> > "raw" and resizable anyway..
>
> Ok. I will add this option to the LXC code?
>
yes, that or debugging what mount is actually doing seems like the way
to go. if it fails as well with "-t nonfs", then I think you need to
check your plugin code for further timing problems.
More information about the pve-devel
mailing list