Sanitizing / Simplifying partition layout

So I foolishly accepted the defaults during install and only now have I realised the default partition layout is completely insane. I am an old school linux user of over 10 years and I cannot honestly see the point in the partition layout, all I can see it doing is creating a load of work and a load of problems.

Is there anyway to remove the 19!!! partitions and simply it into 2 physical partitions?.. without a reinstall?

EDIT: It even has partitions for stuff I don’t have installed like Postgres, mailman etc.

Yes it can be done. I would would probably take them back into the root one at a time. If you post here the partition structure as it’s stored in fstab, people will advise you. Perhaps run this command to visualise it:

cat /etc/fstab

and paste that here.

FYI what happened to you is certainly not the default structure. The default is a root partition and a home partition.

So here is what it ended up giving me…

UUID=5060eb8c-2eeb-4929-82f4-25d426858d5b swap                 swap       defaults              0 0UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /                    btrfs      defaults              0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /boot/grub2/i386-pc  btrfs      subvol=@/boot/grub2/i386-pc 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /boot/grub2/x86_64-efi btrfs      subvol=@/boot/grub2/x86_64-efi 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /home                btrfs      subvol=@/home         0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /opt                 btrfs      subvol=@/opt          0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /srv                 btrfs      subvol=@/srv          0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /tmp                 btrfs      subvol=@/tmp          0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /usr/local           btrfs      subvol=@/usr/local    0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/crash           btrfs      subvol=@/var/crash    0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/lib/libvirt/images btrfs      subvol=@/var/lib/libvirt/images 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/lib/mailman     btrfs      subvol=@/var/lib/mailman 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/lib/mariadb     btrfs      subvol=@/var/lib/mariadb 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/lib/mysql       btrfs      subvol=@/var/lib/mysql 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/lib/named       btrfs      subvol=@/var/lib/named 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/lib/pgsql       btrfs      subvol=@/var/lib/pgsql 0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/log             btrfs      subvol=@/var/log      0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/opt             btrfs      subvol=@/var/opt      0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/spool           btrfs      subvol=@/var/spool    0 0
UUID=df7bfe0d-419a-492c-a8fb-8df2c653668f /var/tmp             btrfs      subvol=@/var/tmp      0 0

Total insanity. 19 Logical partitions all crammed into one physical.

Thinking out loud…

If I create directories like:


Go to “init 1” and do:
cp -a /srv /new/srv
umount /srv
mv /new/srv /

Is that likely to cause me any issues? Although I can see one straight away :frowning:

df -h
/dev/sda2 8.0G 7.0G 619M 92% /

As you forgot to include the prompt, the command and the new prompt in your copy/paste. I have no idea what you did to get that output (and I doubt very strong that it is your disk partitioning).

Could you pleasde post what you get with

fdisk -l


Welcome to the wonderful world of btrfs :slight_smile:

Old school setup like 2 partitions you were looking for needs to be ext* file system and it can be changed/selected during the partitioning part at the time of the installation.

Those subvolumes are added to exclude from snapper and snapshots, if you remove, they will then be included in snapshots.

Leave and configure snapper (/etc/snapper/configs/root) and then clean up the snapper usage with the cronjobs in /etc/cron.daily and cron.weekly.

If you / is only 8GB, then suggest you clean up with snapper and then disable it.

Not quite correct… welcome to snapper, rollbacks (which IMHO are awesome if something breaks) and some thought and configuration required…

It was the contents of /etc/fstab

The physical partitions are fine.

YOU ARE ROOT! root@linux-s234:/# fdisk -l

Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 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: dos
Disk identifier: 0x0002bb4c

Device     Boot   Start      End  Sectors Size Id Type
/dev/sda1          2048  4208639  4206592   2G 82 Linux swap / Solaris
/dev/sda2  *    4208640 20971519 16762880   8G 83 Linux

It is the logical volume shenanigans that disturb me.

However, I think … while I can probably reduce these logical partitions down to sanity, I will still need to get rid of the BTRFS stuff and return to Ext4, I don’t like this meta data duplication stuff, sounds like RAID parity on a single partition to me. If I want RAID I will use RAID. As I’m only 2 days into this project (building out a dev VM appliance for a team) I might be best starting from scratch and be much more prescriptive during the install process.

Thanks guys.

Thankfully snapper didn’t work out of the box for me. At least it wasn’t forced upon in a working state :slight_smile: I just get “No ‘root’ config”. I hate system rollback/restore things. If I want to do a system rollback/restore I’ll do it myself :slight_smile:

Snapper is not really much like RAID it does not mirror but allows roll back to points in the past. Since the default root for BTRFS is now 40 gig I doubt that snapper is activated at 8 gigs. BTRFS is based on Btrive so the sub volumes are just extra branches and not really partitioned or any thing else. All storage comes from the partition so it is not like having a bunch of partitions. Just branches on the main tree.

I hope you are with me when my conclusion is that you have only two partitions on that disk.

IMHO you, as “an old school linux user of over 10 years” should know the difference between partitions and file systems and also have some idea about the several types of entries that might go into /etc/fstab. :wink:

My advice: follow the above posts and try to read more about btrfs and about snapper (and there is no connection between snaper and RAID)… What you see is in fact snapper at work. When you do not want snapper, then switch it off. No need to abandon btrfs. But of course you also may change to ext4.

I choose a 10Gb hard disk (on VirutalBox) as I was hoping to install a fairly minimal desktop environment and then install the IDEs and tools I needed. The installer had other ideas. I will have to take a better look this time round, but I’m pretty sure it just asked me for a basic profile and it choose the packages it wanted to install. In fact I did restart the install because I selected to add the online repositories and that brought in even more stuff… not to mention half of it failed due to the Suse download server going offline causing the install to more or less fail.

My background at home is Gentoo, reluctantly moving from Linux from Scratch 100% custom from source just because it was too much to keep maintained. In work it is usually CentOS / RHEL and Ubuntu desktops. However the project I am working on has mandated “Azure” for cloud hosting and I’m trying to keep the costs down so Suse is the best option. So I want the development environments to be as close to the production environment… hence OpenSuse VMs.

You should look at to build up your VM’s as required, at least you can start with a JeOS image and add your packages, configuration etc, test there as well, modify, configure all sorts of stuff…

So what Desktop did you chose and yes an update is a lot of stuff. It tends to bring in things that are recommended also not just needed. You can turn that feature off in Yast -Software Management. 10 Gig is pretty skinny unless you are careful in what you install. There is a minimal GUI option which is pretty light. Either KDE or Gnome is most likely to fat for those limited resources.

So Snapper is a snapshot tool I get that. I figured it wasn’t turned on anyway as it doesn’t seem to work. Snapshots will be easier to do with the virtual machine mechanism won’t they?

The BTRFS… doesn’t it do meta data replication and such like?

I have never liked logical volume management. I understand it can make some tasks ‘easier’ but it also makes a lot of them harder… especially recovery from a random boot disc.

However, I did just mount /dev/sda2 directly and you are right they are not even logical partitions or logical volumes, it looks like / is intact without all those “sub volumes”.

Yes I am resisting to change, but I prefer to be convinced I need something before it is push upon me by distro installers. You would think I would learn as this happens every time I install a new distro that does things differently. I am still cursing the removal of sysVinit in favour of systemd. I hate systemd… maybe someday I will learn to love it, but that hasn’t happened yet. The more “auto-magically auto-config” stuff people put into Linux the more it becomes like Windows and the less stable it will become.

BTRFS has a lot of bells ad whistles.Not all currently work :’(. One is a RAID like mirror set up another is a LVM like space extending. The basic file system seems very stable. But does not offer any significant speed advantage over EXT4.

It is not exactly logical volumes in the classical sense it is just branches of a B-tree.

Snapper does a meta data trick and basically simply saves grouped blocks that have changed. This of course does take up space and can be a lot depending on amount of change between snap shots. But snapper is an add on to BTRFS not in itself part of it. It just takes advantage of the database nature of BTRFS.


If using a vm then you can use the snapshot-roll back feature of the virtualization client like VirtualBox so you can still get away with btrfs and snapper ;). Well btrfs and systemd is the future (at least that’s where Linux is headed). That’s what openSUSE is doing becoming the future because if you don’t go with the changes you will find your self on the other side of the fence in history and will become obsolete :slight_smile:

I’m new to OpenSUSE. I’ve mostly worked with CentOS and Fedora in the past. I too was caught off guard by how many volumes were created by a vanilla install when I ran ‘df -h’. I’m glad those are subvolumes and not separate partitions, otherwise, that would be a bit crazy.

Anyway, I’m wondering if I can get rid of subvolumes like:


Which are all empty, and I don’t have the corresponding software packages installed. I imagine I would use a command like ‘btrfs subvolume delete <subvolume-name>’, and then perhaps delete the corresponding line from /etc/fstab , but is there more to it than that? Any advice?


Yes, just need to unmount first.

perhaps delete the corresponding line from /etc/fstab

Not “perhaps”. You of course must deleted them from /etc/fstab if subvolumes do not exist anymore, otherwise you land in emergency shell on next reboot.