?
Solved

Is there a way to create a file on a specific inode in RedHat 7.1?

Posted on 2010-09-16
5
Medium Priority
?
398 Views
Last Modified: 2013-12-06
I had a disk go bad on a RedHat 7.1 system.  A software package on the disk requires a file to be on the exact inode of the previous drive for it to function.

The inode was 1717786.  If I define a dummy.file then do an ls -ial dummy.file the inode of the file is 676.

cd / ; find . -inum 1717786 -depth -print
does not return any file names.

Is there a way to create a file on a specific inode without creating dummy files until the inode is used?

Any suggestions would be appreciated.
Dan
0
Comment
Question by:scodhk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 79

Accepted Solution

by:
arnold earned 501 total points
ID: 33698142
The only way to recover from this is with a restore or contacting the vendor and get the fix.

Are you sure the inode is not already in use?

The inode is allocated by the system, I think this is why the vendor chose this approach.
You could try creating dummy files until the file has the inode you need.
The vendor, whose software you use, is no longer available?
0
 
LVL 7

Assisted Solution

by:askb
askb earned 501 total points
ID: 33698227
Allowing creating a user to file based on the  inode number could be a potential security risk. AFAIK no FS's allow this.

But can you provide  the name of the s/w package which has such a dependency ? I would like to understand this more.

Have you tried mirroring / restoring the disks ?
0
 
LVL 10

Assisted Solution

by:Martin_J_Parker
Martin_J_Parker earned 498 total points
ID: 33699572
If you have an ext2 or ext3 filesystem then you might be able to accomplish what you want with the debugfs command - if you are feeling VERY brave, but it's not something I've tried using myself !
0
 

Author Comment

by:scodhk
ID: 33700924
Thanks to all who replied,

The inode is definitely not in use.  I did a test with the -inum option of find on an inode I knew was used in multiple filesystems and it worked.  The inode I'm looking for returned nothing.

I did what I thought would be an image restore using Tru Image but that although it recreated the filesystem structure it did not restore the files to the original inodes.  The original disk is no longer accessisble.

I will look into the debugfs command then decide if I should try it.

The vendor is no longer available and an old solution was to create the dummy files until the inode was used.  So that is what I will do.

Thanks again.
0
 
LVL 79

Expert Comment

by:arnold
ID: 39280001
If you have a system where the files are in the prefect inode, you can use cpio to copy that file as a data stream and then restore that stream on this system.
0

Featured Post

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question