moving only some directories / filesystems to ZFS datasets

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












At present, I'm playing around with a very small fileserver based around an Intel NUC, with the boot environment on a USB flash drive ("usbflash") and then using a large spinning disk ("HDD") for bulk storage. The HDD is entirely managed by ZFS, where the usbflash is a standard *buntu install with ext4 and a single large partition.



Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition? The write speed of the USB device is quite low and I'm also trying to minimize the writes to extend the usbflash lifespan. But at some level I'm also just messing around and trying to learn what does and doesn't work with ZFS ;-)







share|improve this question




















  • /boot would be the main directory to not put on strange filesystems, others should be less of an issue, keeping in mind that if /var fails to mount you could be in trouble more so than with the others. You can always try mounting the directories, non need to remove data from the USB right away, if it doesn't boot then you could edit the fstab on the USB from another computer.
    – fooot
    Nov 20 '17 at 21:20














up vote
0
down vote

favorite












At present, I'm playing around with a very small fileserver based around an Intel NUC, with the boot environment on a USB flash drive ("usbflash") and then using a large spinning disk ("HDD") for bulk storage. The HDD is entirely managed by ZFS, where the usbflash is a standard *buntu install with ext4 and a single large partition.



Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition? The write speed of the USB device is quite low and I'm also trying to minimize the writes to extend the usbflash lifespan. But at some level I'm also just messing around and trying to learn what does and doesn't work with ZFS ;-)







share|improve this question




















  • /boot would be the main directory to not put on strange filesystems, others should be less of an issue, keeping in mind that if /var fails to mount you could be in trouble more so than with the others. You can always try mounting the directories, non need to remove data from the USB right away, if it doesn't boot then you could edit the fstab on the USB from another computer.
    – fooot
    Nov 20 '17 at 21:20












up vote
0
down vote

favorite









up vote
0
down vote

favorite











At present, I'm playing around with a very small fileserver based around an Intel NUC, with the boot environment on a USB flash drive ("usbflash") and then using a large spinning disk ("HDD") for bulk storage. The HDD is entirely managed by ZFS, where the usbflash is a standard *buntu install with ext4 and a single large partition.



Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition? The write speed of the USB device is quite low and I'm also trying to minimize the writes to extend the usbflash lifespan. But at some level I'm also just messing around and trying to learn what does and doesn't work with ZFS ;-)







share|improve this question












At present, I'm playing around with a very small fileserver based around an Intel NUC, with the boot environment on a USB flash drive ("usbflash") and then using a large spinning disk ("HDD") for bulk storage. The HDD is entirely managed by ZFS, where the usbflash is a standard *buntu install with ext4 and a single large partition.



Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition? The write speed of the USB device is quite low and I'm also trying to minimize the writes to extend the usbflash lifespan. But at some level I'm also just messing around and trying to learn what does and doesn't work with ZFS ;-)









share|improve this question











share|improve this question




share|improve this question










asked Nov 18 '17 at 21:43









ljwobker

17828




17828











  • /boot would be the main directory to not put on strange filesystems, others should be less of an issue, keeping in mind that if /var fails to mount you could be in trouble more so than with the others. You can always try mounting the directories, non need to remove data from the USB right away, if it doesn't boot then you could edit the fstab on the USB from another computer.
    – fooot
    Nov 20 '17 at 21:20
















  • /boot would be the main directory to not put on strange filesystems, others should be less of an issue, keeping in mind that if /var fails to mount you could be in trouble more so than with the others. You can always try mounting the directories, non need to remove data from the USB right away, if it doesn't boot then you could edit the fstab on the USB from another computer.
    – fooot
    Nov 20 '17 at 21:20















/boot would be the main directory to not put on strange filesystems, others should be less of an issue, keeping in mind that if /var fails to mount you could be in trouble more so than with the others. You can always try mounting the directories, non need to remove data from the USB right away, if it doesn't boot then you could edit the fstab on the USB from another computer.
– fooot
Nov 20 '17 at 21:20




/boot would be the main directory to not put on strange filesystems, others should be less of an issue, keeping in mind that if /var fails to mount you could be in trouble more so than with the others. You can always try mounting the directories, non need to remove data from the USB right away, if it doesn't boot then you could edit the fstab on the USB from another computer.
– fooot
Nov 20 '17 at 21:20










1 Answer
1






active

oldest

votes

















up vote
0
down vote














Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition?




Yes, but you need to be careful about what you move. Specifically, unless the ZFS modules are part of the boot RAMdisk, you probably want to leave /var and /tmp where they are.



First, create a pool (the zpool create command). Then, create file-systems (the zfs create command) within the pool, setting them to mount to a temporary location (the -o mountpoint=XXX option).



I would suggest that you move the data in single-user mode.



After the files have been moved, unmounts the source (USB) file-systems and the ZFS file-systems, and change the mount points of the ZFS file-systems (the zfs set command with the mountpoint=XXX option).






share|improve this answer




















    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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f405492%2fmoving-only-some-directories-filesystems-to-zfs-datasets%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote














    Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition?




    Yes, but you need to be careful about what you move. Specifically, unless the ZFS modules are part of the boot RAMdisk, you probably want to leave /var and /tmp where they are.



    First, create a pool (the zpool create command). Then, create file-systems (the zfs create command) within the pool, setting them to mount to a temporary location (the -o mountpoint=XXX option).



    I would suggest that you move the data in single-user mode.



    After the files have been moved, unmounts the source (USB) file-systems and the ZFS file-systems, and change the mount points of the ZFS file-systems (the zfs set command with the mountpoint=XXX option).






    share|improve this answer
























      up vote
      0
      down vote














      Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition?




      Yes, but you need to be careful about what you move. Specifically, unless the ZFS modules are part of the boot RAMdisk, you probably want to leave /var and /tmp where they are.



      First, create a pool (the zpool create command). Then, create file-systems (the zfs create command) within the pool, setting them to mount to a temporary location (the -o mountpoint=XXX option).



      I would suggest that you move the data in single-user mode.



      After the files have been moved, unmounts the source (USB) file-systems and the ZFS file-systems, and change the mount points of the ZFS file-systems (the zfs set command with the mountpoint=XXX option).






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote










        Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition?




        Yes, but you need to be careful about what you move. Specifically, unless the ZFS modules are part of the boot RAMdisk, you probably want to leave /var and /tmp where they are.



        First, create a pool (the zpool create command). Then, create file-systems (the zfs create command) within the pool, setting them to mount to a temporary location (the -o mountpoint=XXX option).



        I would suggest that you move the data in single-user mode.



        After the files have been moved, unmounts the source (USB) file-systems and the ZFS file-systems, and change the mount points of the ZFS file-systems (the zfs set command with the mountpoint=XXX option).






        share|improve this answer













        Is it possible/reasonable/smart to move /home, /var, and /tmp over to the ZFS partition?




        Yes, but you need to be careful about what you move. Specifically, unless the ZFS modules are part of the boot RAMdisk, you probably want to leave /var and /tmp where they are.



        First, create a pool (the zpool create command). Then, create file-systems (the zfs create command) within the pool, setting them to mount to a temporary location (the -o mountpoint=XXX option).



        I would suggest that you move the data in single-user mode.



        After the files have been moved, unmounts the source (USB) file-systems and the ZFS file-systems, and change the mount points of the ZFS file-systems (the zfs set command with the mountpoint=XXX option).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 16 '17 at 18:52









        Peter

        1066




        1066



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405492%2fmoving-only-some-directories-filesystems-to-zfs-datasets%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay