Results 1 to 7 of 7

Thread: How to access /home of other btrfs Partition?

  1. #1

    Default How to access /home of other btrfs Partition?

    Hello

    I have a simple installation on the same disk.

    /dev/sda1 -> Swap
    /dev/sda2 -> Leap 42.2 btrfs including /home
    /dev/sda3 -> Leap 42.3 btrfs including /home

    fstab of 42.2
    Code:
    UUID=8d04ea06-fa8b-4cc3-b4c7-241637844d49 swap swap defaults 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 / btrfs defaults,noatime,ssd 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /home btrfs subvol=@/home 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /opt btrfs subvol=@/opt 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /srv btrfs subvol=@/srv 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /tmp btrfs subvol=@/tmp 0 0
    ...
    I would like to mount /dev/sda2 from 42.3 to copy some files.
    I can mount it, but /home is empty.
    I guess it has to do with subvolumes (I am a noob).
    What can I do?

    Can I add this to fstab of 42.3?
    Code:
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /mnt/sda2/home btrfs subvol=@/home 0 0
    Thank you for any advice.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,972

    Default Re: How to access /home of other btrfs Partition?

    As it says at the top:

    Please don't ask product questions here

    and

    This forum is NOT for asking questions, ..........
    So this will be moved to Install/Boot/Login and is CLOSED for the moment.
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,972

    Default Re: How to access /home of other btrfs Partition?

    Quote Originally Posted by theo222 View Post
    Hello

    I have a simple installation on the same disk.

    /dev/sda1 -> Swap
    /dev/sda2 -> Leap 42.2 btrfs including /home
    /dev/sda3 -> Leap 42.3 btrfs including /home

    fstab of 42.2
    Code:
    UUID=8d04ea06-fa8b-4cc3-b4c7-241637844d49 swap swap defaults 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 / btrfs defaults,noatime,ssd 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /home btrfs subvol=@/home 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /opt btrfs subvol=@/opt 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /srv btrfs subvol=@/srv 0 0
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /tmp btrfs subvol=@/tmp 0 0
    ...
    I would like to mount /dev/sda2 from 42.3 to copy some files.
    I can mount it, but /home is empty.
    I guess it has to do with subvolumes (I am a noob).
    What can I do?

    Can I add this to fstab of 42.3?
    Code:
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /mnt/sda2/home btrfs subvol=@/home 0 0
    Thank you for any advice.
    Moved from unreviewed Howto and open again.
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,972

    Default Re: How to access /home of other btrfs Partition?

    Better show what you try to explain. Thus when you g=have mounted it, show it so we can see that that is true and how it is mounted (with thye mount statement.
    And when you say the /home is empty then show it with something like
    Code:
    ls -l /mnt/sda2/home
    And it is better to include the command line when you post output. Not the output alone, but one line more at the begin and the end. Then we have the prompt, the command, the output and the next prompt. E.g. when you show your fstab, include the prompts and the cat /etc/fstab.

    I also doubt that it is a goof idea to have /home inside the / Btrfs file system. When it takes snapshots for everything you change in /home ...........
    Henk van Velden

  5. #5

    Default Re: How to access /home of other btrfs Partition?

    I'm sorry for posting in the wrong forum. Don't know why I did that.

    OK, the most simple example is this:

    Dolphin shows me the "other" partition. I have not configured anything for this.
    If I click on it, it asks me for root password to mount it.



    After that, it shows me the partition, but only some folders have a content. As you can see, home and other folders are empty.
    It's the same whein I use "ls" or the Dolphi in Super User Mode.



    Thank you!

  6. #6
    Join Date
    Sep 2012
    Posts
    5,393

    Default Re: How to access /home of other btrfs Partition?

    Quote Originally Posted by theo222 View Post
    I guess it has to do with subvolumes.
    Yes.
    What can I do?
    You already answered this yourself - your home content is under /@/home when you mount root of btrfs.

    Can I add this to fstab of 42.3?
    Code:
    UUID=9b383227-2e15-49d0-97a9-685f56be9130 /mnt/sda2/home btrfs subvol=@/home 0 0
    Yes.

  7. #7

    Default Re: How to access /home of other btrfs Partition?

    Quote Originally Posted by arvidjaar View Post
    You already answered this yourself - your home content is under /@/home when you mount root of btrfs.
    Yes it works.

    Just wanted to ask, before ending up with a unbootable System

    Thank you!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •