You are not logged in.

#1 2018-12-04 15:23:30

richwessels9
Member
Registered: 2018-12-04
Posts: 36

[SOLVED] Seperating / and /usr for SSD and HDD system

Hello,

I would like to install Arch Linux on a NVMe SSD which already has Windows 10 on it. I would like to keep directories that do not grow as the user installs programs on the SSD (it is only 250GB). This is why I am trying to seperate /usr from / and other boot directories. I have read in the Arch Linux Wiki that this is not advisable but have read elsewhere that this rule is outdated and does not need to be followed. Would it work if I put /, /root and other important directories on a partition on my SSD and /usr along with possibly /ext on the hard-drive for storage?

Last edited by richwessels9 (2018-12-17 13:42:33)

Offline

#2 2018-12-04 15:38:09

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

It is possible to outsource /usr, but there are some caveats you should be aware of, as mentioned e.g. here.

Last edited by schard (2018-12-04 15:38:26)

Offline

#3 2018-12-04 15:39:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,447
Website

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

First, separating / and /usr, even if it would not cause problems, doesn't make much sense in arch as /usr is a majority of what is in the root filesystem (/var can be pretty good sized too I suppose).  But in either case, 250GB is *huge*.  A root filesystem including /usr and /var can often be just a couple GB on a streamlined system, but 10GB or so is probably a safer estimate for some breathing room on a full desktop system with lots of bells and whistles.  I can't imagine a root filesystem requiring more than 15-20 GB even if one installs every large package in the repos.

Home partitions are what can get quite large as that's (generally) where one would store music/videos and the like (or perhaps these would be on an additional partition somewhere else, but definitely not on the root partition).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2018-12-04 15:45:24

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Trilby wrote:

First, separating / and /usr, even if it would not cause problems, doesn't make much sense in arch as /usr is a majority of what is in the root filesystem (/var can be pretty good sized too I suppose).  But in either case, 250GB is *huge*.  A root filesystem including /usr and /var can often be just a couple GB on a streamlined system, but 10GB or so is probably a safer estimate for some breathing room on a full desktop system with lots of bells and whistles.  I can't imagine a root filesystem requiring more than 15-20 GB even if one installs every large package in the repos.

Home partitions are what can get quite large as that's (generally) where one would store music/videos and the like (or perhaps these would be on an additional partition somewhere else, but definitely not on the root partition).

But aren't programs stored in /usr? I am planning on downloading lots of software such as DaVinci Resolve which can take up a lot of space. I don't suppose programs can be stored in /home can they?

Offline

#5 2018-12-04 15:46:46

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Why would you want to install the system on the SDD if you do not want to put /usr there - everything relevant is in /usr.
The thing that will quickly grow with videos of … let's say "pussies" is /home - thus it's a perfectly good idea to put /home onto the HDD. Putting /usr on the HDD but /home on the SDD is a rather strange idea.

Edit: DaVinci resolve is a Windows program?! So you're running it on wine and those programs usually end in the users $HOME

Last edited by seth (2018-12-04 15:48:31)

Offline

#6 2018-12-04 15:55:55

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

seth wrote:

Why would you want to install the system on the SDD if you do not want to put /usr there - everything relevant is in /usr.
The thing that will quickly grow with videos of … let's say "pussies" is /home - thus it's a perfectly good idea to put /home onto the HDD. Putting /usr on the HDD but /home on the SDD is a rather strange idea.

Edit: DaVinci resolve is a Windows program?! So you're running it on wine and those programs usually end in the users $HOME

I would like to install boot files on the SSD so that my computer boots fast and certain elements of the operating system run faster. I do not want to put /home on the SSD, I want that to be on the HDD. I would like my programs and other data to be on the HDD and my bootfiles and other directories that do not grow with programs to be installed on my SSD. Also DaVinci Resolve is now available on Linux, however, I am not sure if it will work on Arch Linux because it isn't under the recommended distributions.

Offline

#7 2018-12-04 16:02:43

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

So you want to put /boot onto the sdd, not /
Most of the boot time will be determined by the stuff in /usr, though (especially if "boot" includes a desktop environment)
The davinci AUR package seems to install to /opt

Offline

#8 2018-12-04 16:21:42

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

seth wrote:

So you want to put /boot onto the sdd, not /
Most of the boot time will be determined by the stuff in /usr, though (especially if "boot" includes a desktop environment)
The davinci AUR package seems to install to /opt

I am planning on putting / onto the SSD but I have realized that doing this will not speed up boot times by much. Since I have a 250GB SSD with Windows 10 on, how can I install Arch Linux to use the SSD for certain directories to speed up the computer and use the 1TB hard-drive for programs and other storage needs?

Offline

#9 2018-12-04 16:27:38

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Mounting, symlinks, …
But if you long to have eg. /usr/lib/libgnome.so and /usr/bin/gnome-shell on the SSD but /usr/lib/libbigfatelectronapp.so and /usr/bin/bigfatelectronapp on the HDD, that's gonna be a PITA.
A common approach esp. for non-distro SW is to install it to /opt (as in this case the davinci AUR package will do, but you'll have to pay attention what software™ does)

Offline

#10 2018-12-04 18:03:36

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

seth wrote:

Mounting, symlinks, …
But if you long to have eg. /usr/lib/libgnome.so and /usr/bin/gnome-shell on the SSD but /usr/lib/libbigfatelectronapp.so and /usr/bin/bigfatelectronapp on the HDD, that's gonna be a PITA.
A common approach esp. for non-distro SW is to install it to /opt (as in this case the davinci AUR package will do, but you'll have to pay attention what software™ does)

Would it be possible to keep desktop environment programs (using KDE Plasma) programs to install to /usr which will be on the SSD and then install all other software such as Firefox,  VS Code etc. on /opt? I was looking online and it says that only programs that obey a monolithic folder structure are saved there, is it possible to manually install other programs there?

Offline

#11 2018-12-04 18:28:38

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Only if you build all packages you want to move to /opt locally.

Offline

#12 2018-12-04 18:30:05

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Exactly how much space do you have available on the SSD? How much do you need to leave free for Windows?


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#13 2018-12-04 18:41:45

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

2ManyDogs wrote:

Exactly how much space do you have available on the SSD? How much do you need to leave free for Windows?

I have used just under 30GB and have 204GB remaining.

Offline

#14 2018-12-04 18:50:25

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

richwessels9 wrote:

I have used just under 30GB and have 204GB remaining.

And you think your Arch install will use more than that unless you separate /usr? That seems like plenty of space to me, especially if you keep /home and data files on the HDD.

Last edited by 2ManyDogs (2018-12-04 18:53:26)


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#15 2018-12-04 18:52:26

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

2ManyDogs wrote:
richwessels9 wrote:

I have used just under 30GB and have 204GB remaining.

And you think your Arch install will use more than that unless you separate /usr? That seems like plenty of space to me.

I am planning on installing a lot of programs, my Mac has ~300GB of programs on it. The basic install I know won't use near that amount but as I add programs, I will need to use HDD to store the programs.

Offline

#16 2018-12-04 20:25:18

seth
Member
Registered: 2012-09-03
Posts: 49,992

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

That's not comparable, Apple SW is distributed as "bundles" which is more like docker containers (and usually comes w/ a 32bit and 64bit copy in one bundle) ie. you probably have like 10GB of different electron copies alone. Figure what you're *actually* gonna require - and that's not done by looking at OtherOS™.
For a "normal" desktop environment (inc. Browser, IDE etc.) 30GB is more than enough. Problems may arise if you plan to install a lot of games and  their terabytes of textures, but even then you could symlink /usr/share/fatgame to some path on the HDD to load off tehe bulk.

Offline

#17 2018-12-04 22:10:25

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Some statistics.

Installed size of all packages on the official repositories (custom repositories disabled):

$ expac -S '%m' | awk '{ SUM += $1 } END { print SUM/1024^3 " GiB"}'
113.992 GiB

Note that some packages conflict with each other, so the actual upper boundary will be lower.

Trilby wrote:

I can't imagine a root filesystem requiring more than 15-20 GB even if one installs every large package in the repos.

$ expac -S '%m' | awk '{ if ($1 >= 1024^3) { COUNT += 1; SUM += $1 } } END { print COUNT " packages, " SUM/1024^3 " GiB" }'
12 packages, 22.8774 GiB

If you plan to install more software, from elsewhere, including the AUR, you can obviously exceed any maximum.

204 GiB will be much more than sufficient for / without /home.  In some cases it might be a good idea to split off /var, /srv or subdirectories thereof.

Offline

#18 2018-12-04 22:50:29

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

$ df /dev/sdb2
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdb2       82045336 45458640  32376008  59% /media/sdb2
$

That's my complete / except /home and /boot after 9 years of using archlinux.
cleaning up pacman cache freed almost 20 Gb , reducing the amount to 25 GB.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#19 2018-12-05 16:52:32

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Lone_Wolf wrote:
$ df /dev/sdb2
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdb2       82045336 45458640  32376008  59% /media/sdb2
$

That's my complete / except /home and /boot after 9 years of using archlinux.
cleaning up pacman cache freed almost 20 Gb , reducing the amount to 25 GB.

I have decided to keep /usr on the SSD because I know see that I likely won't exceed 200GB for storing programs. However, I would like to separate other directories such as /var because apparently this is where pacman saves its logs and I do not think that this directory needs to be pre-mounted for boot. I have watched some Arch Linux installation videos and the person usually writes /mnt/boot onto one partition and / onto another partition. Does / contain all the files such as /usr and /var. How can I mount /var to a separate partition (on my other drive)?

Offline

#20 2018-12-05 17:15:06

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

richwessels9 wrote:

I have watched some Arch Linux installation videos and the person usually writes /mnt/boot onto one partition and / onto another partition. Does / contain all the files such as /usr and /var. How can I mount /var to a separate partition (on my other drive)?

Please do not follow Arch installation videos the only supported installation guide contains Installation_guide#Format_the_partitions.

Offline

#21 2018-12-05 18:39:47

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

loqs wrote:
richwessels9 wrote:

I have watched some Arch Linux installation videos and the person usually writes /mnt/boot onto one partition and / onto another partition. Does / contain all the files such as /usr and /var. How can I mount /var to a separate partition (on my other drive)?

Please do not follow Arch installation videos the only supported installation guide contains Installation_guide#Format_the_partitions.

I have read the Wiki and would like to know, if I mount the root directory to a partition on my SSD and then mount /var to the partition on my hard-drive, will this work and any directory that I do not specify where to place will be placed in the partition where the root directory is located (excluding /boot)?

Offline

#22 2018-12-05 18:58:56

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

Anything that is not given its own filesystem will use the root filesystem.  Assuming the partition for /var is created and formatted and the root filesystem is mounted at /mnt.
From the wiki example below you would change boot to var and sda2 to the correct device identifier.

# mkdir /mnt/boot
# mount /dev/sda2 /mnt/boot

Edit:
Depending on your bootloader choice you may need to mount the ESP to /mnt/boot (from the use of Windows 10 I am assuming the system is booting using EFI)

Last edited by loqs (2018-12-05 19:01:17)

Offline

#23 2018-12-05 20:46:50

richwessels9
Member
Registered: 2018-12-04
Posts: 36

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

loqs wrote:

Anything that is not given its own filesystem will use the root filesystem.  Assuming the partition for /var is created and formatted and the root filesystem is mounted at /mnt.
From the wiki example below you would change boot to var and sda2 to the correct device identifier.

# mkdir /mnt/boot
# mount /dev/sda2 /mnt/boot

Edit:
Depending on your bootloader choice you may need to mount the ESP to /mnt/boot (from the use of Windows 10 I am assuming the system is booting using EFI)

This is really helpful, thanks! Also, will I be able to mount two directories to a partition.
Example:
I create a partition on my HDD, then:
# mkdir /mnt/var
# mkdir /mnt/opt
# mount /dev/sda6 /mnt/var
# mount /dev/sda6 /mnt/opt

Would this work?

Last edited by richwessels9 (2018-12-05 20:52:10)

Offline

#24 2018-12-05 21:22:29

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

No.

Any directory that you seperate from / needs to live on its own partition.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#25 2018-12-05 21:24:06

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] Seperating / and /usr for SSD and HDD system

No, that does not work. You will have to use bind mounts or multiple partitions. Those could be LVM volumes or btrfs subvolumes as well.
https://wiki.archlinux.org/index.php/Btrfs#Subvolumes
https://wiki.archlinux.org/index.php/LVM

mkdir /mnt/extra
mount /dev/sda6 /mnt/extra
mkdir /mnt/extra/opt
mkdir /mnt/extra/var
mkdir /mnt/extra/home
mount --bind /mnt/extra/opt /opt
mount --bind /mnt/extra/var /var
mount --bind /mnt/extra/home /home

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB