Version 1 (modified by ligon, 15 months ago)

--

How to Remove an Invalid Object from a Directory

Symptom: the ls command displays question marks for a particular file

When ls displays the questions marks, this means that a directory entry exists for the file but the file's data space entry is missing. The data space entry could be either the metafile entry AND/OR a datafile entry (of which there could be many). To remove this partial directory entry, issue the PVFS2-remove-object command:

pvfs2-remove-object --fsid=<decimal number of the id> --parent=<decimal number of the directory's handle> --dirent="string value of the file name in the directory"

You can see the directory's handle by issuing pvfs2-ls -ail <path/to/directory>. The fsid is in the config file, listed as the ID in the Filesystem subsection.

Example:

[bligon@SL6 bin]$ ./pvfs2-ls -ail /mnt/pvfs2/ligon

15611686018427387901 drwxrwxrwx    1 bligon   bligon          4096 2012-03-06 12:21 .
15611686018427387901 drwxrwxrwx    1 bligon   bligon          4096 2012-03-06 12:21 .. (faked)
15611686018427387894 -rwxr-xr-x    1 bligon   bligon       3007644 2012-03-06 12:21 test.2
15611686018427387899 -rwxrwxrwx    1 bligon   bligon             0 2012-03-02 15:12 touch.1
15611686018427387895 -rwxr-xr-x    1 bligon   bligon       3007644 2012-03-06 12:21 pvfs2-touch.2
?                     ?            ? ?        ?             ?      ?          ?     pvfs2-touch.o

To remove pvfs2-touch.o from the ligon directory:

pvfs2-remove-object --fsid=792643256  --parent=15611686018427387901   --dirent="pvfs2-touch.o"


<Defaults>
        UnexpectedRequests 50
        EventLogging none
        EnableTracing no
        LogStamp datetime
        BMIModules bmi_tcp
        FlowModules flowproto_multiqueue
        PerfUpdateInterval 1000
        ServerJobBMITimeoutSecs 30
        ServerJobFlowTimeoutSecs 30
        ClientJobBMITimeoutSecs 300
        ClientJobFlowTimeoutSecs 300
        ClientRetryLimit 5
        ClientRetryDelayMilliSecs 2000
        PrecreateBatchSize 0,32,512,32,32,32,0
        PrecreateLowThreshold 0,16,256,16,16,16,0

        DataStorageSpace /home/bligon/stable/install/storage
        MetadataStorageSpace /home/bligon/stable/install/storage

        LogFile /home/bligon/stable/install/pvfs2-server.log
</Defaults>

<Aliases>
        Alias SL6 tcp://SL6:3334
</Aliases>

<Filesystem>
        Name pvfs2-fs
        ID 792643256
        RootHandle 14611686018427387904
        FileStuffing yes
        <MetaHandleRanges>
                Range SL6 14611686018427387904-15611686018427387904
        </MetaHandleRanges>
        <DataHandleRanges>
                Range SL6 4611686018427387905-9223372036854775806
        </DataHandleRanges>
        <StorageHints>
                TroveSyncMeta yes
                TroveSyncData no
                TroveMethod alt-aio
        </StorageHints>
</Filesystem>