SUMMARY: loopback (file-on-file?) filesystem

From: Jan Koktan <koktan_at_nkp.cz>
Date: Tue, 19 Jan 1999 18:55:13 +0100

Original Problem: I was looking for a loopback FS driver for DU.
Solution: An experimental driver by COMPAQ.

I've received 3 replies to my question. Lars Bro gave me a little
explanation about the manpages, Christopher Callahan suggested
nice workaround (copying cdrom's content to disk via vdump|vrestore
(even cdfs should work!)) and finally Serguei Patchkovskii told me
about the experimental driver for DU4.0d from Sean Davidson.

This driver is totally unsupported, has some restrictions, but
it fulfills my requirements. It worked great while I was playing
with it, but I can't tell you about the long-term stability now.
It is limited to 8 loopback devices.

Below is README file and received replies.
The driver itself is not included because I'm not sure about
the redistribution policy.

THANKS for your effort.

Jan Koktan
koktan_at_nkp.cz





-----8<---------------------------- README ---------------------
This ldisk driver is experimental and is completely unsupported.

COMPAQ is not responsible in any way for the use of this software
or any unexpected results from the use of this software.


The following is the contents of this tar file:

./sbin/init.d/ldisk Startup script
./sbin/rc3.d/S99ldisk Symbolic link to startup script
./sbin/ldisk_config Utility to attach files to loop devices
./subsys/ldisk.mod Dynamic loadable loop device kernel
module
./subsys/ldisk.README This file


STARTUP:

Durning startup the /sbin/init.d/ldisk script will load the loop device
kernel module and get an available device number and create all the loop
devices in the /dev/ld/ directory. All the block device names will be
in
the format disk<unit_number><partition_id> and all the character device
names will be ini the format rdisk<unit_number><partition_id>.

There is a stop option to the /sbin/init.d/ldisk script to unload the
loop device kernel module and delete all the device names.


CONFIGURE:

Once the kernel module has been loaded and the device names created the
/sbin/ldisk_config utility may be used to attach a file to a loop
device.
Using the -r option to this utility will force the loop device to be
readonly and return errors for any write operations.

i.e.

        /sbin/ldisk_config -c /dev/ld/rdisk0a /var/tmp/diskfile

To dissasociate a file with a loop device the unconfigure option is used

i.e.

        /sbin/ldisk_config -u /dev/ld/rdisk0a

The kernel module cannot be unloadable until all loop devices have been
dissasociated from all files.


RESTRICTIONS:

Use of writing to loop devices hasn't been thoroughly tested and may
hang or crash the operating system.

Attaching files on AdvFS and UFS to loop devices have been partially
tested.

Creating and mounting AdvFS filesystems on loop devices may hang or
crash
the operating system.

Attaching files to loop devices over NFS does not work.


AUTHOR:

Sean Davidson
Compaq Computer Corporation
davidson_at_digital.com




---------8<-------------------------------------------------------------
From: Christopher Callahan <crcallahan_at_ucdavis.edu>

Greetings Jan:

> I would like to use loopback filesystem on my DU 4.0[bd].

I also needed to figure out how to do this. After a couple of
conversations with DEC technical support, I was told that the loopback
file system was not supported under Digital UNIX (I explained to them
what I was trying to do, and told them how I do it on my Linux system:
#mount -t iso9660 -o ro,loop=/dev/loop0 <cd_image_name> /cdrom). The
engineer recommended that I try vdump'ing the file system on the CD and
vrestoring it to the hard disk.

I tried this and it seems to work. I have been able to:

(1) restore the FS from an ISO9660 CD containing Windows95 software to
the hard drive on my DUNIX box,
(2) connect to the DEC machine from a windows machine through Samba, and
(3) run the installer off the hard drive on the DEC to install software
on
the windows machine.

Below are some excerpts from the notes I took when I was working on
this.

<!--begin excerpt-->

<!--try using RRD43-->
# mount -o ro,noversion -t cdfs /dev/rz18c /cdrom
# scu -f /dev/rrz18c
scu> show capacity

Disk Capacity Information:

                  Maximum Capacity: 265344 (518.250 megabytes)
                      Block Length: 2048

scu> quit
# vdump -0 -f - -D /cdrom | vrestore -xf - -D /cdex/Oracle.client
path : /cdrom
dev/fset : /dev/rz18c
type : cdfs
vdump: Date of last level 0 dump: the start of the epoch
vdump: Dumping directories
vrestore: Date of the vdump save-set: Fri Nov 20 12:07:19 1998
vdump: Dumping 522439448 bytes, 380 directories, 18015 files
vdump: Dumping regular files
vrestore: user quotas must be enabled in order to restore user quota
file.
vrestore: group quotas must be enabled in order to restore group quota
file.

vdump: Status at Fri Nov 20 12:13:00 1998
vdump: Dumped 66954121 of 522439448 bytes; 12.8% completed
vdump: Dumped 62 of 380 directories; 16.3% completed
vdump: Dumped 3120 of 18015 files; 17.3% completed

vdump: Status at Fri Nov 20 12:18:00 1998
vdump: Dumped 132184553 of 522439448 bytes; 25.3% completed
vdump: Dumped 160 of 380 directories; 42.1% completed
vdump: Dumped 4390 of 18015 files; 24.4% completed

vdump: Status at Fri Nov 20 12:23:00 1998
vdump: Dumped 199967522 of 522439448 bytes; 38.3% completed
vdump: Dumped 227 of 380 directories; 59.7% completed
vdump: Dumped 4563 of 18015 files; 25.3% completed

vdump: Status at Fri Nov 20 12:28:00 1998
vdump: Dumped 261432284 of 522439448 bytes; 50.0% completed
vdump: Dumped 276 of 380 directories; 72.6% completed
vdump: Dumped 6581 of 18015 files; 36.5% completed

vdump: Status at Fri Nov 20 12:33:07 1998
vdump: Dumped 326461517 of 522439448 bytes; 62.5% completed
vdump: Dumped 311 of 380 directories; 81.8% completed
vdump: Dumped 8851 of 18015 files; 49.1% completed

vdump: Status at Fri Nov 20 12:38:07 1998
vdump: Dumped 372711762 of 522439448 bytes; 71.3% completed
vdump: Dumped 332 of 380 directories; 87.4% completed
vdump: Dumped 12426 of 18015 files; 69.0% completed

vdump: Status at Fri Nov 20 12:43:10 1998
vdump: Dumped 433346028 of 522439448 bytes; 82.9% completed
vdump: Dumped 356 of 380 directories; 93.7% completed
vdump: Dumped 14798 of 18015 files; 82.1% completed

vdump: Status at Fri Nov 20 12:48:10 1998
vdump: Dumped 502212536 of 522439448 bytes; 96.1% completed
vdump: Dumped 375 of 380 directories; 98.7% completed
vdump: Dumped 16866 of 18015 files; 93.6% completed

vdump: Status at Fri Nov 20 12:50:08 1998
vdump: Dumped 522439448 of 522439448 bytes; 100.0% completed
vdump: Dumped 380 of 380 directories; 100.0% completed
vdump: Dumped 18015 of 18015 files; 100.0% completed
vdump: Dump completed at Fri Nov 20 12:50:08 1998
#

<!--end excerpt-->

Here, /cdex was the mount point for the second hard drive on my system.

During a follow-up call, another "engineer" at DEC/Compaq insisted that
vdump would *not work* with a CD file system because CDFS is not listed
in
the vdump man page as a supported file system. However, it clearly *does
work* (at least on my system which is a DPW-433au running Digital UNIX
4.0D).

-C

;Chris Callahan
;UC Davis Division of Information Technology
;crcallahan_at_ucdavis.edu




----------8<-----------------------------------------------------------
From: Lars Bro <lbr_at_dksin.dk>

Wat will you be using this thing for ?

It can:
    If your process has a STREAMS file descriptor open, it can
    wire that one down into the file system by use of the mount()
    command. This means that you start with a directory and when
    the mount is completed, you have a char device file.

    So, the process that has the file open is supposed to do the
    mount and it will only be valid as long as the process is alive.
    After the process is dead you can manually remoive the c-dev
    by the fdetach command.

    This is why fattach(3) is a library function and fdetach(8) is
    also a command.

    So you wont use this if you are trying to make your own auto
    mounter.....

yours,
Lars Bro

   Lars Bro lbr_at_dksin.dk

   ABB Daimler-Benz Transportation Signal A/S +45 36 39 01 77






-----------8<-----------------------------------------------------------
From: "Serguei Patchkovskii" <patchkov_at_ucalgary.ca>


Hi,

> I would like to use loopback filesystem on my DU 4.0[bd].

Officially, loopback mounts are not supported on DU 4.0d.
However, you can get an experimental loopback driver for
DU 4.0d from Sean Davidson at davidson_at_zk3.dec.com. It is
totally unsupported, and places some restrictions on where
the file can be (e.g., not on NFS file system), but unless
you are going to roll your own this all you are going to get.

Regards,

/Serge.P
Received on Tue Jan 19 1999 - 18:01:10 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT