Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
BTRFS dup profile woes...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1602
Location: Fayetteville, NC, USA

PostPosted: Sun Oct 01, 2017 8:58 pm    Post subject: BTRFS dup profile woes... Reply with quote

I've been experimenting with BTRFS on my laptop and I hit a stopping point. I want the DUP profile for my home subvolume/partition/whatever, but using DUP on the OS wastes loads of space. I normally do a BIOS or GPT partition, then a BTRFS partition, then an ext4 for VirtualBox systems, and finally a swap partition. I make BTRFS subvolumes for /boot, /usr/src, /, and /home. This allows me to use different compression methods on different locations. None for boot, LZO for the system root, and ZLIB for home and the kernel sources. The issue is that subvolumes cannot change data profiles, meaning either the entire system is DUP or SINGLE.

With this in mind, I am left with either no duplicate data for my important work documents, duplicate data for EVERYTHING, requiring me to purchase an even larger disk (1TB currently), or go back to multiple partitions, something like BTRFS A for the OS in single mode and BTRFS B for /home in DUP mode. What would you guys do? I am debating two BTRFS partitions instead of one. If so, how much space should I give it for the entire OS with KDE/Plasma, K3B, LibreOffice, KDEnlive, Code::Blocks, etc? Remember, if I go this route the OS partition will be in single mode.

So, what would you do?
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1602
Location: Fayetteville, NC, USA

PostPosted: Tue Oct 03, 2017 4:06 pm    Post subject: Reply with quote

OK, I have about decided to go to a BTRFS partition for the OS and one for /home. The OS will use the single profile and the home partition will use the DUP profile. However, how big of a partition should I use for the OS? Below are the packages I use.
Code:

//Core utilities
app-misc/screen app-portage/gentoolkit app-text/wgetpaste net-analyzer/nbtscan net-analyzer/nmap net-firewall/xtables-addons net-ftp/ftp net-misc/ntp net-misc/openssh-blacklist net-wireless/iw net-wireless/wireless-tools sys-apps/pcmciautils sys-apps/smartmontools sys-apps/usbutils sys-fs/btrfs-progs sys-fs/dosfstools sys-fs/exfat-utils sys-fs/fuse-exfat sys-power/acpitool sys-power/cpupower sys-process/iotop net-misc/bridge-utils

//Desktop and common apps plus dependencies
kde-apps/kde-meta kde-apps/dolphin-plugins kde-apps/kfloppy kde-apps/knotes kde-apps/kqtquickcharts kde-apps/kldap kde-apps/kmousetool kde-apps/kmouth media-sound/audacious media-sound/audacity media-gfx/gimp media-gfx/xsane media-sound/flacon media-sound/mp3gain media-sound/ttaenc media-sound/vorbis-tools media-sound/vorbisgain media-video/mediainfo mail-client/thunderbird net-firewall/firewalld net-ftp/filezilla www-client/firefox x11-apps/mesa-progs x11-apps/xrandr

//Chromium and dependencies
media-fonts/arphicfonts media-fonts/bitstream-cyberbit media-fonts/droid media-fonts/ipamonafont media-fonts/noto media-fonts/ja-ipafonts media-fonts/takao-fonts media-fonts/wqy-microhei media-fonts/zenhei www-client/chromium

//Last few things
app-emulation/virtualbox app-emulation/virtualbox-additions app-emulation/virtualbox-extpack-oracle app-office/libreoffice sys-apps/usermode-utilities dev-util/codeblocks

What is the recommended partition size for this type of setup? I use the plasma profile without systemd.

*EDIT*

And before you say "just try emerging it all", I cannot do that. I use the default profile when installing core utilities. Then I switch to the plasma profile and pull in the rest. If I pull it all on the default profile I get errors due to USE flags. If I try pulling the core stuff with the plasma profile it errors due to stuff not being able to be pulled in at the same time. I literally MUST do these separately. Once done I do an "emerge -avuND @world" and all is good.
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Oct 03, 2017 5:12 pm    Post subject: Reply with quote

The_Great_Sephiroth wrote:
using DUP on the OS wastes loads of space
How much is "loads", and how much is actual data (OS, personal data, etc.)? What's your expected growth rate of personal data?

The_Great_Sephiroth wrote:
how big of a partition should I use for the OS?
What is the OS currently consuming? There's no way to future proof fixed partition sizes without wasting a lot of space. Does btrfs work at all with LVM? Does a DUP partition also duplicate data for /var/tmp/portage and similar?
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Tue Oct 03, 2017 8:28 pm    Post subject: Reply with quote

Iirc I've asked about this feature (different profiles on subvolumes) in #btrfs and the answer was "It's in the works".
But as we all know - creating a current generation filesystem is a slow process. I've also asked if there was planned support to have user selectable number of copies btrfs makes from each file... At that time it was only "frequently asked feature".

So you might have the features you need eventually. Thus I'd create a setup that is easy to change to use single big btrfs when the time comes.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
The_Great_Sephiroth
Veteran
Veteran


Joined: 03 Oct 2014
Posts: 1602
Location: Fayetteville, NC, USA

PostPosted: Tue Oct 03, 2017 9:02 pm    Post subject: Reply with quote

This would be simple to change in the future. Boot System Rescue CD, move /home to an external device (USB for example), delete the /home partition, extend the OS partition to fill the void, move /home back. Easy, but not a big concern since it is one of many features still being developed.

The OS is currently consuming zero bits of space since I zeroed the disk with dd before realizing I should have checked usage first. I am likely going to have /var/tmp/portage and /usr/portage on an external disk attached by eSATA to save space. Actually, maybe just the build directory. This way I can search portage on the go. Either way it will save some space.

I believe I am going to try 150GiB and if that works and leaves me 20~30GiB free, I am happy. I want a partition large enough to house the OS but to have 20-20% free. If it has more free, I can shrink the partition. I will post back when everything is done and report my install size.

Oh and by "loads" I mean half. DUP is simply RAID1 on a single disk. If I had a partition of 100GiB in DUP I'd only be able to fit 50GiB onto it since two copies of each chunk of data are stored. Great for redundancy when sectors fail or rot, but bad for storage!
_________________
Ever picture systemd as what runs "The Borg"?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum