remove hardlink directory


 
Thread Tools Search this Thread
Operating Systems AIX remove hardlink directory
# 1  
Old 11-23-2006
remove hardlink directory

I have to move a lpar from one 671 to another (aix 5.2 ML 07)

when I run mksysb, It alway hangs with "archieving file list"


I've tried to exlude every directory, but still not working

the only thing that can be a problem, is a hardlink directory

normally it should not be possible to hardlink a directory, but its there and I have no idea how to remove it

it's in the /tmp filesystem

drwxrwxrwt 29 bin bin 6656 Nov 23 10:30 /tmp
drwxrwxrwt 29 bin bin 6656 Nov 23 10:30 /tmp/tmptest

edit: and they have the same inode-number

tmptest points to tmp

when I remove tmptest with rm -r, then all files in /tmp will be deleted too


there is no way of shutting the machine down or stop the application, expect for the time I need to shutdown the old lpar an boot the new one

any ideas?


thanks for your help,

funksen

Last edited by funksen; 11-23-2006 at 05:59 AM..
# 2  
Old 11-23-2006
Looking at a manual for 5.3, I see that AIX has unlink in /usr/sbin. So I would try:
unlink /tmp/tmptest

NB unlink is very dangerous command and should be used with considerable restraint. But I think that, in this very unusual situation, it is the only way out short of rebuilding the filesystem containing /tmp.
# 3  
Old 11-23-2006
thanks for the answer, I've tried that before

>> unlink: The requested resource is busy.

but I think you are right, I have rebuild the file system

whats strange to me is the fact that it's called "tmptest", I think a funny guy tried something what he has lerned in AIX course, attached with "don't try this at home"

grml..
# 4  
Old 11-27-2006
Try fuser /tmp/tmptest
# 5  
Old 11-27-2006
I know why it's busy, thats not the problem

but I can't shut the application down
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Debian

Hardlink on wheezy by default for usb-stick?

May somebody can give me a hint. I am still using my old squeeze and it works the way I want. But my recent post about changing the owners rights, e.g. 777 or 755 anyway, it could be 644 as well. While configuring a new pc, just by chance I discovered how to enter the BIOS. And here it comes. I... (11 Replies)
Discussion started by: 1in10
11 Replies

2. Shell Programming and Scripting

Changing inode value of a hardlink

is it possible to change the inode value/ file path of a hard link? (2 Replies)
Discussion started by: fhill2
2 Replies

3. HP-UX

Directory can't remove!

Hello my friends, I have a directory called log_old when I try to delete it, it tells me no such file or directory. Then I tried to run this command: ls -lb It tells me the directory name, it is: log_old1\177 !! I tried to remove it using inode, using this... (4 Replies)
Discussion started by: Mohannad
4 Replies

4. Shell Programming and Scripting

Remove Directory

By Mistake i created a directory named "-lrt" in one of my working directories and now i am not able to delete it , please suggest hw to delete this directory now ? Thanks in advance. (1 Reply)
Discussion started by: neeraj617
1 Replies

5. UNIX for Dummies Questions & Answers

How to identify a link whether it is a Hardlink or Softlink

i am new to UNIX environment please tell me how to identify a link whether it is a Hardlink or Softlink ? what is the command? thank you all .......:o:o (2 Replies)
Discussion started by: sasith90
2 Replies

6. Shell Programming and Scripting

Remove contents of directory, but not directory

What's the best way to delete everything in a directory, but not the directory itself, without using shell wildcards? (9 Replies)
Discussion started by: pdc
9 Replies

7. Filesystems, Disks and Memory

Recreating a deleted hardlink to a file if I know the inode number

At risk of twisting the rules to nearly the point of breaking (if you think this goes too far mods, I apologise and accept that this should be deleted), I'm hoping someone might be able to cast a little light on the following problem regarding hard links to files. ... (6 Replies)
Discussion started by: Smiling Dragon
6 Replies

8. Solaris

Can't remove a directory

Hello, somehow a directory called -r was created on one of my servers and I can't remove is using either rm or rmdir. Is there a way to remove this directory? Thank you. -David (2 Replies)
Discussion started by: dkranes
2 Replies

9. Solaris

Creating a hardlink to a file

I'm trying to relink a file someone tried to delete while a process (that we don't want to shutdown) also had a filehandle open to it. Consequently, we've got an inode entry but no directory entry (aka 'file') for it. I've tracked the inode number down via lsof, as well as the particular... (0 Replies)
Discussion started by: Smiling Dragon
0 Replies

10. UNIX for Dummies Questions & Answers

smitty, remove user, remove directory as well..

hi, i am on aix. i used smitty to remove a user.. but then found that its directory still exists.... so i have to remove the directory manually... am i doing it the right way? (2 Replies)
Discussion started by: yls177
2 Replies
Login or Register to Ask a Question