btrfs leap 15.1 /home resize

Leap 15.1 is telling me that I have run out of space on /home. Btrfs “filesystem show /home” tells me that home size is 168 gig. unused space is the balance of a 1000 gig drive.
I would like to use yast to increase the size of /home but need clear instructions on how to do this. A reference for this procedure would be appreciated.

Is home on separate partition or is it on root. Default these days is to put /home on root.

gogalthorp: Thank you for your reply. My response is listed below:

Yast2 partitioner “device graphs” shows:

/dev/sda -> gpt
gpt->/dev/sda2/btrfs
btrfs->top level
top level->@
@->@/home
@/home->/home

Also there is a dotted line starting at btrfs that points to /.

OK so home is on root thus shares the root partition space… Increasing root partition will thus increase home or you can move home or parts of home to a new partition if you have space available.

**fdisk - l **will show current partition layout and space usage

Note when changing partition size you can only add/remove space to the end of the partition

gogalthorp

Thanks for your reply.
Is there a step by step set of instructions on how to do this in yast2?

I notice that there is a terminal command “btrfs filesystem resize max /home” listed on the internet. Might that be an alternate valid approach if there are no detailed instructions for the use of YAST2

You may be able to set a new max size but you can not make it bigger than the root systems requirements and size since all is on the same partition. Take too much space from system and you will run into problems.

You can resize/move/create partitions in Yast -system- partitioner. Take care and be sure you understand what the changes you set do before committing changes you can do serious damage making random changes :wink:

Also you should backup the /home data just in case. You can always reinstall OS and programs

This the reason I don’t like the new default of all being on a single partition. Previously default was to put /home on its own partition. You still can but you have to make the choice. This configuration gives much more flexibility and separates personal data from system data better. All on one partition is too MS for me LOL

gogolthorp

Thanks for the information. Like to know if the standard install for the next leap distro will separate the /home sub partition as you indicated was preferable. In my case the standard install on a 1000 gig drive set up a /home size of 160 gig and left 740 gig free. fdisk indicates that the entire disk is used.

I plan on resizing /home to about 400 gig size on /home. This should allow adequate space for all the others. Of course I will backup /home before taking any action.

Thanks again for you insight. I understand that the Forums server will be out of action for a few days starting Sunday

newbuilder

My concern is similar.

.

Arch has a nice sample layout: Partitioning - ArchWiki

Use a live or repair system and run yast2 > partitioner for adjusting the current layout of the drive. https://www.youtube.com/watch?v=HP_Y6hUFfQ8

Show us fdisk -l (please use code tags around the output. # in the menu)

AFAIK openSUSE installer will continue to use BTRFS on root and set home as a sub on that partition unless you intervene and set thing up differently.

Having /home on a separate partitions makes lots of sense to keep your data separate from the system This allows easier back up and lets you install other OS and keep your data safe. My home is actually on a separate drive.

I would guess not. However, it is always an option. In the partitioning section, clicked on the “Guided” option. And there you can choose:

  • LVM or partition
  • Encryption or not
  • Separate “/home” or not
  • Which file system to use for root and for home

Once you have made those choices, you can still allow the system to decide the partition sizes.

gogolthorp

responding to your request for print out of fdisk -l


Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000MX500SSD1
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: DAB2FED3-6705-4258-8E38-5F1332F7392B

Device Start End Sectors Size Type
/dev/sda1 2048 18431 16384 8M BIOS boot
/dev/sda2 18432 1949329407 1949310976 929.5G Linux filesystem
/dev/sda3 1949329408 1953525134 4195727 2G Linux swap


newbuilder

Okay, I was a bit confused since the start of the thread and I feel it derailed already from the initial problem.
What’s the problem btw? IMO the problem is that you misunderstood the output of btrfs filesystem show /home.
Run again omitting /home, or use just / instead of /home. The output would be the same as /home, because from fdisk -l we can infer you have / and /home on the same partition. Also, you don’t have unused space on the disk.
Many btrfs subcommands take any path on the mounted filesystem, which may be misleading. The underlying filesystem or subvolume is taken as a whole more often than not. Very few subcommands work on the actual file/directory referenced.

A better command to understand current usage of a btrfs filesystem is:

btrfs filesystem usage /

It returns the two datapoints from the show subcommand but together with other datapoints it makes easier to make sense of them:

Device size:                 Partition size
Device allocated:            Total space currently requested from the partition
Device unallocated:          Dedicated space from the partition that can be allocated as needed
Used:                        Total space which actually contains data
Free (estimated):            (allocated - used) + unnalocated (approximation)

To learn about actual usage in /home, run:

btrfs subvolume show /home

All the subvolumes:

btrfs subvolume list -t --sort=ogen /

The take away is that you can’t resize a subvolume, since all subvolumes take blocks/extents from same pool. They “grow” or “shrink” as needed. To sum up, no action needs to be taken here.

Responding to the request for a listing of fdisk -l. Hopefully this time it is readable.

rjptwo@linux-y445:~> sudo fdisk  -l
[sudo] password for root: 
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000MX500SSD1 
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: DAB2FED3-6705-4258-8E38-5F1332F7392B

Device          Start        End    Sectors   Size Type
/dev/sda1        2048      18431      16384     8M BIOS boot
/dev/sda2       18432 1949329407 1949310976 929.5G Linux filesystem
/dev/sda3  1949329408 1953525134    4195727     2G Linux swap


rjptwo@linux-y445:~>