How to unmount httpfs2 drives [solved]

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8369
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

How to unmount httpfs2 drives [solved]

Post#1 by Ed_P » 02 Jan 2023, 23:34

So long as this is run after a fresh boot, this works.

Code: Select all

#!/bin/bash

# https://forum.porteus.org/viewtopic.php?p=53193#p53193

iso=http://www6.frugalware.org/mirrors/linux/porteus/x86_64/Porteus-v3.2.2/modules/003-lxde.xzm
if [ -d /mnt/httpfs2 ]; then
  umount /mnt/httpfs2 
  umount /mnt/xzm
  rm -rf /mnt/{httpfs2,xzm} > /dev/null 2>&1 &
fi

mkdir /mnt/{httpfs2,xzm}
httpfs2 $iso /mnt/httpfs2
mount /mnt/httpfs2/003-lxde.xzm /mnt/xzm

echo "...loading" 
echo " " && echo "ls /mnt/xzm"
ls /mnt/xzm
#d
but when I attempt a rerun, either for the same file or a different one I get errors.

Code: Select all

umount: /mnt/httpfs2: target is busy.
mkdir: cannot create directory ‘/mnt/httpfs2’: File exists
mkdir: cannot create directory ‘/mnt/xzm’: File exists
file name: 	003-lxde.xzm
host name: 	www6.frugalware.org
port number: 	80
protocol: 	http
request path: 	/mirrors/linux/porteus/x86_64/Porteus-v3.2.2/modules/003-lxde.xzm
auth data: 	(null)
file size: 	15306752
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
mount: /mnt/xzm: mount point does not exist.
...loading
 
ls /mnt/xzm
ls: cannot access '/mnt/xzm': No such file or directory
If I reboot it works but can get to be inconvenient at times. What am I doing wrong? :wall:


Added in 7 hours 54 minutes 2 seconds:
Replaced
Ed_P wrote:
02 Jan 2023, 23:34

Code: Select all

   umount /mnt/httpfs2 
   umount /mnt/xzm
with

Code: Select all

  fusermount -uz /mnt/httpfs2 
  fusermount -uz /mnt/xzm
and now I get

Code: Select all

fusermount: failed to unmount /mnt/xzm: No such file or directory
file name: 	003-lxde.xzm
host name: 	www6.frugalware.org
port number: 	80
protocol: 	http
request path: 	/mirrors/linux/porteus/x86_64/Porteus-v3.2.2/modules/003-lxde.xzm
auth data: 	(null)
file size: 	15306752
...loading
 
ls /mnt/xzm
etc  home  opt	usr  var 

Added in 15 hours 46 minutes 50 seconds:
And so with this:

Code: Select all

#!/bin/bash

# https://forum.porteus.org/viewtopic.php?p=53193#p53193

#iso=http://www6.frugalware.org/mirrors/linux/porteus/x86_64/Porteus-v3.2.2/modules/003-lxde.xzm
iso=http://www6.frugalware.org/mirrors/linux/porteus/x86_64/Porteus-v5.0/modules/003-lxqt.xzm

#set -x;
if [ -d /mnt/httpfs2 ]; then
  fusermount -uz /mnt/xzm
  fusermount -uz /mnt/httpfs2
fi

if [ ! -d /mnt/httpfs2 ]; then
  mkdir /mnt/{httpfs2,xzm}
fi

httpfs2 $iso /mnt/httpfs2
echo "...loading"
mount /mnt/httpfs2/003-lxde.xzm /mnt/xzm

echo " " && echo "ls /mnt/xzm"
ls /mnt/xzm
#df
I get this:

Code: Select all

file name: 	003-lxqt.xzm
host name: 	www6.frugalware.org
port number: 	80
protocol: 	http
request path: 	/mirrors/linux/porteus/x86_64/Porteus-v5.0/modules/003-lxqt.xzm
auth data: 	(null)
file size: 	23228416
...loading
ntfs-3g: Failed to access volume '/mnt/httpfs2/003-lxde.xzm': No such file or directory

ntfs-3g 2021.8.22 integrated FUSE 27 - Third Generation NTFS Driver
		Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2021 Jean-Pierre Andre
Copyright (C) 2009-2020 Erik Larsson

Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options:  ro (read-only mount), windows_names, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Plugin path: /usr/lib64/ntfs-3g

News, support and information:  http://tuxera.com
 
ls /mnt/xzm
Note:

Code: Select all

request path: 	/mirrors/linux/porteus/x86_64/Porteus-v5.0/modules/003-lxqt.xzm
and

Code: Select all

ntfs-3g: Failed to access volume '/mnt/httpfs2/003-lxde.xzm': No such file or directory
:wall: :wall:
Rebooting is the only option that works. :hammer:


Added in 1 day 22 hours 28 minutes 24 seconds:
Note:
and this:
Ed_P wrote:
03 Jan 2023, 23:15
mount /mnt/httpfs2/003-lxde.xzm /mnt/xzm
:ouch: :wacko:


Added in 1 day 17 hours 12 minutes 21 seconds:
So while httpfs2 works with Porteus files:

Code: Select all

#!/bin/bash

# https://forum.porteus.org/viewtopic.php?p=53193#p53193
# https://forum.porteus.org/viewtopic.php?p=72858#p72858
# https://forum.porteus.org/viewtopic.php?p=72863#p72863

# MUST be run as ROOT!

#iso=http://www6.frugalware.org/mirrors/linux/porteus/x86_64/Porteus-v3.2.2/modules/003-lxde.xzm
iso=http://www6.frugalware.org/mirrors/linux/porteus/x86_64/Porteus-v5.0/modules/003-lxqt.xzm

#set -x;
if [ -d /mnt/httpfs2 ]; then
  fusermount -uz /mnt/xzm
  fusermount -uz /mnt/httpfs2
  rm -rf /mnt/{httpfs2,xzm} # > /dev/null 2>&1 &
fi

if [ ! -d /mnt/httpfs2 ]; then
  mkdir /mnt/{httpfs2,xzm}
fi

httpfs2 $iso /mnt/httpfs2
echo "...loading"
mount /mnt/httpfs2/003-*.xzm /mnt/xzm

echo " " && echo "ls /mnt/httpfs2"
ls /mnt/httpfs2  
echo " " && echo "ls /mnt/xzm"
ls /mnt/xzm
#df

read
httpfs2 does not work with others:

Code: Select all

file name: 	ubuntu-22.10-desktop-amd64.iso
host name: 	mirrors.rit.edu
port number: 	80
protocol: 	http
request path: 	/ubuntu-releases/22.10/ubuntu-22.10-desktop-amd64.iso
auth data: 	(null)
file size: 	4071903232
...loading
ntfs-3g: Failed to access volume '/mnt/httpfs2/ubuntu-22.10-desktop-amd64.iso': Input/output error

ntfs-3g 2021.8.22 integrated FUSE 27 - Third Generation NTFS Driver
		Configuration type 1, XATTRS are on, POSIX ACLS are off

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2021 Jean-Pierre Andre
Copyright (C) 2009-2020 Erik Larsson

Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options:  ro (read-only mount), windows_names, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Plugin path: /usr/lib64/ntfs-3g

News, support and information:  http://tuxera.com
 
ls /mnt/httpfs2
ubuntu-22.10-desktop-amd64.iso

Code: Select all

ls /mnt/httpfs2
/bin/ls: cannot access '/mnt/httpfs2/ubuntu-22.10-desktop-amd64.iso': Input/output error
ubuntu-22.10-desktop-amd64.iso
:(
I tried other mirrors with the same result.

Win some, loose some.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

How to unmount httpfs2 drives

Post#2 by Rava » 09 Jan 2023, 01:03

Ed_P wrote:
07 Jan 2023, 14:55
So while httpfs2 works with Porteus files:
[…]
httpfs2 does not work with others:
[…]
I tried other mirrors with the same result.
Could it be it's not the issue of Porteus file (.xzm) or "others" (.iso) but their size?
Have you tried it with a very large sized .xzm and a very small sized .iso as well?

I asked wget and the size of the xzm of http://www6.frugalware.org/mirrors/linu ... 3-lxde.xzm gets reported by wget as being 15306752 bytes (14.60 MB) while the iso
/ubuntu-releases/22.10/ubuntu-22.10-desktop-amd64.iso as you quoted above is 4071903232 bytes - 3.79 GB

14.60 MB vs 3.79 GB - that is quite the difference in size.

Did you try it with a similar small .iso as well? E.g. one that is near the xzm's size of 14.60 MB?
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8369
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

How to unmount httpfs2 drives

Post#3 by Ed_P » 09 Jan 2023, 05:51

Rava wrote:
09 Jan 2023, 01:03
Did you try it with a similar small .iso as well? E.g. one that is near the xzm's size of 14.60 MB?
No, I did not. I suspect size, or file format, may play a role. I was hoping it would work with large ISOs to save the time of downloading them. (many minutes, not seconds) Don't download, just mount. :)

Since I got the unmount problem resolved I should mark the thread as solved.
Ed

Post Reply