* xfs_behaviour
@ 2012-10-19 14:35 Anshul Kundra
2012-10-19 18:10 ` xfs_behaviour Emmanuel Florac
0 siblings, 1 reply; 2+ messages in thread
From: Anshul Kundra @ 2012-10-19 14:35 UTC (permalink / raw)
To: xfs@oss.sgi.com
[-- Attachment #1.1: Type: text/plain, Size: 3542 bytes --]
To Developers,
I have seen a different behaviour in XFS
Suppose I have a file with inode number "131", I have noticed that the inode number of file got changed without deleting the file. When we change the data of the file everytime it changes the inode number. The complete description over the test is as follows
Steps are as follows:
1) I have created a file using "dd" of size 100MB:
#dd if=/dev/zero of=xfs.img bs=1M count=100
2) Created a loopback device over the image:
#losetup /dev/loop1 xfs.img
3) Created file system:
#mkfs.xfs /dev/loop1
4) Mounted:
#mount /dev/loop1 /mnt/xfs_mnt
5) Please check the mount output:
# mount
/dev/sdb2 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/loop0 on /mnt/mount_test type xfs (rw)
/dev/loop1 on /mnt/xfs_mnt type xfs (rw)
6) Created a file using "touch"
# touch kundra.txt
7) Checking the file and its inode number:
# ls -li
total 0
131 -rw-r--r-- 1 root root 0 2012-10-20 01:41 kundra.txt
8) I have written some data using the vim editor, I can't provide snapshot of vim on the list:
#vim kundra.txt
9) Now I checked the inode number using the "ls -li"
# ls -li
total 4
133 -rw-r--r-- 1 root root 19 2012-10-20 01:43 kundra.txt
Please check that the inode number ( from "131" to "133" ) and total value (from "0" to "4" )in the filesystem got changed, I am assuming that the reasom may be due to filesystem of small size but it is showing unexpected behaviour.
Please provide some description over this issue, I am working on Linux SLES
# cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11 SP1 (x86_64) - Kernel \r (\l).
# uname -a
Linux linux-sles 2.6.32.19-0.6-default #1 SMP Fri Aug 31 01:37:50 IST 2012 x86_64 x86_64 x86_64 GNU/Linux
Thanks & Best Regards
Anshul Kundra
::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.
----------------------------------------------------------------------------------------------------------------------------------------------------
[-- Attachment #1.2: Type: text/html, Size: 13995 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: xfs_behaviour
2012-10-19 14:35 xfs_behaviour Anshul Kundra
@ 2012-10-19 18:10 ` Emmanuel Florac
0 siblings, 0 replies; 2+ messages in thread
From: Emmanuel Florac @ 2012-10-19 18:10 UTC (permalink / raw)
To: Anshul Kundra; +Cc: xfs@oss.sgi.com
Le Fri, 19 Oct 2012 20:05:46 +0530 vous écriviez:
> 133 -rw-r--r-- 1 root root 19 2012-10-20 01:43 kundra.txt
>
> Please check that the inode number ( from "131" to "133" ) and total
> value (from "0" to "4" )in the filesystem got changed, I am assuming
> that the reasom may be due to filesystem of small size but it is
> showing unexpected behaviour.
>
Definitely not xfs related. Try modifying the file with cat or echo:
emmanuel[/mnt/downloads]$ ll -i toto
85346879 -rw-r--r-- 1 emmanuel users 6 oct. 19 20:06 toto
emmanuel[/mnt/downloads]$ echo lrgezjn > toto
emmanuel[/mnt/downloads]$ ll -i toto
85346879 -rw-r--r-- 1 emmanuel users 8 oct. 19 20:07 toto
Most file editor use a temporary file and rename it when saving (to
avoid destroying the file in case of an error). This is what a good file
editor (like vim) must do. This is why you're seeing this behaviour.
regards,
--
------------------------------------------------------------------------
Emmanuel Florac | Direction technique
| Intellique
| <eflorac@intellique.com>
| +33 1 78 94 84 02
------------------------------------------------------------------------
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-19 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19 14:35 xfs_behaviour Anshul Kundra
2012-10-19 18:10 ` xfs_behaviour Emmanuel Florac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox