• File system for hosting virual machines?

    From Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=@martin.schoon@gmail.com to alt.os.linux.debian on Sun Dec 3 12:06:06 2023
    From Newsgroup: alt.os.linux.debian

    Hello,

    Any file system experts here?

    The reason for asking is I am in the process of moving
    my digital home office from 13 year old HW to brand new
    HW and want to do it right from the outset.

    On the old machine / and /home are btrfs partitions. This
    has worked flawlessly as far as I know.

    Virtual disks live on a separate ext4 partition. I don't
    remember why I made this 'design choice'.

    The old machine has HDDs and the new a 1 TB SSD (for now).

    Is there any reason for not having virtual disks in a
    folder under /home using btrfs on the new machine?

    TIA

    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Killadebug@killadebug@mouse-potato.com to alt.os.linux.debian on Sun Dec 3 14:52:22 2023
    From Newsgroup: alt.os.linux.debian

    On 3 Dec 2023 12:06:06 GMT, Martin Sch||||n wrote:

    Hello,

    Any file system experts here?

    The reason for asking is I am in the process of moving my digital home
    office from 13 year old HW to brand new HW and want to do it right from
    the outset.

    On the old machine / and /home are btrfs partitions. This has worked flawlessly as far as I know.

    Virtual disks live on a separate ext4 partition. I don't remember why I
    made this 'design choice'.

    The old machine has HDDs and the new a 1 TB SSD (for now).

    Is there any reason for not having virtual disks in a folder under /home using btrfs on the new machine?

    TIA

    /Martin


    Martin,
    It really is a personal preference, I have a 1 TB NVME SSD and have the
    exact setup you have, @ and @home on a btrfs partition and all my VM,
    Torrent Files, Movies etc on a ext4 partition. I use virtualbox and I use
    it's snapshot feature so I do not need btrfs to do snapshots of my vm's,
    plus ext4 handles changes made in the vm from the guest system in a more efficient manner and btrfs.

    Like I said it is a personal preference.
    --
    Pull my finger
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From William Unruh@unruh@invalid.ca to alt.os.linux.debian on Sun Dec 3 15:15:47 2023
    From Newsgroup: alt.os.linux.debian

    On 2023-12-03, Martin Sch||||n <martin.schoon@gmail.com> wrote:
    Hello,

    Any file system experts here?

    The reason for asking is I am in the process of moving
    my digital home office from 13 year old HW to brand new
    HW and want to do it right from the outset.

    On the old machine / and /home are btrfs partitions. This
    has worked flawlessly as far as I know.

    Virtual disks live on a separate ext4 partition. I don't
    remember why I made this 'design choice'.

    What do you mean by "virtual disks"
    Where is your backup? (It does not need to be on the SSD since it is,
    one hopes, rarely used, and you want it at the least on other disk from
    you primary so that if you primary dies,your backup does not die with
    it-- it could of course by an a different computer, or on a pluging hard
    drive, or even on a bunch of usb sticks).
    I have no comment on btrfs-- I just use ext4 on everything.



    The old machine has HDDs and the new a 1 TB SSD (for now).

    Is there any reason for not having virtual disks in a
    folder under /home using btrfs on the new machine?

    TIA

    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=@martin.schoon@gmail.com to alt.os.linux.debian on Sun Dec 3 16:55:57 2023
    From Newsgroup: alt.os.linux.debian

    Den 2023-12-03 skrev William Unruh <unruh@invalid.ca>:
    On 2023-12-03, Martin Sch||||n <martin.schoon@gmail.com> wrote:
    Hello,

    Any file system experts here?

    The reason for asking is I am in the process of moving
    my digital home office from 13 year old HW to brand new
    HW and want to do it right from the outset.

    On the old machine / and /home are btrfs partitions. This
    has worked flawlessly as far as I know.

    Virtual disks live on a separate ext4 partition. I don't
    remember why I made this 'design choice'.

    What do you mean by "virtual disks"
    Where is your backup? (It does not need to be on the SSD since it is,
    one hopes, rarely used, and you want it at the least on other disk from
    you primary so that if you primary dies,your backup does not die with
    it-- it could of course by an a different computer, or on a pluging hard drive, or even on a bunch of usb sticks).

    "Disk image file" is maybe better than "virtual disk"

    I currently use three USB HDDs for backup. I take backup regularly and
    cycle through those disk. Hence, I can go back three steps if need be.
    /home and the partition where the virtual machine disk images live are
    backed up. I can always re-install the OS if / goes belly up.

    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to alt.os.linux.debian on Sun Dec 3 17:21:42 2023
    From Newsgroup: alt.os.linux.debian

    Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> writes:
    Virtual disks live on a separate ext4 partition. I don't
    remember why I made this 'design choice'.
    ...
    Is there any reason for not having virtual disks in a
    folder under /home using btrfs on the new machine?

    If by "virtual disk" you mean a disk image that is mounted as a loop
    device: I have read that copy-on-write file systems like btrfs perform significantly slower than in-place-overwrite file systems for these
    kinds of files, at least if the image is not just used as a read-only
    image.

    OTOH, with ext4, you may have to perform an fsync() after every write
    to this image file, or you may find your image to be corrupted after
    power loss or somesuch, and the ext4 maintainer will tell you that you performed too few fsync()s. And whether ext4 with all these fsync()s
    is still faster than btrfs is not clear.

    - anton
    --
    M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From William Unruh@unruh@invalid.ca to alt.os.linux.debian on Sun Dec 3 18:04:39 2023
    From Newsgroup: alt.os.linux.debian

    On 2023-12-03, Martin Sch||||n <martin.schoon@gmail.com> wrote:
    "Disk image file" is maybe better than "virtual disk"

    I currently use three USB HDDs for backup. I take backup regularly and
    cycle through those disk. Hence, I can go back three steps if need be.
    /home and the partition where the virtual machine disk images live are
    backed up. I can always re-install the OS if / goes belly up.

    re backups, you should look at rsnapshot which uses rsync to make a
    series of backups, where each backup is a full backup but hard links are
    used so that the size used is one full backup plus backups of changed
    files, which is usually far far less than two backups.

    Note that while / is installed from the distro, there are also changes
    made to it which would be worth saving. Eg many of the files in /etc
    (passwd, shadow, hosts, fstab,....) are special to your machine only.
    Also some /var/spool files (eg /var/spool/mail, /var/spool/at,
    /var/spool/cron, /var/spool/postfix,...) You could of course put copies
    into /home, copy them over every hour or so. Unfortunately you cannot
    put a link say from /var/spool to /home/var/spool, since it may well be
    needed by the OS as it boots before /home is mounted.

    Also /usr/local will usualy contain stuff that is peculiar to your
    machine. But you could just have a directory /home/usrlocal and put a
    link from /usr/local to /home/usrlocal.





    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Borax Man@rotflol2@hotmail.com to alt.os.linux.debian on Mon Dec 4 12:00:43 2023
    From Newsgroup: alt.os.linux.debian

    On 2023-12-03, Killadebug <killadebug@mouse-potato.com> wrote:
    On 3 Dec 2023 12:06:06 GMT, Martin Sch||||n wrote:

    Hello,

    Any file system experts here?

    The reason for asking is I am in the process of moving my digital home
    office from 13 year old HW to brand new HW and want to do it right from
    the outset.

    On the old machine / and /home are btrfs partitions. This has worked
    flawlessly as far as I know.

    Virtual disks live on a separate ext4 partition. I don't remember why I
    made this 'design choice'.

    The old machine has HDDs and the new a 1 TB SSD (for now).

    Is there any reason for not having virtual disks in a folder under /home
    using btrfs on the new machine?

    TIA

    /Martin


    Martin,
    It really is a personal preference, I have a 1 TB NVME SSD and have the exact setup you have, @ and @home on a btrfs partition and all my VM, Torrent Files, Movies etc on a ext4 partition. I use virtualbox and I use it's snapshot feature so I do not need btrfs to do snapshots of my vm's, plus ext4 handles changes made in the vm from the guest system in a more efficient manner and btrfs.

    Like I said it is a personal preference.



    BTRFS will fragment quite heavily under that kind of workload. You
    can turn COW off, either on the whole filesystem by mounting with the 'nodatacow' option, or adding the "C" attribute via chattr on the
    file. I don't recommend this as data guarantees go out the window.

    I find XFS and EXT4 perform will for virtual images, with EXT4
    probably having a slight edge for single disk setups.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=@martin.schoon@gmail.com to alt.os.linux.debian on Mon Dec 4 19:48:00 2023
    From Newsgroup: alt.os.linux.debian

    Den 2023-12-04 skrev Borax Man <rotflol2@hotmail.com>:
    On 2023-12-03, Killadebug <killadebug@mouse-potato.com> wrote:
    On 3 Dec 2023 12:06:06 GMT, Martin Sch||||n wrote:

    Hello,

    Any file system experts here?

    The reason for asking is I am in the process of moving my digital home
    office from 13 year old HW to brand new HW and want to do it right from
    the outset.

    <snip>

    Is there any reason for not having virtual disks in a folder under /home >>> using btrfs on the new machine?

    TIA

    /Martin


    Martin,
    It really is a personal preference, I have a 1 TB NVME SSD and have the
    exact setup you have, @ and @home on a btrfs partition and all my VM,
    Torrent Files, Movies etc on a ext4 partition. I use virtualbox and I use

    <snip>

    BTRFS will fragment quite heavily under that kind of workload. You
    can turn COW off, either on the whole filesystem by mounting with the 'nodatacow' option, or adding the "C" attribute via chattr on the
    file. I don't recommend this as data guarantees go out the window.

    I find XFS and EXT4 perform will for virtual images, with EXT4
    probably having a slight edge for single disk setups.

    Maybe I should have highlighted that the use cases for my virtual
    machines are rather light. No gaming, no video editing/rendering,
    no number crunching. I have never felt my virtual machines are
    laggy on the old, rather humble HW.

    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=@martin.schoon@gmail.com to alt.os.linux.debian on Mon Dec 4 19:55:02 2023
    From Newsgroup: alt.os.linux.debian

    Den 2023-12-03 skrev Anton Ertl <anton@mips.complang.tuwien.ac.at>:
    Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> writes:
    Virtual disks live on a separate ext4 partition. I don't
    remember why I made this 'design choice'.
    ...
    Is there any reason for not having virtual disks in a
    folder under /home using btrfs on the new machine?

    If by "virtual disk" you mean a disk image that is mounted as a loop
    device: I have read that copy-on-write file systems like btrfs perform significantly slower than in-place-overwrite file systems for these
    kinds of files, at least if the image is not just used as a read-only
    image.

    OTOH, with ext4, you may have to perform an fsync() after every write
    to this image file, or you may find your image to be corrupted after
    power loss or somesuch, and the ext4 maintainer will tell you that you performed too few fsync()s. And whether ext4 with all these fsync()s
    is still faster than btrfs is not clear.

    - anton

    Speed is not the only parameter and, as mentioned in another post, my
    use of virtual machines is not demanding. I have been OK with the
    performance on my old HW. I am more concerned with things going
    pear-shaped and ease of maintenance. One issue I have already
    experienced with my old set-up is its lack of flexibility. Where do
    I go when that partition starts to fill up?

    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to alt.os.linux.debian on Tue Dec 5 21:34:31 2023
    From Newsgroup: alt.os.linux.debian

    Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> writes:
    Speed is not the only parameter and, as mentioned in another post, my
    use of virtual machines is not demanding. I have been OK with the
    performance on my old HW. I am more concerned with things going
    pear-shaped and ease of maintenance. One issue I have already
    experienced with my old set-up is its lack of flexibility. Where do
    I go when that partition starts to fill up?

    I guess that, given that your setup was fast enough on HDDs, you can
    use the images on btrfs on an SSD.

    - anton
    --
    M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?=@martin.schoon@gmail.com to alt.os.linux.debian on Wed Dec 6 07:58:10 2023
    From Newsgroup: alt.os.linux.debian

    Den 2023-12-05 skrev Anton Ertl <anton@mips.complang.tuwien.ac.at>:
    Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= <martin.schoon@gmail.com> writes:
    Speed is not the only parameter and, as mentioned in another post, my
    use of virtual machines is not demanding. I have been OK with the >>performance on my old HW. I am more concerned with things going
    pear-shaped and ease of maintenance. One issue I have already
    experienced with my old set-up is its lack of flexibility. Where do
    I go when that partition starts to fill up?

    I guess that, given that your setup was fast enough on HDDs, you can
    use the images on btrfs on an SSD.

    - anton

    As of yesterday, this is my conclusion too. I installed with BTRFS only yesterday night. I will add some tweaks to exclude some folders from snapshoting. I am told this can be achieved by creating them as BTRFS subvolumes.

    /Martin
    --- Synchronet 3.21d-Linux NewsLink 1.2