Change EXT4 commit root parttion

Forum Forums General Software Change EXT4 commit root parttion

  • This topic has 8 replies, 2 voices, and was last updated Sep 13-4:25 pm by mustdos.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #88757
    Member
    mustdos

      I have an active root partition that I want to change it’s time to commit to a few minutes; how do I safely do that?

      • This topic was modified 7 months, 4 weeks ago by mustdos.
      #88760
      Member
      sybok
        Helpful
        Up
        0
        ::

        Hi, your post does not make clear (at least to me) what/how do you wish change it.
        Could you please elaborate?
        E.g. do you wish to resize or convert to another file-system or something completely else?
        Best way would probably be to boot a live USB to ensure the root partition is not mounted/actively used.

        BEWARE: Any such change in partition is potentially dangerous.
        I used a live USB to resize Windows partition once. Unfortunately, the system in live-USB froze/crashed thus messing up Windows beyond repair.
        This was a single (and painful) incident of this type in many successful uses of live USB.

        #88762
        Member
        mustdos
          Helpful
          Up
          0
          ::

          I have a laptop with one HDD and multiple partitions.

          I want to change the commit time so I won’t have to keep the HDD awake while I record a game.

          #88763
          Member
          mustdos
            Helpful
            Up
            0
            ::

            The entire HDD is ext4 partitions so no need to worry about windows

            #88765
            Member
            sybok
              Helpful
              Up
              0
              ::

              Unfortunately, I had no idea what a “commit time” is. Fortunately, web search helped:
              https://www.man7.org/linux/man-pages/man5/ext4.5.html
              https://unix.stackexchange.com/questions/155784/advantages-disadvantages-of-increasing-commit-in-fstab
              Thus you wish to re-mount your root with new value of commit time.

              Then, the changes I can think of are the following:
              1) Permanent change:
              A) Backup and appropriately edit ‘/etc/fstab’
              B) Force re-mount using e.g. ‘mount -a’ (?)
              2) Temporary change (up to reboot):
              ‘mount -o remount,<options> <device> <target folder>’

              See man page of ‘mount’.

              Unfortunately, I am not 100% sure what is safer and this is my best guess (not quite sure how it behaves in the case of root partition).

              #88771
              Member
              mustdos
                Helpful
                Up
                0
                ::

                Here’s my /etc/fstab

                # Pluggable devices are handled by uDev, they are not in fstab
                UUID=daf10bc5-a40d-4981-9504-f27448c747f9 / ext4 noatime 1 1
                UUID=cbd1dbc5-13bd-4d5a-bd19-ce71f69d8874 swap swap defaults 0 2
                UUID=E8C5-AE3A /boot/efi vfat noatime,dmask=0002,fmask=0113 0 0
                #-> /dev/sda4
                UUID=ee0f0c73-f3c5-4966-8928-f489d81d46ef /media/ee0f0c73-f3c5-4966-8928-f489d81d46ef ext4 noauto,exec,users 0 0
                #-> /dev/sda5
                UUID=9b550efe-7817-406d-9e5d-541b469e2eec /media/9b550efe-7817-406d-9e5d-541b469e2eec ext4 noauto,exec,users 0 0
                /dev/cdrom /media/cdrom iso9660 noauto,users,exec,ro 0 0
                /dev/cdrw /media/cdrw iso9660 noauto,users,exec,rw 0 0
                /dev/dvd /media/dvd udf noauto,users,exec,ro 0 0
                /dev/dvdrw /media/dvdrw udf noauto,users,exec,rw 0 0
                /dev/sr0 /media/sr0 auto noauto,users,exec,ro 0 0

                NVM, I guess I have to reboot

                • This reply was modified 7 months, 4 weeks ago by mustdos.
                #88773
                Member
                mustdos
                  Helpful
                  Up
                  0
                  ::

                  UUID=ee0f0c73-f3c5-4966-8928-f489d81d46ef /media/ee0f0c73-f3c5-4966-8928-f489d81d46ef ext4 noauto,exec,users,data=journal,commit=600 0 0

                  For anyone viewing, please validate that’s safe to reboot on.

                  • This reply was modified 7 months, 4 weeks ago by mustdos.
                  #88777
                  Member
                  mustdos
                    Helpful
                    Up
                    0
                    ::

                    Plus, the /dev/sda2 doesn’t show here; how do I modify it’s commit time?

                    #88778
                    Member
                    mustdos
                      Helpful
                      Up
                      0
                      ::

                      Will the data also flush after being suspended (closing the laptop lid even for over 10 minutes) or the timer continues only after being fully awake?

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • You must be logged in to reply to this topic.