Changing label of xfs root file system2019 Community Moderator ElectionPassing execution from initrd to real init and issues with missing devices under /dev/mapperissue in user Quota creationSplit home partition into 2 (xfs on LVM)Does fio corrupt file system (XFS on mdadm, RAID10)?Pass root file system by label to linux kernelextending a 40TB xfs formated FS over LVMMounting a 4tb lvm in Centos 7 keeps saying not enough space on deviceHow to See Bound Folders and Release ThemMerge mount pointsWorkaround for shrinking a XFS CentOS root partition

Why is Arduino resetting while driving motors?

Create all possible words using a set or letters

Hot bath for aluminium engine block and heads

What major Native American tribes were around Santa Fe during the late 1850s?

How do I implement a file system driver driver in Linux?

Open a doc from terminal, but not by its name

Customize circled numbers

Reply 'no position' while the job posting is still there

Varistor? Purpose and principle

Folder comparison

If a character with the Alert feat rolls a crit fail on their Perception check, are they surprised?

Can somebody explain Brexit in a few child-proof sentences?

Is there a conventional notation or name for the slip angle?

My friend sent me a screenshot of a transaction hash, but when I search for it I find divergent data. What happened?

Is a model fitted to data or is data fitted to a model?

Did arcade monitors have same pixel aspect ratio as TV sets?

Drawing ramified coverings with tikz

Has Darkwing Duck ever met Scrooge McDuck?

Greco-Roman egalitarianism

How do ground effect vehicles perform turns?

Flux received by a negative charge

Is possible to search in vim history?

Translation of Scottish 16th century church stained glass

How can "mimic phobia" be cured or prevented?



Changing label of xfs root file system



2019 Community Moderator ElectionPassing execution from initrd to real init and issues with missing devices under /dev/mapperissue in user Quota creationSplit home partition into 2 (xfs on LVM)Does fio corrupt file system (XFS on mdadm, RAID10)?Pass root file system by label to linux kernelextending a 40TB xfs formated FS over LVMMounting a 4tb lvm in Centos 7 keeps saying not enough space on deviceHow to See Bound Folders and Release ThemMerge mount pointsWorkaround for shrinking a XFS CentOS root partition










1















I'm running a centos 7 server.

I want to change the label of the root file system (xfs).

xfs_admin -L "newlabel" /dev/mapper/centos-root fails because it can't operate on a mounted fs.



Is this possible anyhow?

Is there a way to run something like that during boot before the root fs is mounted?










share|improve this question




























    1















    I'm running a centos 7 server.

    I want to change the label of the root file system (xfs).

    xfs_admin -L "newlabel" /dev/mapper/centos-root fails because it can't operate on a mounted fs.



    Is this possible anyhow?

    Is there a way to run something like that during boot before the root fs is mounted?










    share|improve this question


























      1












      1








      1


      1






      I'm running a centos 7 server.

      I want to change the label of the root file system (xfs).

      xfs_admin -L "newlabel" /dev/mapper/centos-root fails because it can't operate on a mounted fs.



      Is this possible anyhow?

      Is there a way to run something like that during boot before the root fs is mounted?










      share|improve this question
















      I'm running a centos 7 server.

      I want to change the label of the root file system (xfs).

      xfs_admin -L "newlabel" /dev/mapper/centos-root fails because it can't operate on a mounted fs.



      Is this possible anyhow?

      Is there a way to run something like that during boot before the root fs is mounted?







      linux centos boot xfs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 '15 at 15:07







      csny

















      asked Nov 19 '15 at 14:59









      csnycsny

      6812723




      6812723




















          2 Answers
          2






          active

          oldest

          votes


















          1














          From man xfs_admin




          Devices that are mounted cannot be modified. Administrators must unmount filesystems before xfs_admin or xfs_db(8) can convert parameters. A number of parameters of a mounted filesystem can be examined and modified using the xfs_growfs(8) command.







          share|improve this answer























          • I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

            – csny
            Nov 22 '15 at 10:51











          • Well, since the documentation says it can't be done, I would say you're searching in vain.

            – cristi
            Nov 22 '15 at 11:16


















          1














          The ability to update the label of a mounted XFS file system was
          recented added. August 2018 for upstream code and November 2018 for
          RHEL/CentOS 7 packages.



          Update the label like this (as root):



          xfs_io -c "label -s MYNEWLABEL" /MNTPOINT


          From the xfs_io man page:




          label [ -c | -s label ]

          On filesystems that support online label manipulation, get, set,
          or clear the filesystem label. With no options, print the
          current filesystem label. The -c option clears the filesystem
          label by setting it to the null string. The -s label option
          sets the filesystem label to label. If the label is longer than
          the filesystem will accept, xfs_io will print an error message.
          XFS filesystem labels can be at most 12 characters long.




          For upstream code this required Linux kernel >= 4.18 and xfsprogs >= 4.17.0.



          For RHEL / CentOS 7 this required packages kernel >= 3.10.0-957.el7 and xfsprogs >= 4.5.0-17.



          References:




          • linux commit f7664b31975bd893 "xfs: implement online get/set fs label"

          • xfsprogs commit cfa10b0f972005b3 "xfs_io: add label command"

          • Red Hat Bug 1322930 - [RFE] Allow xfs to modify labels on mounted filesystem

          • RHSA-2018:3083 - Security Advisory

          • Red Hat Bug 1584912 - [RFE] Allow xfs to modify labels on mounted filesystem (userspace component)

          • RHBA-2018:3274 - Bug Fix Advisory





          share|improve this answer








          New contributor




          Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.



















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f244120%2fchanging-label-of-xfs-root-file-system%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            From man xfs_admin




            Devices that are mounted cannot be modified. Administrators must unmount filesystems before xfs_admin or xfs_db(8) can convert parameters. A number of parameters of a mounted filesystem can be examined and modified using the xfs_growfs(8) command.







            share|improve this answer























            • I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

              – csny
              Nov 22 '15 at 10:51











            • Well, since the documentation says it can't be done, I would say you're searching in vain.

              – cristi
              Nov 22 '15 at 11:16















            1














            From man xfs_admin




            Devices that are mounted cannot be modified. Administrators must unmount filesystems before xfs_admin or xfs_db(8) can convert parameters. A number of parameters of a mounted filesystem can be examined and modified using the xfs_growfs(8) command.







            share|improve this answer























            • I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

              – csny
              Nov 22 '15 at 10:51











            • Well, since the documentation says it can't be done, I would say you're searching in vain.

              – cristi
              Nov 22 '15 at 11:16













            1












            1








            1







            From man xfs_admin




            Devices that are mounted cannot be modified. Administrators must unmount filesystems before xfs_admin or xfs_db(8) can convert parameters. A number of parameters of a mounted filesystem can be examined and modified using the xfs_growfs(8) command.







            share|improve this answer













            From man xfs_admin




            Devices that are mounted cannot be modified. Administrators must unmount filesystems before xfs_admin or xfs_db(8) can convert parameters. A number of parameters of a mounted filesystem can be examined and modified using the xfs_growfs(8) command.








            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 19 '15 at 17:11









            cristicristi

            448414




            448414












            • I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

              – csny
              Nov 22 '15 at 10:51











            • Well, since the documentation says it can't be done, I would say you're searching in vain.

              – cristi
              Nov 22 '15 at 11:16

















            • I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

              – csny
              Nov 22 '15 at 10:51











            • Well, since the documentation says it can't be done, I would say you're searching in vain.

              – cristi
              Nov 22 '15 at 11:16
















            I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

            – csny
            Nov 22 '15 at 10:51





            I know. That is exactly what I'm trying to find a solution to... This is the root file system so you can't unmount it. This is why I asked in my question if there is a way to run some command/script before the root file system is mounted during boot

            – csny
            Nov 22 '15 at 10:51













            Well, since the documentation says it can't be done, I would say you're searching in vain.

            – cristi
            Nov 22 '15 at 11:16





            Well, since the documentation says it can't be done, I would say you're searching in vain.

            – cristi
            Nov 22 '15 at 11:16













            1














            The ability to update the label of a mounted XFS file system was
            recented added. August 2018 for upstream code and November 2018 for
            RHEL/CentOS 7 packages.



            Update the label like this (as root):



            xfs_io -c "label -s MYNEWLABEL" /MNTPOINT


            From the xfs_io man page:




            label [ -c | -s label ]

            On filesystems that support online label manipulation, get, set,
            or clear the filesystem label. With no options, print the
            current filesystem label. The -c option clears the filesystem
            label by setting it to the null string. The -s label option
            sets the filesystem label to label. If the label is longer than
            the filesystem will accept, xfs_io will print an error message.
            XFS filesystem labels can be at most 12 characters long.




            For upstream code this required Linux kernel >= 4.18 and xfsprogs >= 4.17.0.



            For RHEL / CentOS 7 this required packages kernel >= 3.10.0-957.el7 and xfsprogs >= 4.5.0-17.



            References:




            • linux commit f7664b31975bd893 "xfs: implement online get/set fs label"

            • xfsprogs commit cfa10b0f972005b3 "xfs_io: add label command"

            • Red Hat Bug 1322930 - [RFE] Allow xfs to modify labels on mounted filesystem

            • RHSA-2018:3083 - Security Advisory

            • Red Hat Bug 1584912 - [RFE] Allow xfs to modify labels on mounted filesystem (userspace component)

            • RHBA-2018:3274 - Bug Fix Advisory





            share|improve this answer








            New contributor




            Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.
























              1














              The ability to update the label of a mounted XFS file system was
              recented added. August 2018 for upstream code and November 2018 for
              RHEL/CentOS 7 packages.



              Update the label like this (as root):



              xfs_io -c "label -s MYNEWLABEL" /MNTPOINT


              From the xfs_io man page:




              label [ -c | -s label ]

              On filesystems that support online label manipulation, get, set,
              or clear the filesystem label. With no options, print the
              current filesystem label. The -c option clears the filesystem
              label by setting it to the null string. The -s label option
              sets the filesystem label to label. If the label is longer than
              the filesystem will accept, xfs_io will print an error message.
              XFS filesystem labels can be at most 12 characters long.




              For upstream code this required Linux kernel >= 4.18 and xfsprogs >= 4.17.0.



              For RHEL / CentOS 7 this required packages kernel >= 3.10.0-957.el7 and xfsprogs >= 4.5.0-17.



              References:




              • linux commit f7664b31975bd893 "xfs: implement online get/set fs label"

              • xfsprogs commit cfa10b0f972005b3 "xfs_io: add label command"

              • Red Hat Bug 1322930 - [RFE] Allow xfs to modify labels on mounted filesystem

              • RHSA-2018:3083 - Security Advisory

              • Red Hat Bug 1584912 - [RFE] Allow xfs to modify labels on mounted filesystem (userspace component)

              • RHBA-2018:3274 - Bug Fix Advisory





              share|improve this answer








              New contributor




              Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.






















                1












                1








                1







                The ability to update the label of a mounted XFS file system was
                recented added. August 2018 for upstream code and November 2018 for
                RHEL/CentOS 7 packages.



                Update the label like this (as root):



                xfs_io -c "label -s MYNEWLABEL" /MNTPOINT


                From the xfs_io man page:




                label [ -c | -s label ]

                On filesystems that support online label manipulation, get, set,
                or clear the filesystem label. With no options, print the
                current filesystem label. The -c option clears the filesystem
                label by setting it to the null string. The -s label option
                sets the filesystem label to label. If the label is longer than
                the filesystem will accept, xfs_io will print an error message.
                XFS filesystem labels can be at most 12 characters long.




                For upstream code this required Linux kernel >= 4.18 and xfsprogs >= 4.17.0.



                For RHEL / CentOS 7 this required packages kernel >= 3.10.0-957.el7 and xfsprogs >= 4.5.0-17.



                References:




                • linux commit f7664b31975bd893 "xfs: implement online get/set fs label"

                • xfsprogs commit cfa10b0f972005b3 "xfs_io: add label command"

                • Red Hat Bug 1322930 - [RFE] Allow xfs to modify labels on mounted filesystem

                • RHSA-2018:3083 - Security Advisory

                • Red Hat Bug 1584912 - [RFE] Allow xfs to modify labels on mounted filesystem (userspace component)

                • RHBA-2018:3274 - Bug Fix Advisory





                share|improve this answer








                New contributor




                Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                The ability to update the label of a mounted XFS file system was
                recented added. August 2018 for upstream code and November 2018 for
                RHEL/CentOS 7 packages.



                Update the label like this (as root):



                xfs_io -c "label -s MYNEWLABEL" /MNTPOINT


                From the xfs_io man page:




                label [ -c | -s label ]

                On filesystems that support online label manipulation, get, set,
                or clear the filesystem label. With no options, print the
                current filesystem label. The -c option clears the filesystem
                label by setting it to the null string. The -s label option
                sets the filesystem label to label. If the label is longer than
                the filesystem will accept, xfs_io will print an error message.
                XFS filesystem labels can be at most 12 characters long.




                For upstream code this required Linux kernel >= 4.18 and xfsprogs >= 4.17.0.



                For RHEL / CentOS 7 this required packages kernel >= 3.10.0-957.el7 and xfsprogs >= 4.5.0-17.



                References:




                • linux commit f7664b31975bd893 "xfs: implement online get/set fs label"

                • xfsprogs commit cfa10b0f972005b3 "xfs_io: add label command"

                • Red Hat Bug 1322930 - [RFE] Allow xfs to modify labels on mounted filesystem

                • RHSA-2018:3083 - Security Advisory

                • Red Hat Bug 1584912 - [RFE] Allow xfs to modify labels on mounted filesystem (userspace component)

                • RHBA-2018:3274 - Bug Fix Advisory






                share|improve this answer








                New contributor




                Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered yesterday









                Mike FleetwoodMike Fleetwood

                1111




                1111




                New contributor




                Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Mike Fleetwood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f244120%2fchanging-label-of-xfs-root-file-system%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

                    getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                    Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

                    Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.