How big is my root partition on BTRFS ?

I just did a fresh install of tumbleweed. Now I want to know how big my root partition is.

You can find information about partitions by using the YaST2 Partitions tool.

No I can’t. :slight_smile:

When I go into yast and use the partition tool, it tells me there is btrfs and subvolumes, one being root, bit it does not tell me how big it is.

Hi
Command line…


su -
btrfs filesystem show /
btrfs filesystem df /

Thank you

guus@a183222:~> su - 
Wachtwoord:  
**a183222:~ #**  
**a183222:~ #** btrfs filesystem show / 
Label: none  uuid: 9c8140f9-0b81-41eb-ab94-d7342c38d218 
        Total devices 1 FS bytes used 193.59GiB 
        devid    1 size 931.01GiB used 195.02GiB path /dev/nvme0n1p2 

**a183222:~ #** btrfs filesystem df / 
Data, single: total=194.01GiB, used=193.05GiB 
System, single: total=4.00MiB, used=48.00KiB 
Metadata, single: total=1.01GiB, used=560.25MiB 
GlobalReserve, single: total=251.00MiB, used=0.00B



I am willing to admit, I totally do not understanding what it says.

Hi
Device size and used…


devid    1 size 931.01GiB used 195.02GiB path /dev/nvme0n1p2 

I am only getting more and more confused

So there is no separate root partition anymore ? Because its the entire partition ?

Then were is my home folder ?

I must have missed something or just totally don’t understand btrfs. :frowning:

Is it related to this ?

https://en.opensuse.org/openSUSE:Usr_merge

I think, I am starting to understand the problem, and my confusion.

The Tumbleweed installer did not do what I expected it to do.
It did not create on the SSD a home and root partition, but uses, I am guessing the home of the other tubleweed install. :frowning:

Now how to solve this ?

Go into yast, shrink the root partition to about 60 gig ? and use whats left for a home folder ?

This probably means I will loose the software I already installed ?

This triple boot machine currently runs Tumbleweed:

**i3-4130:~ #** fdisk -l 
**Disk /dev/sda: 232.89 GiB, 250059350016 bytes, 488397168 sectors**
Disk model: CT250MX500SSD1   
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 4096 bytes 
I/O size (minimum/optimal): 4096 bytes / 4096 bytes 
Disklabel type: gpt 
Disk identifier: 3B04C452-DAD9-45C6-9BD3-AE398288F628 

**Device****    Start****      End****  Sectors****  Size****Type**
/dev/sda1       2048   1026047   1024000   500M EFI System 
/dev/sda2    1026048 283596799 282570752 134.7G Linux filesystem 
/dev/sda3  283596800 385996799 102400000  48.8G Linux filesystem 
/dev/sda4  385996800 386029567     32768    16M Microsoft reserved 
/dev/sda5  386029568 488396799 102367232  48.8G Microsoft basic data 
**i3-4130:~ #** lsblk -f 
NAME   FSTYPE FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINT 
sda                                                                                 
├─sda1 vfat   FAT16            6B6D-1CDE                             471.7M     6% /boot/efi 
├─sda2 btrfs        tumbleweed 227128c2-8703-4859-a006-30dccf5b299c    108G    19% / 
├─sda3 btrfs        leap       85d405ec-d559-49a1-b59c-5c5c9f176724                 
├─sda4                                                                              
└─sda5 ntfs                    FE06394606390167                                     
**i3-4130:~ #** btrfs filesystem usage -T / 
Overall: 
    Device size:                 134.74GiB 
    Device allocated:             32.05GiB 
    Device unallocated:          102.69GiB 
    Device missing:                  0.00B 
    Used:                         25.62GiB 
    Free (estimated):            108.04GiB      (min: 108.04GiB) 
    Free (statfs, df):           108.04GiB 
    Data ratio:                       1.00 
    Metadata ratio:                   1.00 
    Global reserve:               77.88MiB      (used: 0.00B) 
    Multiple profiles:                  no 

             Data     Metadata  System               
Id Path      single   single    single   Unallocated 
-- --------- -------- --------- -------- ----------- 
 1 /dev/sda2 30.01GiB   2.01GiB 32.00MiB   102.69GiB 
-- --------- -------- --------- -------- ----------- 
   Total     30.01GiB   2.01GiB 32.00MiB   102.69GiB 
   Used      24.66GiB 984.19MiB 16.00KiB             
**i3-4130:~ # **

Presumably there is no problem whatsoever with your install. For verification run all of the above commands on your machine and post both the commands and their complete and unaltered output as i did for my machine.

Default now a days for BTRFS formatted installs is home on root. ie if you do not select something else home directory will be on root partition.

You can change where home is by simply changing where /home lives in /etc/fstab

My good mood is returning :slight_smile:

I just realized I could go back to after the install of tumbleweed because of btrfs.

Reading the last two replies in this topic though, I might have panicked too soon.

**a183222:~ #** fdisk -l 
**Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors**
Disk model: WDC WD10EZEX-08W 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 4096 bytes 
I/O size (minimum/optimal): 4096 bytes / 4096 bytes 
Disklabel type: gpt 
Disk identifier: 9B2B0727-8EF2-458A-8CD7-5E13FF3E9BCB 

**Device****  Start****       End****   Sectors****  Size****Type**
/dev/sda1     2048    1085439    1083392   529M Windows recovery environment 
/dev/sda2  1085440    1288191     202752    99M EFI System 
/dev/sda3  1288192    1320959      32768    16M Microsoft reserved 
/dev/sda4  1320960 1953523711 1952202752 930.9G Microsoft basic data 


**Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors**
Disk model: ST1000DM010-2EP1 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 4096 bytes 
I/O size (minimum/optimal): 4096 bytes / 4096 bytes 
Disklabel type: gpt 
Disk identifier: 9BBDB9A9-4412-4799-BC16-933C59E8ACF6 

**Device****     Start****       End****   Sectors****  Size****Type**
/dev/sdb1        2048    1026047    1024000   500M EFI System 
/dev/sdb2     1026048   52699135   51673088  24.6G Linux filesystem 
/dev/sdb3    54407168 1949329407 1894922240 903.6G Linux filesystem 
/dev/sdb4  1949329408 1953525134    4195727     2G Linux swap 


**Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors**
Disk model: Samsung SSD 980 1TB                      
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 16384 bytes / 131072 bytes 
Disklabel type: gpt 
Disk identifier: 63581BC3-DBCF-4810-AF9F-C94FBB91E551 

**Device****  Start****       End****   Sectors**** Size****Type**
/dev/nvme0n1p1    2048    1050623    1048576  512M EFI System 
/dev/nvme0n1p2 1050624 1953525134 1952474511  931G Linux filesystem



**a183222:~ #** lsblk -f 
NAME        FSTYPE FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINT 
sda                                                                                   
├─sda1      ntfs         Herstel A63A73D93A73A549                                     
├─sda2      vfat   FAT32         9474-CF21                                            
├─sda3                                                                                
└─sda4      ntfs                 EA0E76BE0E76837D                                     
sdb                                                                                   
├─sdb1      vfat   FAT16         F9E4-F140                                            
├─sdb2      ext4   1.0           f032ab3a-eb51-4f2b-a938-98cc7fa90616                 
├─sdb3      xfs                  83da1f9a-70c5-4519-8ce4-caa8b30c5383                 
└─sdb4      swap   1             6d17eb33-51a2-4ed2-8cda-fe29e8fefa8c                [SWAP] 
nvme0n1                                                                               
├─nvme0n1p1 vfat   FAT32         3AB8-553F                               506M     1% /boot/efi 
└─nvme0n1p2 btrfs                9c8140f9-0b81-41eb-ab94-d7342c38d218  737.1G    21% /



Overall: 
    Device size:                 931.01GiB 
    Device allocated:            195.02GiB 
    Device unallocated:          735.99GiB 
    Device missing:                  0.00B 
    Used:                        193.40GiB 
    Free (estimated):            737.15GiB      (min: 737.15GiB) 
    Free (statfs, df):           737.15GiB 
    Data ratio:                       1.00 
    Metadata ratio:                   1.00 
    Global reserve:              252.97MiB      (used: 0.00B) 
    Multiple profiles:                  no 

                  Data      Metadata  System               
Id Path           single    single    single   Unallocated 
-- -------------- --------- --------- -------- ----------- 
 1 /dev/nvme0n1p2 194.01GiB   1.01GiB  4.00MiB   735.99GiB 
-- -------------- --------- --------- -------- ----------- 
   Total          194.01GiB   1.01GiB  4.00MiB   735.99GiB 
   Used           192.85GiB 561.52MiB 48.00KiB      

An online Linux friend suggested:

df -hTl
[FONT=monospace]df -hTl 
Filesystem     Type      Size  Used Avail Use% Mounted on 
devtmpfs       devtmpfs  7.8G     0  7.8G   0% /dev 
tmpfs          tmpfs     7.8G     0  7.8G   0% /dev/shm 
tmpfs          tmpfs     3.2G  9.8M  3.1G   1% /run 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% / 
tmpfs          tmpfs     7.8G     0  7.8G   0% /tmp 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /.snapshots 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /boot/grub2/i386-pc 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /boot/grub2/x86_64-efi 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /home 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /opt 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /root 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /srv 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /usr/local 
/dev/nvme0n1p2 btrfs     932G  194G  738G  21% /var 
/dev/nvme0n1p1 vfat      511M  5.1M  506M   1% /boot/efi 
tmpfs          tmpfs     1.6G   48K  1.6G   1% /run/user/1000

So there are my folders on the ssd, this makes me happy. Don’t understand all, but nvme is my ssd. :slight_smile:

[/FONT]

Hi
In btrfs speak they are sub volumes, all on the nvme device (ssd) nvme0n1p2.

Thank you, I am starting to slowly to see the light.

Although, I still don’t understand all, some google and reading should fix that, so that I will at least understand the output of df -hTL fully.

Right now it looks like voodoo magic to me , a lot of the partitions the same size, wtf ? lol
There is a hint there, to why I am getting confused. :slight_smile:

I am very happy, I won’t be installing tumbleweed again, I seriously started to panic.

Hi
One btrfs partition on the nvme device and under that are sub-volumes (sort of like ghost partitions) which you see in the output.

Example on my system… see the subvol id…


mount | grep nvme0n1p2
/dev/nvme0n1p2 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=256,subvol=/@)
/dev/nvme0n1p2 on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/boot/grub2/i386-pc)
/dev/nvme0n1p2 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/boot/grub2/x86_64-efi)
/dev/nvme0n1p2 on /srv type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/srv)
/dev/nvme0n1p2 on /root type btrfs (rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/root)
/dev/nvme0n1p2 on /var type btrfs (rw,relatime,ssd,space_cache,subvolid=257,subvol=/@/var)

The details of configuration are perfect.

  1. In case of trouble: Don’t panic. Sit back and set up a plan. If unsure post here before proceeding.
  2. In case of disaster restore from backup. Obvious prerequisites are a recent backup and a working restore procedure.

Thank you.

For now quite happy. Its funny how fast tumbleweed boots, compared to the version on the hard disk.

Its almost instant after selecting it in the grub screen.

With some tweaking, I think I could an have a desktop in 10 seconds.

But how my pc is set up now, the first thing I see is a bios screen for 8 seconds, then the grub screen.

Hi
Look at systemd-analyze for more info on boot times…


systemd-analyze 
Startup finished in 1.683s (kernel) + 2.255s (initrd) + 3.479s (userspace) = 7.418s 
graphical.target reached after 3.465s in userspace

systemd-analyze blame

systemd-analyze critical-chain

Interesting :slight_smile:

guus@linux-2ls4:~> systemd-analyze 
Startup finished in 13.327s (firmware) + 2.726s (loader) + 1.972s (kernel) + 2.522s (initrd) + 1.566s 
(userspace) = 22.115s  
graphical.target reached after 1.551s in userspace


So it takes 13 sec, before the grub screen pops up or is it 15 seconds?

It looks like the 10 seconds to a desktop would be possible if I disable the bios screen. (F11 for boot menu, del to enter bios)

That would take about 8 second off, maybe a tad more.

It’ s amazing how fast it is.

**erlangen:~ #** systemd-analyze 
Startup finished in 855ms (kernel) + 2.475s (initrd) + 1.595s (userspace) = 4.926s  
graphical.target reached after 1.588s in userspace 
**erlangen:~ #**

http://www.mistelberger.net/erlangen-boot.svg

**erlangen:~ #** hdparm -tT /dev/nvme0n1            

/dev/nvme0n1: 
 Timing cached reads:   39816 MB in  1.99 seconds = 20057.97 MB/sec 
 Timing buffered disk reads: 5686 MB in  3.00 seconds = 1894.58 MB/sec 
**erlangen:~ #**