How can we re-mount the RAM disk automatically after the reboot on AIX?

Thread Tools Search this Thread
Operating Systems AIX How can we re-mount the RAM disk automatically after the reboot on AIX?
# 1  
Old 02-24-2014
How can we re-mount the RAM disk automatically after the reboot on AIX?

Hi All,

I was trying to know more about RAM disk concept in AIX. I found something on IBM site.

I was able to create and use/delete RAM disk as per IBM instructions.
But as you guys know, this RAM disk is a temporary storage. (*when ever we reboot the AIX LPAR, content/RAM disk will be gone)

My question is,

Can we create a RAM disk on AIX and make it permanent even after system reboot. ? (incase if i have some important content on it). How can i retrive and re mount the RAM disk automatically after a
system crash/reboot ?

(* i know that, we need to frequently backup the content on RAM disk)

but is there anyway this RAM disk can be brought up after system crash/reboot (like adding some commands in init file ?)

Please guide me.

thank you
# 2  
Old 02-24-2014
You can place an entry in the /etc/inittab or use /etc/rc.d directories and place in whatever run-level directory you want (probably 2)
# 3  
Old 02-24-2014

Thanks for you response. But i do not know how we remount the RAM disk as before.
My thinking is once we reboot the system, we loose the RAM disk.

do i need to add the RAM disk create commands in a file and add an entry in /etc/initab or /etc/rc2.d (run level 2)
& then copy the content from backups ?

# 4  
Old 02-26-2014
Originally Posted by System Admin 77
do i need to add the RAM disk create commands in a file and add an entry in /etc/initab or /etc/rc2.d (run level 2)
& then copy the content from backups ?
In simple words: Yes Smilie

We do this in a similar way

ramdisk:2:once:/usr/local/bin/ramdisk/ramdisk.ksh >/dev/null 2>&1

RAMDISK=`mkramdisk 5M`
mkdir /ramdisk >/dev/null 2>&1
DEVICE="/dev/ramdisk`echo $RAMDISK | awk -F'ramdisk' '{print $2}'`"
echo "yes" | mkfs -V jfs $DEVICE
mount -V jfs -o nointegrity $DEVICE /ramdisk
cp <whatever you need> /ramdisk

If you find a better solution, please let me know.

# 5  
Old 02-27-2014

Thanks for your response. Sure, i will let you know in case if i find a better solution.
thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a script before and after reboot automatically and send output to two locations.

Hello Team . I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are 1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ? 2. The same... (2 Replies)
Discussion started by: Varja
2 Replies

2. Red Hat

Samba won't mount after reboot...please help

I am able to mount samba but it just won't mount when i reboot system what is stopping it from mounting after reboot? I mounted before reboot but right after reboot...i ran mount # mount /dev/mapper/vg_sda2-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs... (0 Replies)
Discussion started by: nokia3310
0 Replies

3. Shell Programming and Scripting

How to run script automatically on reboot as root user?

Hi friends,,, I am running one server on Ubuntu 12.04 LTS 32-bit, some times my pc restarts automatically, with no reason, I have a script to start server which requires root password. in this directory /myserver/ How can I do this ? and some scripts I am having that I... (1 Reply)
Discussion started by: Akshay Hegde
1 Replies

4. Shell Programming and Scripting

if (disk is mounted) unmount if (disk is unmounted) mount

Hey there, sorry if this is a bit too much of a noob question, trying to get to grips with a simple bash script - but i have done ZERO bash scripting. basically having worked out how to mount and unmount disks using: disktool -m *device* & disktool -e *device* - and looking at the result of... (2 Replies)
Discussion started by: hollister
2 Replies

5. UNIX for Advanced & Expert Users

script to automatically mount external usb hard disk

hi all, I have a debian lenny 5.0 server without GNOME installed. the server is at a customer's premise. I want to backup data from the server to the external usb hard disk. the backup will start at e.g 01:00 everyday. the user will plug the drive before going home. also the user will... (1 Reply)
Discussion started by: coolatt
1 Replies

6. UNIX for Dummies Questions & Answers

Script to automatically reboot to newly compiled kernel with fallback

Hi, I'm new here. Just started playing around with kernel compilation. I need a little bit of advice. I'm trying to do a bash script to automatically compile a kernel package and reboot to that new kernel by default, with fallback to the old kernel. So far, I'm getting stuck at the part... (0 Replies)
Discussion started by: tridus_08
0 Replies

7. Solaris

Some NFSs don't mount after reboot

Hi, Couple weeks ago we patched our Solaris 10 systems. I am not sure if this problem is caused by patching: Some NFSs don't mount after reboot. Manual mount is working fine. /etc/vfstab has no problem. What could be the cause? Thanks in advance! :) (17 Replies)
Discussion started by: aixlover
17 Replies

8. AIX

Automatically mounting a filesystem after a reboot

Hi All, I am new to AIX. I am having problems mounting a filesystem after a system reboot. Steps: 1. Create and Map LUN to host 2. On the host, to detect/configure the LUN: /usr/sbin/cfgmgr 3. Create a filesystem: mkfs -V vxfs /dev/hdisk757 4. Create a mountpoint: mkdir -p... (3 Replies)
Discussion started by: austin4397
3 Replies

9. UNIX for Dummies Questions & Answers

Mount Points at reboot

How do I make a mount point reconnect at boot without editing /etc/fstab? Is there an option (or switch) to make this persistent when issuing the mount command from a client? (1 Reply)
Discussion started by: AIXdumb455
1 Replies

10. UNIX for Dummies Questions & Answers

RAM, Hard Disk

Hi, I work in a production support environment. All our PROD machines SPARC machines and Solaris O/S. I want to know how to find out what the hard disk size, RAM size etc. of our PROD machines. Please let me know if there is any way to find out this (other than from system administrator). ... (2 Replies)
Discussion started by: ramaraju
2 Replies
Login or Register to Ask a Question