loopback filesystem disappears after reboot


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users loopback filesystem disappears after reboot
# 1  
Old 10-21-2011
loopback filesystem disappears after reboot

I am running solarix x86 on a dell r810; I have mirrored the two internal 300Gb disks and accepted the default directory structure during the installation. Oracle 11g R2 was then installed with a view to using this machine in a DR scenario.
The following steps were performed to create two disks on the loopback filesystem which could then be presented to orace ASM to create a disk group:
# pwd
/export/home/asm
# mkfile 5G asm_disk1
# mkfile 5G asm_disk2
# ls -lt
total 20981792
-rw------T 1 root root 5368709120 Oct 20 08:46 asm_disk2
-rw------T 1 root root 5368709120 Oct 20 08:43 asm_disk1
#
# chown oracle:dba asm_disk*
# ls -lt
total 20981792
-rw------T 1 oracle dba 5368709120 Oct 20 08:46 asm_disk2
-rw------T 1 oracle dba 5368709120 Oct 20 08:43 asm_disk1
# chmod 660 asm_disk*
# ls -lt
total 20981792
-rw-rw---- 1 oracle dba 5368709120 Oct 20 08:46 asm_disk2
-rw-rw---- 1 oracle dba 5368709120 Oct 20 08:43 asm_disk1
#

# lofiadm -a /export/home/asm/asm_disk1 /dev/lofi/1
# echo $?
0
# lofiadm -a /export/home/asm/asm_disk2 /dev/lofi/2
# echo $?
0
#

# ls -lt /dev/lofi/1
lrwxrwxrwx 1 root root 29 Oct 20 08:53 /dev/lofi/1 -> ../../devices/pseudo/lofi@0:1
# ls -lt /dev/lofi/2
lrwxrwxrwx 1 root root 29 Oct 20 08:53 /dev/lofi/2 -> ../../devices/pseudo/lofi@0:2
#

# ls -lt /devices/pseudo/lofi@0:1
brw------- 1 root sys 144, 1 Oct 20 08:53 /devices/pseudo/lofi@0:1
# ls -lt /devices/pseudo/lofi@0:2
brw------- 1 root sys 144, 2 Oct 20 08:53 /devices/pseudo/lofi@0:2
#

# mknod nasm_disk1 c 144 1
# echo $?
0
# mknod nasm_disk2 c 144 2
# echo $?
0
# ls -lt
total 20981792
crw-r--r-- 1 root root 144, 2 Oct 20 09:00 nasm_disk2
crw-r--r-- 1 root root 144, 1 Oct 20 09:00 nasm_disk1
-rw-rw---- 1 oracle dba 5368709120 Oct 20 08:46 asm_disk2
-rw-rw---- 1 oracle dba 5368709120 Oct 20 08:43 asm_disk1
#
The two nasm_disk* disks can then be discovered by Oracle ASM and a disk group can be created.
After a reboot, there were difficulties with the Oracle ASM instance. After much investigation, it was found that the lofiadm changes needed to be reapplied:
# ls -lL /dev/lofi/*
/dev/lofi/1: No such file or directory
/dev/lofi/2: No such file or directory
#
I had to delete the nasm_disk* disks, rm nasm_disk*, and the /dev files:
# pwd
/dev/lofi
# ls -lt
total 4
lrwxrwxrwx 1 root root 29 Oct 20 11:22 2 -> ../../devices/pseudo/lofi@0:2
lrwxrwxrwx 1 root root 29 Oct 20 11:22 1 -> ../../devices/pseudo/lofi@0:1
# ls -lL
./1: No such file or directory
./2: No such file or directory
total 0
#
# rm 1
# rm 2
then started again with the lofiadm commands onwards above, which successfully reconfigured the loopback file system.
My question is:
Is it possible to get the loopback filesystem config to persist across the reboot?
The two possible courses of action so far are to reinstall the OS with two spare partitions that can be picked up from /dev/rdsk, or to write a script to reapply the lofi config at boot time.
Is it possible to get the loopback filesystem config to persist across the reboot?
Thanks,
J
# 2  
Old 10-23-2011
put the filesystems in vfstab? Did you do that?
# 3  
Old 10-26-2011
I did try this; first I amended vfstab adding:

/export/home/asm/nasm_disk1 - /dev/lofi/1 lofs no yes rw
/export/home/asm/nasm_disk2 - /dev/lofi/2 lofs no yes rw

On reboot was the server was uncontactable. I connected via the iDRAC and removed the entries from vfstab, rebooted and could login again.

I created mount points using mkdir and mounted the devices using mount lofs, this time using 2Gb file systems to speed things up:

# mkdir -p /u02/asm1
# mkdir -p /u02/asm2

# cd /export/home/asm
# mkfile 2G asm_disk1
# mkfile 2G asm_disk2
#

# pwd
/export/home/asm
# ls -lt
total 8392736
-rw------T 1 root root 2147483648 Oct 19 14:01 asm_disk2
-rw------T 1 root root 2147483648 Oct 19 14:00 asm_disk1
# chown oracle:dba asm*
# chmod 660 asm*
# ls -lt
total 8392736
-rw-rw---- 1 oracle dba 2147483648 Oct 19 14:01 asm_disk2
-rw-rw---- 1 oracle dba 2147483648 Oct 19 14:00 asm_disk1
#

# mount -F lofs /export/home/asm/asm_disk1 /u02/asm1
# echo $?
0
# mount -F lofs /export/home/asm/asm_disk2 /u02/asm2
# echo $?
0

This would have allowed a mount in vfstab, but the files weren't usable. The /u02/asm* mount points did not show as 2Gb nor were they usable for ASM in when the ASM discovery path pointed there.
# 4  
Old 10-26-2011
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Sub-folder in share disappears when mounting to other server

Hello, I have 3 solaris 11.2 servers: 1 and 2: are just fileservers with 1 zfs-share server 3: i want to use this one to connect to the rest of our network (windows machines and a few solaris machines) I created the shares on all servers like this (x needs to be replace with the number... (9 Replies)
Discussion started by: Wim_123
9 Replies

2. UNIX Desktop Questions & Answers

Loopback

clear echo "vans, Rolland" echo "Press in Your Keyboard to Quit" echo -e "Please Enter Your Choice : \c" read option case $option in I have created the corresponding information for each input on the display so... My question is... How do I display the corresponding information... (6 Replies)
Discussion started by: thriveforana
6 Replies

3. UNIX for Dummies Questions & Answers

How to Loopback?

This is in the beginning of the program: clear tput cup 1 20 echo "Welcome to UNIX I Final Assignment" tput cup 4 3 echo -e "Who would you like to look up? \c" tput cup 6 5 echo "vans, Rolland" tput cup 8 5 echo "ones, Mildred" tput cup 10 5 echo "mith, Julie" tput cup 12 5 echo... (0 Replies)
Discussion started by: thriveforana
0 Replies

4. Shell Programming and Scripting

[Perl + Gtk2] Image disappears after scrolling / minimizing window

Hello everyone I don't know if it's the right place to ask, but I will try. I want to use Gtk2 in my Perl chart-drawing script, I found a sample code that could be very useful for me somewhere, but I noticed there is one problem with that - when I draw something, and then scroll the window or... (0 Replies)
Discussion started by: xqwzts
0 Replies

5. Solaris

socket in listen state disappears/closes automatically

Hi, I am using solaris 10. I have opened a socket connection using java in solaris 10 operating system, the port went to LISTEN state and able to create new socket connection and the new connections went to ESTABLISHED state. If I issue the command "netstat -an | grep <<portnumber>>", I... (10 Replies)
Discussion started by: kumar3k
10 Replies

6. 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

7. Filesystems, Disks and Memory

Can a Loopback Filesystem be Partitioned?

I have a disk image file created for use with the Linux version of the QEMU emulator. It's partitioned. I opened it with fdisk and the partitions show up with some extra messages about physical/logical endings: Disk knoppix.img: 0 MB, 0 bytes 16 heads, 63 sectors/track, 0 cylinders Units =... (3 Replies)
Discussion started by: deckard
3 Replies

8. Filesystems, Disks and Memory

Loopback files on a FAT based Filesystem?

I'm trying to set up a set of loopback files on a digital music player so I can carry a QEMU virtual machine with me. The digital music player in question is the Rio Karma and the filesystem it uses is omfs. Based on what I read at the Rio Karma FS page:... (1 Reply)
Discussion started by: deckard
1 Replies

9. Solaris

different between soft reboot and hard reboot

Hi Guru's Can any want here could explain to me the different between soft reboot and hard reboot . Best Regards Seelan (3 Replies)
Discussion started by: seelan3
3 Replies

10. Filesystems, Disks and Memory

Using loopback devices in RAID?

Hopefully I am posting this silly question in the right place... I was wondering about the possibility of using loopback files on a physical disk to create virtual disks that could shrink or grow as needed. Something like RAID 0, but instead of using block devices, just using files. If I need... (0 Replies)
Discussion started by: deckard
0 Replies
Login or Register to Ask a Question