Somehow during installation I must have said not to create /home in a separate volume, because right now it shows up in my snapshots, which I’m not too happy with, since I wouldn’t want to revert the content of my home directory if the system is messed up…
Can I create the subvolume now, and get it out of the snapshots?
Creating what you should already have from the beginning is a good idea IMHO, but I assume you need help here.
But, when people, that try to help you, ask you for information, like gogalthorpe does above (he asked; show), it is friendlier and better to provide it, or give a very good reason why you don’t (which could include that you do not know how to to it and ask for help to get the information). Just ignoring such a request may result in helpers going to a more promising thread.
Please show us ouput, between CODE tags, the # in the editor of
cat /etc/fstab
Since this is a fresh install I’d re-install and double check at the partitioning phase of the installer. Have 50-60GB for btrfs on /, give the rest to swap and /home to your preferences.
This is not a fresh install, it’s been like this for a few months, and I’d rather not reinstall if possible… The thing is that yesterday I started looking into snapper and learned a bit on how it works, and saw that on this computer it seems to be backing up /home. I think it is included because if I look into the snapshot directories within /.snapshot I can also see the content of my home directory.
I didn’t initially want a separate partition for home because the space for linux (I’m dual booting) is already quite small (51GB in total) and I didn’t want to fragment it.
Above is your original post where you say that you did not make, for what reason, a separate /home volume. Now a volume can be a disk, a disk partition, a LVM logical Volume, a Linux RAID device, … We assumed you mean a partition because you talk about the installation where you might have switched off a separate /home (and in the installation it is normally on a partition).
Then you say that it “shows up in your snapshots”. People asked you why you think so. Please take care that you only gave your “conclusion”, but not where you conclusion is based on. We, the helpers, are a bit stubborn in that we do not believe conclusions, we only believe computer facts. So please tell us, better SHOW us why you think so. Then we can come to our own conclusions, which may help you to understand what is going on.
Then you ask “Can I create the subvolume now, and get it out of the snapshots?”. Now that is very confusing, because when there would be (or will be as you ask for) a subvolume, then in earnest /home will be subject to snapshots taken. So what you ask here is 180⁰ contrary to what you want.
You probably want to have /home on a separte partition (as the default installation will do).
So please:
show us why you think /home is snapshotted;
to increase our knowledge so we can help you in moving /home to a separate partition by showing
fdisk -l
and
ls -l /dev/disk/by-uuid
.
BTW, your fstab shows that you have no separate partition for /home, but it also shows no subvolume for /home, thus it is very unlikely it will be snapshotted.
if it wasn’t snapshotted I would expect /.snapshots/160/snapshot/home to be empty.
For instance
ls /.snapshots/160/snapshot/opt/
returns nothing, even though /opt is not empty, so I guess /opt is not in the snapshot.
Now, if what I wrote before is confusing it is probably because I used the term subvolume wrong, so please ignore it. What I want to achieve is that the content of /home is not in snapshots, so that I can restore a snapshot without overwriting my home. How would I go about that?
# fdisk -l
Disk /dev/nvme0n1: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 863085FE-EB46-49D5-9133-813A33A6C855
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1023999 1021952 499M EFI System
/dev/nvme0n1p2 1024000 1286143 262144 128M Microsoft reserved
/dev/nvme0n1p3 1286144 362309631 361023488 172.2G Microsoft basic data
/dev/nvme0n1p4 483522560 488396799 4874240 2.3G Windows recovery environment
/dev/nvme0n1p5 362309632 467193855 104884224 50G Linux filesystem
/dev/nvme0n1p6 467193856 483522559 16328704 7.8G Linux swap
Partition table entries are not in disk order.
I don’t think any guru would help here. You have 50GB for the btrfs rootfs incl. everything, such as /home. If the 50GB is what you want to use for your openSUSE install, use 20GB for / on ext4, swap like prefered, the rest for /home on ext4.
The installer should create a separate subvolume by default though if you untick “/home on a separate partition” during installation, unless you override that.
You can list all subvolumes of the root partition via “btrfs subvolume list /” (or see them in YaST).
thanks a lot, I think this is what I need. I’ll give it a try at creating the subvolume and write again if I have problems.
Now that you mention it I think that there was indeed a /home subvolume at the beginning. I believe I got rid of it when I thought I would mount /home from a NAS, which didn’t work out too well, so I’ve given up on that. I also have a little of a boot time problem, but I’ll create a separate thread about that.