Operating System - HP-UX
1755763 Members
2602 Online
108838 Solutions
New Discussion юеВ

Re: Is there such thing as a loop device in HP-UX?

 
Ralph Grothe
Honored Contributor

Is there such thing as a loop device in HP-UX?

Hi,

although I know most of you haven't got a too high esteem for the free Unices like Linux or the BSDs, there are many goodies in those that I really miss in HP-UX.
One such for instance is the /proc virtual filesystem (which makes retrieval of HW info and online setting of kernel parameters so handy).
Another one is the so called loop device in Linux.

E.g. you can do so neat things like this (provided you have loop device support compiled into your kernel, but most distributed kernels already do):

dd if=/dev/cdrom of=/mnt/iso_store/cd_blabla.iso
mount -t iso9660 -o loop /mnt/iso_store/cd_blabla.iso

Now you roam around in the filesystem of the dd'ed cdrom.

Also you can easily create your own filesystems (this is often done when creating an initial ramdisk)

e.g.

dd if=/dev/zero of=/tmp/my_image bs=1m count=100
mkfs -t ext2 -b 2048 -m0 /tmp/my_image
mount -t ext2 -o loop /tmp/my_image /mnt/tmp1
cd /etc
tar cf - . | (cd /mnt/tmp1; tar xpf -)
umount /mnt/tmp1
cdrecord -v -fs=4m speed=8 dev=?,?,? /tmp/my_image

It would be great to have such loop device in HP-UX.
Maybe there is something similar which I only haven't come accross yet?

Regards
Ralph
Madness, thy name is system administration
4 REPLIES 4
Dave S. Johnson
New Member

Re: Is there such thing as a loop device in HP-UX?

Any word on a loop device for HP-UX?

Also, has anyone ever tried a Linux based CD image server NFS shared to a HP-UX box? HP seems to have trouble with the loop device even through NFS.

Thanks!

DaveJ
A. Clay Stephenson
Acclaimed Contributor

Re: Is there such thing as a loop device in HP-UX?

There is no equivalent to either in HP-UX. Loopback filesystems also make it possible (and rather easy) to add encryption "on the fly" to a filesystem.

The way that you get process data in HP-UX is via the pstat_XXXX system calls. Man pstat for details.

The /proc filesystem was/is a very useful feature of SVR4 UNIX.
If it ain't broke, I can fix that.
Zeev Schultz
Honored Contributor

Re: Is there such thing as a loop device in HP-UX?

1)loop devices aren't supported on HP-UX
2)loop file systems (LOFS)- YES , please read
mount_lofs (1m).However,I'm not sure about NFS
export support of such a mounts.BTW,lofs was simulated earlier by NFS loopback mount.

Regards,

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Roger Crettol
Advisor

Re: Is there such thing as a loop device in HP-UX?

Zeev,

Reading abount mount_lofs(1m), I think that it corresponds rather to linux' mount with the --bind option.

A linux loop device, on the other hand, allows you to specify at mount time the file system type (= structure) of the underlying data, which is another thing.

Thanks for the hint anyway - I learned more about the capabilities of HPUX.

-rg-