- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How do I re-attach an i-node
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
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
тАО03-07-2002 07:39 AM
тАО03-07-2002 07:39 AM
I've got a process where someone had done rm
I know the i-node number (4122 fyi). I want to re-attach it to a dummy file[handle?] so I can echo /dev/null to it. How can I re-attch the i-node?
Tim
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2002 07:52 AM
тАО03-07-2002 07:52 AM
Re: How do I re-attach an i-node
http://www.samag.com/print/documentID=16685
I'm not sure this will work for you, but it's the closest thing I can think of for what you require.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2002 07:54 AM
тАО03-07-2002 07:54 AM
Re: How do I re-attach an i-node
The tool you are looking for is called 'fsdb'. However, you really don't want to use this guy as it is extrememly dangerous. Man fsdb_vxfs (or fsdb_hfs) for details. I'm not going to give you the specifics because you really don't want to do this especially on a mounted, active filesystem. I rather doubt that trying to copy to /dev/null is going to help anyway because the file is probably opened in append mode and will continue to try to write at EOF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2002 08:00 AM
тАО03-07-2002 08:00 AM
Re: How do I re-attach an i-node
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2002 09:35 AM
тАО03-07-2002 09:35 AM
Re: How do I re-attach an i-node
Thanks for the pointer to the sysadm site. unfortunately the documentID=16685 does not seem to exist so it throws me to the home page & I can't seem to find the areticle you are talking about? Could you expand?
Clay:
fsdb, I did have a quick look at this but did not like the warning (words to the effect) "if you use this utility you can irrevacbly loose all the data on your filesystem" - None the less I'm still curious as to how I could re-attach the i-node even if I only ever use it on "test" systems. the man page is a little fuzzy on this.
It look like shut down the process!! Outage time. I'll assign points some time tomorrow
Cheers
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2003 12:15 PM
тАО05-17-2003 12:15 PM
Re: How do I re-attach an i-node
Sorry for being extremly late on this thread :-) but I'm the guy who does the port of TCT to HP-UX...and I just stumbled across this discussion via google and would like to quickly add two general points from TCT's perspective:
unrm does not work on the relationship between inode and file name, so it can't be used to reassign another filename to the inode. What unrm does is it collects all data blocks from a filesystem which are marked as free and spits them onto stdout where you then have to sort out the mess using e.g. lazarus. So it's only for recovering file data.
Even if there was a tool that could easily assign a filename to a specific inode number, Unix in general and HP-UX would keep you from doing what Tim wanted to. When the last reference to an inode is removed by rm
So the only way would have been the fsdb, but with unforseable consequences for the application process, who, for the "file removal philosophy" laid out can always safely assume that a file handle he has open remains available for him until he closes it or the process terminates. Evil software uses this property to hide sniffer log files etc. by "removing" them after program startup. So looking back the process shutdown was clearly the best path.
Harry, adding vxfs support is something I keep thinking about, but is is a very large endeavor, because disk layout and internal structures of vxfs are much more complex than HFS. HFS was easy, because from the disk layout it's idential to UFS/Berkeley FFS, which is well documented.
Public information about VxFS is very scarce, only recently I found a book which goes a bit beyond the standard whitepapers: UNIX Filesystems : Evolution, Design, and Implementation by Steve D. Pate. Any additional pointers to documentation would be greatly appreciated.
Best regards,
Knut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2003 07:25 AM
тАО05-20-2003 07:25 AM
Re: How do I re-attach an i-node
Regards
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-21-2004 02:43 AM
тАО07-21-2004 02:43 AM
Re: How do I re-attach an i-node
Thanks
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2004 07:54 AM
тАО07-22-2004 07:54 AM
Re: How do I re-attach an i-node
Hmm, me too.. I never actually tried (actually understood is more accurate) the above.. I was too scared..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2004 08:16 AM
тАО07-22-2004 08:16 AM
Re: How do I re-attach an i-node
I'd like to re-itterate my question, as I've realised there are at least two interpretations
o A file that is STILL ATTACHED to a RUNNING process was removed. Thus the DATA within the file is DEFINITELY still intact, but unaccessable. you can spot these types of situatiions with the tool lsof.
o Someone has done rm
I'm only concerned with the first case. This is a common problem e.g. when someone does "rm /var/adm/syslog/syslog.log". What they should have/intended to do is something like "> /var.adm/syslog/syslog.log".. I effectively want to do this data removel AFTER the rm has been issued.
I think Knut Eckstein is talkin partially about this. but I'm still slightly confused .. as Knut mentions a scenario similar to this..
"Evil software uses this property to hide sniffer log files etc. by "removing" them after program startup"
This implies to me the Evil software is able to hide it's log files for latter extraction... Thus I conclude the Evil software must do one of two things
1 - re-attach the i-node to the intact data
2 - attach the data to another i-node for latter extraction.
3 - spool the data into another file (OK this does not help me, as the original data is hidden and this is what I want to delete)
Just to re-itterate, I'm not interested in getting back the data.. I actually want to destroy it!!! (though reserecting the data may be useful for others)
Regards
Tim