Can I truncate a corrupt directory?Recovery via fsckext4 file-system max inode limit - can anyone please...

How can I mix up weapons for large groups of similar monsters/characters?

What is the wife of a henpecked husband called?

What's a good word to describe a public place that looks like it wouldn't be rough?

Crystal compensation for temp and voltage

Why does the DC-9-80 have this cusp in its fuselage?

What are these green text/line displays shown during the livestream of Crew Dragon's approach to dock with the ISS?

Quenching swords in dragon blood; why?

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

Why is working on the same position for more than 15 years not a red flag?

How do Japanese speakers determine the implied topic when none has been mentioned?

What is the purpose of easy combat scenarios that don't need resource expenditure?

Finding ratio of the area of triangles

Criticizing long fiction. How is it different from short?

Proof by Induction - New to proofs

Has the Isbell–Freyd criterion ever been used to check that a category is concretisable?

What to do when being responsible for data protection in your lab, yet advice is ignored?

How to add multiple differently colored borders around a node?

Word to be used for "standing with your toes pointing out"

Why is commutativity optional in multiplication for rings?

How much time does it take for a broken magnet to recover its poles?

Why can I easily sing or whistle a tune I've just heard, but not as easily reproduce it on an instrument?

LTSpice: When running a linear AC simulation, how to view the voltage ratio between two voltages?

Why is this code uniquely decodable?

Eww, those bytes are gross



Can I truncate a corrupt directory?


Recovery via fsckext4 file-system max inode limit - can anyone please explain?How can I reduce inode utilization on an ext4 filesystem?fsck an active disk provides different results than fsck on an unmounted diskHow can i fix it: EXT4-fs warning (device sda3): ext4_dx_add_entry: Directory index fullCan I delete files in nginx client_body_temp directory?Amazon EC2 Snapshot corruptProper way to deal with corrupt XFS filesystemsUnable to execute linux commands after fsckHow to delete files after EXT4-fs error: Directory hole found













0















Virtual machine was abruptly killed and the fs is now in an unclean state. Linux would not start, geting stuck on fsck. When I mount the image:



mount /virtual_drives/biginfoservice /mnt -o loop,offset=$((512*2048))
umount /mnt
losetup -f /virtual_drives/biginfoservice -o 1048576
fsck.ext4 -y /dev/loop0


fsck runs for many hours trying to fix one directory that it "restored" which now contains garbage:



Entry 'sess_7923mp40fl72qs9ni3c8qligb5' in /var/lib/php5.BAD (267290) has deleted/unused inode 1892267.  Clear? yes
Entry 'sess_fgido54kard9qjcgvoqpbltma2' in /var/lib/php5.BAD (267290) has deleted/unused inode 540172. Clear? yes
Entry 'sess_9jhiqqg7o5tvglr46h1iv8bsd5' in /var/lib/php5.BAD (267290) has deleted/unused inode 2263409. Clear? yes
Entry 'sess_b1tlsoun1uac3rua4ct7prgur6' in /var/lib/php5.BAD (267290) has deleted/unused inode 937173. Clear? yes
Entry 'sess_3n901mtmvgdn8gkej9vs524sq6' in /var/lib/php5.BAD (267290) has deleted/unused inode 2081592. Clear? yes


I also tried



rm -rf  /mnt/var/lib/php5.BAD


which also runs very long time (more than an hour), without any progress indication. CPU is the bottleneck, one core at 100%. The "restored" inode is huge: 130Mb, and useless: it only keeps stale php sessions. Here is stat /mnt/var/lib/php5.BAD:




File: `/mnt/var/lib/php5.BAD/'
Size: 133345280 Blocks: 260584 IO Block: 4096 directory
Device: 700h/1792d Inode: 267290 Links: 2
Access: (1733/drwx-wx-wt) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-03-03 16:43:01.893840698 +0200
Modify: 2019-03-03 17:02:15.343784806 +0200
Change: 2019-03-03 17:02:15.343784806 +0200


It seems that copying 160Gb of the "good" files would be faster than fixing the existing image. Is there a faster way to get rid of this corrupt directory, like truncate?










share|improve this question



























    0















    Virtual machine was abruptly killed and the fs is now in an unclean state. Linux would not start, geting stuck on fsck. When I mount the image:



    mount /virtual_drives/biginfoservice /mnt -o loop,offset=$((512*2048))
    umount /mnt
    losetup -f /virtual_drives/biginfoservice -o 1048576
    fsck.ext4 -y /dev/loop0


    fsck runs for many hours trying to fix one directory that it "restored" which now contains garbage:



    Entry 'sess_7923mp40fl72qs9ni3c8qligb5' in /var/lib/php5.BAD (267290) has deleted/unused inode 1892267.  Clear? yes
    Entry 'sess_fgido54kard9qjcgvoqpbltma2' in /var/lib/php5.BAD (267290) has deleted/unused inode 540172. Clear? yes
    Entry 'sess_9jhiqqg7o5tvglr46h1iv8bsd5' in /var/lib/php5.BAD (267290) has deleted/unused inode 2263409. Clear? yes
    Entry 'sess_b1tlsoun1uac3rua4ct7prgur6' in /var/lib/php5.BAD (267290) has deleted/unused inode 937173. Clear? yes
    Entry 'sess_3n901mtmvgdn8gkej9vs524sq6' in /var/lib/php5.BAD (267290) has deleted/unused inode 2081592. Clear? yes


    I also tried



    rm -rf  /mnt/var/lib/php5.BAD


    which also runs very long time (more than an hour), without any progress indication. CPU is the bottleneck, one core at 100%. The "restored" inode is huge: 130Mb, and useless: it only keeps stale php sessions. Here is stat /mnt/var/lib/php5.BAD:




    File: `/mnt/var/lib/php5.BAD/'
    Size: 133345280 Blocks: 260584 IO Block: 4096 directory
    Device: 700h/1792d Inode: 267290 Links: 2
    Access: (1733/drwx-wx-wt) Uid: ( 0/ root) Gid: ( 0/ root)
    Access: 2019-03-03 16:43:01.893840698 +0200
    Modify: 2019-03-03 17:02:15.343784806 +0200
    Change: 2019-03-03 17:02:15.343784806 +0200


    It seems that copying 160Gb of the "good" files would be faster than fixing the existing image. Is there a faster way to get rid of this corrupt directory, like truncate?










    share|improve this question

























      0












      0








      0








      Virtual machine was abruptly killed and the fs is now in an unclean state. Linux would not start, geting stuck on fsck. When I mount the image:



      mount /virtual_drives/biginfoservice /mnt -o loop,offset=$((512*2048))
      umount /mnt
      losetup -f /virtual_drives/biginfoservice -o 1048576
      fsck.ext4 -y /dev/loop0


      fsck runs for many hours trying to fix one directory that it "restored" which now contains garbage:



      Entry 'sess_7923mp40fl72qs9ni3c8qligb5' in /var/lib/php5.BAD (267290) has deleted/unused inode 1892267.  Clear? yes
      Entry 'sess_fgido54kard9qjcgvoqpbltma2' in /var/lib/php5.BAD (267290) has deleted/unused inode 540172. Clear? yes
      Entry 'sess_9jhiqqg7o5tvglr46h1iv8bsd5' in /var/lib/php5.BAD (267290) has deleted/unused inode 2263409. Clear? yes
      Entry 'sess_b1tlsoun1uac3rua4ct7prgur6' in /var/lib/php5.BAD (267290) has deleted/unused inode 937173. Clear? yes
      Entry 'sess_3n901mtmvgdn8gkej9vs524sq6' in /var/lib/php5.BAD (267290) has deleted/unused inode 2081592. Clear? yes


      I also tried



      rm -rf  /mnt/var/lib/php5.BAD


      which also runs very long time (more than an hour), without any progress indication. CPU is the bottleneck, one core at 100%. The "restored" inode is huge: 130Mb, and useless: it only keeps stale php sessions. Here is stat /mnt/var/lib/php5.BAD:




      File: `/mnt/var/lib/php5.BAD/'
      Size: 133345280 Blocks: 260584 IO Block: 4096 directory
      Device: 700h/1792d Inode: 267290 Links: 2
      Access: (1733/drwx-wx-wt) Uid: ( 0/ root) Gid: ( 0/ root)
      Access: 2019-03-03 16:43:01.893840698 +0200
      Modify: 2019-03-03 17:02:15.343784806 +0200
      Change: 2019-03-03 17:02:15.343784806 +0200


      It seems that copying 160Gb of the "good" files would be faster than fixing the existing image. Is there a faster way to get rid of this corrupt directory, like truncate?










      share|improve this question














      Virtual machine was abruptly killed and the fs is now in an unclean state. Linux would not start, geting stuck on fsck. When I mount the image:



      mount /virtual_drives/biginfoservice /mnt -o loop,offset=$((512*2048))
      umount /mnt
      losetup -f /virtual_drives/biginfoservice -o 1048576
      fsck.ext4 -y /dev/loop0


      fsck runs for many hours trying to fix one directory that it "restored" which now contains garbage:



      Entry 'sess_7923mp40fl72qs9ni3c8qligb5' in /var/lib/php5.BAD (267290) has deleted/unused inode 1892267.  Clear? yes
      Entry 'sess_fgido54kard9qjcgvoqpbltma2' in /var/lib/php5.BAD (267290) has deleted/unused inode 540172. Clear? yes
      Entry 'sess_9jhiqqg7o5tvglr46h1iv8bsd5' in /var/lib/php5.BAD (267290) has deleted/unused inode 2263409. Clear? yes
      Entry 'sess_b1tlsoun1uac3rua4ct7prgur6' in /var/lib/php5.BAD (267290) has deleted/unused inode 937173. Clear? yes
      Entry 'sess_3n901mtmvgdn8gkej9vs524sq6' in /var/lib/php5.BAD (267290) has deleted/unused inode 2081592. Clear? yes


      I also tried



      rm -rf  /mnt/var/lib/php5.BAD


      which also runs very long time (more than an hour), without any progress indication. CPU is the bottleneck, one core at 100%. The "restored" inode is huge: 130Mb, and useless: it only keeps stale php sessions. Here is stat /mnt/var/lib/php5.BAD:




      File: `/mnt/var/lib/php5.BAD/'
      Size: 133345280 Blocks: 260584 IO Block: 4096 directory
      Device: 700h/1792d Inode: 267290 Links: 2
      Access: (1733/drwx-wx-wt) Uid: ( 0/ root) Gid: ( 0/ root)
      Access: 2019-03-03 16:43:01.893840698 +0200
      Modify: 2019-03-03 17:02:15.343784806 +0200
      Change: 2019-03-03 17:02:15.343784806 +0200


      It seems that copying 160Gb of the "good" files would be faster than fixing the existing image. Is there a faster way to get rid of this corrupt directory, like truncate?







      ext4 fsck inode






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 13 hours ago









      mkaamamkaama

      1514




      1514






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956530%2fcan-i-truncate-a-corrupt-directory%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956530%2fcan-i-truncate-a-corrupt-directory%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Українські прізвища Зміст Історичні відомості |...