Bug 1161408 - I can't create my personal subvolume
I can't create my personal subvolume
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Installation
Current
x86-64 Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
Jiri Srain
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-21 10:03 UTC by Marco Fioretti
Modified: 2020-01-22 09:34 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Fioretti 2020-01-21 10:03:32 UTC
Hi, I have a question. 
Normally when I install an gnu/Linux distribution I create an subvolume @ that it contain all / except home and an subvolume @home with my home. But with opensuse installer I can't do it. I can only create subvolume into / not before /
Comment 1 Marco Fioretti 2020-01-21 10:38:10 UTC
Now I write this comment for my gentoo. My gentoo fstab is:
# /dev/nvme0n1p3
UUID=f4056f6f-d37a-4c45-a8b8-edccb191fce6       /          btrfs rw,noatime,ssd,compress=zstd:3,space_cache,autodefrag,subvol=@gentoo   0 0

# /dev/nvme0n1p1
UUID=6985-C971       /boot/efi      vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro        0 2

# /dev/nvme0n1p3
UUID=f4056f6f-d37a-4c45-a8b8-edccb191fce6       /home           btrfs rw,relatime,compress=zstd:3,ssd,space_cache,subvol=@gentoo-home   0 0


# /dev/sda1
UUID=3aa77507-5d2c-4643-8fc3-73466622c10f       none       swap       defaults,pri=-2   0 0


tmpfs           /var/tmp/portage                tmpfs   size=20G,uid=portage,gid=portage,mode=775,noatime       0 0

and the output of mount is:
/dev/nvme0n1p3 on / type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=275,subvol=/@gentoo)


if I mount my principal partition with mount -t btrfs -o subvol=/ /dev/nvme0n1p3 /mnt/snaps, I see: 
zar_marco@gentoobook:~ % ls /mnt/snaps                                                                                                                                                                                     21/01/20|11:36:58
@arch  @arch-home  @gentoo  @gentoo-home

I would use this method with opensuse too, is it possible?
Comment 2 Arvin Schnell 2020-01-21 17:44:52 UTC
Such a setup can indeed not be created with the installation tool YaST.
AFAIK the YaST storage product owner plans to improve the subvolume
handling, but whether this setup is among the use cases I do not know.

It is possible to modify the system after installation with command
line tools. Whether all things work properly then I cannot say.

If the system was installed with a home subvolume "@/home", the
modification should work as follows:

- mount the btrfs with option -o subvolid=5 at /mnt
- rename /mnt/@/home to /mnt/@home
- edit the mount entry for /home in /etc/fstab
- reboot
Comment 3 Ancor Gonzalez Sosa 2020-01-22 09:27:49 UTC
(In reply to Arvin Schnell from comment #2)
> Such a setup can indeed not be created with the installation tool YaST.
> AFAIK the YaST storage product owner plans to improve the subvolume
> handling, but whether this setup is among the use cases I do not know.

I have added to the document we are using as a guide, to make sure the use-case is, at least, taken into account.

> It is possible to modify the system after installation with command
> line tools. Whether all things work properly then I cannot say.
> 
> If the system was installed with a home subvolume "@/home", the
> modification should work as follows:
> 
> - mount the btrfs with option -o subvolid=5 at /mnt
> - rename /mnt/@/home to /mnt/@home
> - edit the mount entry for /home in /etc/fstab
> - reboot

Thanks Arvin for the explanation.

With those instructions I will consider this bug report as FIXED.
Comment 4 Marco Fioretti 2020-01-22 09:34:06 UTC
Thanks so much, with your answer I can do with my subvolume system