1830898 Members
3019 Online
110017 Solutions
New Discussion

Memory based filesystems

 
SOLVED
Go to solution
Charles Bissell
New Member

Memory based filesystems

Hi,

Is it possible to create a memory-based filesystem on HP-UX 10.20 or 11.0? I've done this before on Sun (tmpfs) and DEC (mfs) but can't find the equivalent on HP.

Thanks all,
Charles.
2 REPLIES 2
Edward Sedgemore
Trusted Contributor
Solution

Re: Memory based filesystems


For HP-UX 11 do;

1. Modify your kernel to include the "ram" driver:

# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s system
# vi /stand/build/system
Edit the system file
Add the "ram" driver in alphabetic order with the other drivers
# mk_kernel -s system
# mv /stand/system /stand/system.prev
# cp /stand/vmunix /stand/vmunix.prev
# rm -rf /stand/vmunix/dlkm.prev
# mv /stand/dlkm /stand/dlkm.prev
# mv /stand/build/system /stand/system
# kmupdate
# shutdown -r 0


2. Set up the device files and mount the ramdisk file system:

a. Make device files with
major 9 (both block and char),
minor 0xVSSSSS,
where V is the volume number,
SSSSS is the number of sectors in the ram disk,
and a sector is 256 bytes.

b. # mknod /dev/rram1 c 9 0x101000
# mknod /dev/ram1 b 9 0x101000 # makes a 1 meg ram disk.
# newfs -F hfs /dev/rram1
# mount /dev/ram1 /ramdisk

For HP-UX 10.20, there is no kmupdate command
so do as follows:

1. Modify your kernel to include the "ram" driver:

# cd /stand/build
# /usr/lbin/sysadm/system_prep -v -s system
# vi /stand/build/system
Edit the system file
Add the "ram" driver in alphabetic order with the other drivers
# mk_kernel -s system
# mv /stand/system /stand/system.prev
# cp /stand/vmunix /stand/vmunix.prev
# mv /stand/build/system /stand/system
# mv /stand/build/vmunix_test /stand/vmunix
# shutdown -r 0

2. Set up the device files and mount the ramdisk file system:

a. Make device files with
major 9 (both block and char),
minor 0xVSSSSS,
where V is the volume number,
SSSSS is the number of sectors in the ram disk,
and a sector is 64 (not 256) bytes.

# mknod /dev/rram1 c 9 0x9FF000
# mknod /dev/ram1 b 9 0x9FF000
# newfs -F hfs /dev/rram1
# mount /dev/ram1 /ramdisk
Vincenzo Restuccia
Honored Contributor

Re: Memory based filesystems

Create a secondary swap:
lvcreate -L xxx /dev/vg00/lvolx
edit /etc/fstab with:
/dev/vg00/lvolx /swap swap pri=2 0 0
enabling swap with:swapon -a
verify:swapinfo
and mount /dev/vg00/lvolx /swap.