Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

loop back device

1 view
Skip to first unread message

mujoo

unread,
Sep 16, 2008, 9:03:02 PM9/16/08
to
If we create a loop back device on a file, does it remain persistent
across reboots? If not how should we make it presistent. Where should
the mapping information be stored?

Andrew Gabriel

unread,
Sep 30, 2008, 4:45:27 PM9/30/08
to
In article <d7c2682f-62ca-4c8b...@r66g2000hsg.googlegroups.com>,

mujoo <amu...@yahoo.com> writes:
> If we create a loop back device on a file, does it remain persistent

Please describe what you mean by a loop back device on a file.

> across reboots? If not how should we make it presistent. Where should
> the mapping information be stored?

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

Paul Pluzhnikov

unread,
Oct 2, 2008, 12:01:00 AM10/2/08
to
and...@cucumber.demon.co.uk (Andrew Gabriel) writes:

> In article <d7c2682f-62ca-4c8b...@r66g2000hsg.googlegroups.com>,
> mujoo <amu...@yahoo.com> writes:
>> If we create a loop back device on a file, does it remain persistent
>
> Please describe what you mean by a loop back device on a file.

On Linux, one can associate a device with a file.
This device file can then be used to mount a filesystem.

One common application for easy creation and exploration of CD
images. Try "man losetup" for more info.

>> across reboots?

Persistent across reboots: no.

>> If not how should we make it presistent.

Whichever way you'd like.

>> Where should the mapping information be stored?

Wherever it is most convenient for you.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

jellybean stonerfish

unread,
Oct 2, 2008, 2:05:17 AM10/2/08
to


If you want your loopback to be mounted automatically, then you could add
a line to your /etc/fstab. That's how I would do it.

The disk image is:
"/home/user/diskimg"
The mount point is:
"/mnt/mountpoint"
The /ect/fstab line is:
"/home/user/diskimg /mnt/mountpoint vfat loop,auto 0 0"

For the format of lines in /ect/fstab read:
man fstab


stonerfish


Andrew Gabriel

unread,
Oct 2, 2008, 9:08:34 AM10/2/08
to
In article <m3hc7v7...@somewhere.in.california.localhost>,

Paul Pluzhnikov <ppluzhn...@gmail.com> writes:
> and...@cucumber.demon.co.uk (Andrew Gabriel) writes:
>
>> In article <d7c2682f-62ca-4c8b...@r66g2000hsg.googlegroups.com>,
>> mujoo <amu...@yahoo.com> writes:
>>> If we create a loop back device on a file, does it remain persistent
>>
>> Please describe what you mean by a loop back device on a file.
>
> On Linux, one can associate a device with a file.
> This device file can then be used to mount a filesystem.

Ah - gotcha. (I originally thought he was asking something
to do with named pipes and/or looped back pipes.)

In Solaris, this is a function of lofi - loopback file driver.
The command to setup and tear down lofi files is lofiadm(1M).

# lofiadm -a /home/andrew/snv_97.x86.iso
/dev/lofi/1
# mount -F hsfs /dev/lofi/1 /mnt
#

.
.
.

# umount /mnt
# lofiadm -d /home/andrew/snv_97.x86.iso
#

> One common application for easy creation and exploration of CD
> images. Try "man losetup" for more info.
>
>>> across reboots?
>
> Persistent across reboots: no.

In Solaris 11, the lofiadm part has become optional (many
filesystems will do it for you automatically if you mount
the file).

# mount -F hsfs /home/andrew/snv_97.x86.iso /mnt
#

.
.
.

# umount /mnt
#

You can therefore put such mounts directly into /etc/vfstab:

/home/andrew/snv_97.x86.iso - /mnt hsfs - yes -

>>> If not how should we make it presistent.
>
> Whichever way you'd like.
>
>>> Where should the mapping information be stored?
>
> Wherever it is most convenient for you.
>
> Cheers,

--

0 new messages