- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to mount a filesystem in a file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:03 PM
тАО12-08-2004 11:03 PM
How to mount a filesystem in a file
mount -F hfs /file /mountpoint
keeps coming up with:
/file is an invalid operand
I've tried
mount -F lofs /file /mountpoint
same result.
If HP-UX allows you to create a filesystem within a file (using the -d flag) why doesn't it document how to mount the thing!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:10 PM
тАО12-08-2004 11:10 PM
Re: How to mount a filesystem in a file
I'm still struggling conceptually with creating a file system within a file. Sounds like the chicken and the egg and which one comes first to me.
What command and syntax did you use to do this?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:17 PM
тАО12-08-2004 11:17 PM
Re: How to mount a filesystem in a file
# mkfs -F hfs -d -L $HOME/fred 12288 16 8 4096 1024 32 0 8 4216
You can check the file has a filesystem in it by asking how the filesystem was created:
# mkfs -F hfs -m $HOME/fred
which reports:
# mkfs -F hfs -L $HOME/fred 12288 16 8 4096 1024 32 0 8 4216
All well and good, but the filesystem is particularly useless if I can't access it! The only way I can access it so far is to dd it into a ramdisk (unsupported by HP) and mount the ramdisk. Unfortunately I seem to have hit a size limitation of 2MBytes on a ramdisk (possibly a kernel limit) which I am also investigating.
Why have HP given us the -d facility of mkfs without any obvious way of using the file system you've created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:21 PM
тАО12-08-2004 11:21 PM
Re: How to mount a filesystem in a file
So mkfs supports it, fsck supports it. How do you mount it !!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:31 PM
тАО12-08-2004 11:31 PM
Re: How to mount a filesystem in a file
I found the options you used in the mkfs_hfs man page. Could you please explain what your goal is ?
Best regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:35 PM
тАО12-08-2004 11:35 PM
Re: How to mount a filesystem in a file
To create a minimal file system, that together with a minimal kernel will allow a HP server to be booted from a tape device.
--- PLEASE DO NOT MENTION IGNITE AT THIS STAGE, I KNOW ABOUT IGNITE ---
I have already achieved this in SunOS and Linux. HP is the difficult one.
If I can create a filesystem within a file and successfully mount it, then I can copy the requisite files into it, unmount it and dd it onto a bootable tape or CD. An alternative approach is to use a ramdisk, but these aren't officially supported by HP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:42 PM
тАО12-08-2004 11:42 PM
Re: How to mount a filesystem in a file
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:44 PM
тАО12-08-2004 11:44 PM
Re: How to mount a filesystem in a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-08-2004 11:48 PM
тАО12-08-2004 11:48 PM
Re: How to mount a filesystem in a file
just saw your last comment. Why don't you simply create an temporary lvol, create a file system in it, mount it. Then copy whatever you want to it. After that umount it, and copy its contents via dd(1) to a file. Essentially this is what I do, when I fiddle around with Ignite INSTALLFS file systems.
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 12:05 AM
тАО12-09-2004 12:05 AM
Re: How to mount a filesystem in a file
This is common fair on Linux, the free BSDs, and Solaris.
Linux uses either the losetup command to connect a file to a device
(Solaris has the lofiadm command to this end)
After having bound the file to a device you mount it as usual.
In Linux you can straightforward use the mount option "-o loop=/dev/loop?" and it automagically loads the loop or cryptoloop module.
How about putting this feature on the agenda for future HP-UX releases?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 12:36 AM
тАО12-09-2004 12:36 AM
Re: How to mount a filesystem in a file
yes that is an option, but I won't necessarily have any free/spare disk space to create a temporary logical volume on. I would like to make use of filesystem or memory space instead, hence the filesystem in a file or ramdisk approaches.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 01:03 AM
тАО12-09-2004 01:03 AM
Re: How to mount a filesystem in a file
How to use a ramdisk... you should be able to find hints here in the forum. The topic has been discussed quite often (although not being supported either).
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 01:15 AM
тАО12-09-2004 01:15 AM
Re: How to mount a filesystem in a file
apart from testing ISO images before you waste any media the loopfs can be used for crypto filesystems (e.g. hard disk data on a laptop, or carry-round-items like USB sticks).
On Linux it also serves handily for preparing an initial ramdisk (initrd),
something that is required if you want your root disks be mirrored on raidtool devices with lvm volumes on top.
Preparing this or a recovery CD is a bit tricky.
So it helps a lot to be able to mount a file filesystem.
These seem sufficient reasons to me to justify its implementation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 01:50 AM
тАО12-09-2004 01:50 AM
Re: How to mount a filesystem in a file
I use loopback and pseudo filesystems a lot. Like I create ISO images of all my CD's so I can loopback mount on them and share them out and volia! A Virtual CD JukeBox!
I agree with the importance to have a filesystem on a file that is mountable for testing, prototypin, etc..
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 01:55 AM
тАО12-09-2004 01:55 AM
Re: How to mount a filesystem in a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 02:06 AM
тАО12-09-2004 02:06 AM
Re: How to mount a filesystem in a file
BTW, will we finally have full Joliet (Microsoft) support at leat on the ISO mounts? I sometimes have a requirement to share Microsoft Joliet -- (Long file names) CDROMs from UNIX and I always ending up using Linux or Solaris...
Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 02:20 AM
тАО12-09-2004 02:20 AM
Re: How to mount a filesystem in a file
Easy way:
mkfs filesystem into file.
mount file as filesytem.
... do stuff ...
umount filesystem
dd file on to tape/CD
HP way:
have disk with spare capacity in the first place.
vgcreate (possibly)
lvcreate
mkfs
mount
... do stuff ..
umount filesystem
dd file on to tape/CD
lvremove
vgremove
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 02:28 AM
тАО12-09-2004 02:28 AM