On Mon, Oct 22, 2007 at 10:42:25AM +1000, Barry Naujok wrote:
> On Mon, 22 Oct 2007 09:50:52 +1000, David Chinner <dgc@xxxxxxx> wrote:
> >On Fri, Oct 19, 2007 at 12:10:08PM +0200, Louis-David Mitterrand wrote:
> >>sylla:~# xfs_io -r -c "chattr -i" /lost+found/3912672557
> >>/lost+found/3912672557: No such file or directory
> >
> >Strange. This implies that lookup can't find inode # 3912672557.
> >We know it is there...
> >
> >How many other files in the directory? Can you get the inode number
> >for the lost+found directory and dump that with xfs_db (as per above)?
> >
> >Also, what happens if you "touch /lost+found/unix.7.gz" and try again?
>
> Being a symbolic link, xfs_io follows them rather than operates on
> them directory.
Actually, I tested that before posting. If the symlink is dangling,
then the symlink gets the attributes attached to it:
# ls -l /mnt/scratch/
total 0
lrwxrwxrwx 1 root root 22 Oct 22 11:09 foo -> /mnt/scratch/unix.7.gz
# ls -l /mnt/scratch/unix.7.gz
/bin/ls: /mnt/scratch/unix.7.gz: No such file or directory
# xfs_io -f -r -c "lsattr" /mnt/scratch/foo
-------------- /mnt/scratch/foo
# xfs_io -f -c "chattr +i" /mnt/scratch/foo
# xfs_io -f -r -c "lsattr" /mnt/scratch/foo
--i----------- /mnt/scratch/foo
# umount /mnt/scratch
# mount !$
mount /mnt/scratch
# xfs_io -f -r -c "lsattr" /mnt/scratch/foo
--i----------- /mnt/scratch/foo
# xfs_io -f -c "chattr -i" /mnt/scratch/foo -r
# xfs_io -f -r -c "lsattr" /mnt/scratch/foo
-------------- /mnt/scratch/foo
#
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
|