OpenWrt Forum Archive

Topic: Install pakages on a CIFS or NFS shares, is it possible?

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Is it possible to install pakages on a CIFS or NFS shares? I tryed on a CIFS and on NFS...

I used FreeNFS on my Win7 computer as NFS server. On my 741ND router (10.03 backfire RC6) i installed :

root@AirNET:~# opkg list-installed | grep nfs
kmod-fs-nfs - 2.6.32.27-1
kmod-fs-nfs-common - 2.6.32.27-1
nfs-utils - 1.1.6-1
block-mount
block-hotplug[/quote]
and mount using command : mount -t nfs 192.168.1.101:/ /mnt/share -o nolock,hard

--------------------------------------

root@AirNET:~# uci show fstab
fstab.automount=global
fstab.automount.from_fstab=1
fstab.automount.anon_mount=1
fstab.autoswap=global
fstab.autoswap.from_fstab=1
fstab.autoswap.anon_swap=0
fstab.@mount[0]=mount
fstab.@mount[0].target=/home
fstab.@mount[0].device=/dev/sda1
fstab.@mount[0].fstype=ext3
fstab.@mount[0].options=rw,sync
fstab.@mount[0].enabled=0
fstab.@mount[0].enabled_fsck=0
fstab.@swap[0]=swap
fstab.@swap[0].device=/dev/sda2
fstab.@swap[0].enabled=0
fstab.@mount[1]=mount
fstab.@mount[1].device=192.168.1.101:/
fstab.@mount[1].enabled_fsck=0
fstab.@mount[1].enabled=1
fstab.@mount[1].target=/mnt/share
fstab.@mount[1].options=rw,hard,intr,nolock

--------------------------------------------------------/does't work.., only manual mounting works/

There is df -h output:

root@AirNET:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.9M      1.9M         0 100% /rom
tmpfs                    14.4M      1.5M     12.9M  10% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mtdblock3          704.0K    676.0K     28.0K  96% /overlay
mini_fo:/overlay          1.9M      1.9M         0 100% /
192.168.1.101:/         149.0G    145.6G      3.4G  98% /mnt/share
root@AirNET:~#[/quote]
There is result when i try to install some pakage:[/quote]
root@AirNET:~# opkg -d nfs install coova-chilli
Installing coova-chilli (1.2.5-1) to nfs...
Downloading http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/coova-chilli_1.2.5-1_ar71xx.ipk.
Installing kmod-tun (2.6.32.27-1) to nfs...
Downloading http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/kmod-tun_2.6.32.27-1_ar71xx.ipk.
Installing librt (0.9.30.1-43.29) to nfs...
Downloading http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/librt_0.9.30.1-43.29_ar71xx.ipk.
Configuring kmod-tun.
sh: /mnt/share//usr/lib/opkg/info/kmod-tun.postinst: Permission denied
Configuring librt.
Collected errors:
 * extract_archive: Cannot make dir /mnt/share/lib/: File exists.
 * extract_archive: Cannot make dir /mnt/share/lib/modules/: File exists.
 * extract_archive: Cannot make dir /mnt/share/lib/modules/2.6.32.27/: File exists.
 * extract_archive: Cannot make dir /mnt/share/etc/: File exists.
 * extract_archive: Cannot make dir /mnt/share/etc/modules.d/: File exists.
 * extract_archive: Cannot make dir /mnt/share/lib/: File exists.
 * extract_archive: Cannot create symlink from ./lib/librt.so.0 to 'librt-0.9.30.1.so': Operation not supported.
 * copy_file: /mnt/share/etc/chilli.conf: Value too large for defined data type.
 * file_copy: Failed to copy file /mnt/share/etc/chilli.conf to /mnt/share/etc/chilli.conf-opkg.backup.
 * backup_make_backup: Failed to copy /mnt/share/etc/chilli.conf to /mnt/share/etc/chilli.conf-opkg.backup
 * opkg_install_cmd: Cannot install package coova-chilli.
 * pkg_run_script: postinst script returned status 126.
 * opkg_configure: kmod-tun.postinst returned 126.
root@AirNET:~#

(Last edited by Vespertilio on 6 Nov 2011, 19:37)

Ok, I mount win7 share by CIFS

mount -t cifs //SINGULARITY/test /mnt/share -o user=Share,password=server,file_mod=0777,dir_mode=0777,nounix,noserverino,hard,intr

Before that I installed several pakages: mount-utils, kmod-fs-cifs, cifsmount.

And installing pakages on /mnt/share has the following results:

root@AirNET:~# opkg -d nfs remove coova-chilli
Removing package coova-chilli from nfs...
root@AirNET:~# opkg -d nfs install coova-chilli
Installing coova-chilli (1.2.5-1) to nfs...
Downloading http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/coova-chilli_1.2.5-1_ar71xx.ipk.
Configuring coova-chilli.
Collected errors:
 * extract_archive: Cannot create symlink from ./usr/lib/libchilli.so.0 to 'libchilli.so.0.0.0': Operation not supported.
 * extract_archive: Cannot create symlink from ./usr/lib/libbstring.so.0 to 'libbstring.so.0.0.0': Operation not supported.

So there was one problem: symlink doesn't works over network mounted devices.. And don't know how to solve this problem.
But I have one idea. Is that possible to create a some file on a share and score a zero it. Then somehow mount it as a partition and format it on ext2/3 filesystem.

Any idea? smile

Yes, you can create a sparsefile on the share like this:
dd if=/dev/zero of=/share/200MB.img bs=1M count=200
mkfs -t ext3 /share/200MB.img
mount -o loop /share/200MB.img /mnt/loopimage

But I guess the performance will drop quite a bit.

The discussion might have continued from here.