Dedicate a partition for the whole system or separate it?

Help with issues regarding installation of Debian

Dedicate a partition for the whole system or separate it?

Postby hack3rcon » 2019-08-19 10:26

Hello,
In the installation process, linux let you to dedicate a partition for "Home" , "usr" and...what is its benefit? It is better to dedicate a partition for a directory like "Home" that store personal data, but how about others?

Thanks.
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: Dedicate a partition for the whole system or separate it

Postby Chrisdb » 2019-08-19 11:13

hi,

In most cases for personal use, a separate home partition is useful when you upgrade or reinstall your system, you can choose to leave this partition untouched so you can have a backup
User avatar
Chrisdb
 
Posts: 57
Joined: 2018-04-10 07:16

Re: Dedicate a partition for the whole system or separate it

Postby p.H » 2019-08-19 11:33

Separate filesystems (not necessarily partitions, can be logical volumes too) allow to use different filesystem types or mount options which are most adapted for each directory contents.
Separate filesystems prevent one directory (mostly /home, /var, /tmp) from filling up all the available disk space.
Separarate filesystems can limit the extent of a filesystem corruption and make backup and restoration easier.

BUT

Separate filesystems make disk space allocation and management more difficult. LVM is strongly advised.
p.H
 
Posts: 1084
Joined: 2017-09-17 07:12

Re: Dedicate a partition for the whole system or separate it

Postby CwF » 2019-08-19 12:21

I like to make the OS as small as possible, including the skeleton of /home, so that a working copy or backup image of the OS is easier to manage. From there it is easy to expand the user directories as mount points for separate devices that can be separately managed and backed up.

If you strip out personal data from /home, the remaining configuration data is not very big. So an image of the OS and the bare /home can be a few gigs up to the smallest common disk size, like <120GB. Then the provided user directories, holding the personal data can be on their own disk, like another disk for ~/Documents, /Pictures, /Videos etc. So those backups of 10TB of videos don't contaminate your ability to back up the OS alone.

IMO, the amount of customization in /home is trivial compared to the tweaks outside Home, so to me that is the unit. Personal data should be the first next block, not /home. So a bootable usb can hold an image of a complete system void of personal data, for me buster is a 1.4GB file. Image that file to a disk, boot and attach personal data disk(s), done.
CwF
 
Posts: 443
Joined: 2018-06-20 15:16

Re: Dedicate a partition for the whole system or separate it

Postby djk44883 » 2019-08-19 13:15

Chrisdb wrote:hi,

In most cases for personal use, a separate home partition is useful when you upgrade or reinstall your system, you can choose to leave this partition untouched so you can have a backup


A note, if you upgrade or reinstall, leaving your /home "disconnected", I suspect you allow the upgrade/reinstall to create one, as needed?

So you add mount /home to fstab - so all your old configuration files are still intact, weather or not they may or may not conflict with your upgrade, or reason you reinstalled?? Or do you sort through things first, making it useful?

I have found a method to use a separate filesystem/partition creating a directory holding Documents, Music, Downloads, etc maybe even .themes, and in ~ are symbolic links to these. This keeps my personal files separate allowing any installation to configure user home as needed.
djk44883
 
Posts: 80
Joined: 2010-12-11 13:14

Re: Dedicate a partition for the whole system or separate it

Postby hack3rcon » 2019-08-20 04:27

djk44883 wrote:
Chrisdb wrote:hi,

In most cases for personal use, a separate home partition is useful when you upgrade or reinstall your system, you can choose to leave this partition untouched so you can have a backup


A note, if you upgrade or reinstall, leaving your /home "disconnected", I suspect you allow the upgrade/reinstall to create one, as needed?

So you add mount /home to fstab - so all your old configuration files are still intact, weather or not they may or may not conflict with your upgrade, or reason you reinstalled?? Or do you sort through things first, making it useful?

I have found a method to use a separate filesystem/partition creating a directory holding Documents, Music, Downloads, etc maybe even .themes, and in ~ are symbolic links to these. This keeps my personal files separate allowing any installation to configure user home as needed.

Can you share the method?
hack3rcon
 
Posts: 293
Joined: 2015-02-16 09:54

Re: Dedicate a partition for the whole system or separate it

Postby NFT5 » 2019-08-20 07:04

There are some downsides to doing that with symbolic links.

It's much cleaner to create a folder in /home (e.g. DATA) and then use fstab to mount your data drive/partition to that folder. If /home is on a separate partition to / then it doesn't have to be very big.

If you multi-boot then you can do the same with each OS. That keeps your /home clean with config files only for the OS that it's tied to while your date files are commonly accessible from whichever OS you happen to be using at the time.
User avatar
NFT5
 
Posts: 324
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: Dedicate a partition for the whole system or separate it

Postby Dai_trying » 2019-08-20 07:12

If you use a common /home then you might have problems with configs for different OS's, which is why I prefer the method used by djk44883.
Dai_trying
 
Posts: 752
Joined: 2016-01-07 12:25

Re: Dedicate a partition for the whole system or separate it

Postby NFT5 » 2019-08-20 12:32

No, not a common /home. That's a recipe for disaster.

A separate /home for each operating system and then common data drive(s) or partition(s).

Like this:
Code: Select all
chris@BOSSDESK:~$ sudo blkid
/dev/sda1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="C3A8-EEA4" TYPE="vfat" PARTUUID="18d763ec-f0d2-4bc3-9eb6-aafd4921c843"
/dev/sda2: LABEL="DEB10XFCE-OS" UUID="58a848fe-dbc3-4afc-a9a6-da218204217c" TYPE="ext4" PARTLABEL="DEB10XFCE-OS" PARTUUID="1ba83d88-2840-4bc4-879f-6f0acb2e01b8"
/dev/sda3: LABEL="DEB10XFCE-HOME" UUID="6147aebc-c2b6-4b74-adf9-487e29813d6c" TYPE="ext4" PARTLABEL="DEB10XFCE-HOME" PARTUUID="6df9990d-20db-485d-b0f4-31fdeab291f0"
/dev/sda4: LABEL="D9XFCE-OS" UUID="fefe6dde-4b05-4d97-a384-91a527929d57" TYPE="ext4" PARTLABEL="D9XFCE-OS" PARTUUID="f0163448-0a80-4ee9-8438-1992a67e2a8d"
/dev/sda5: LABEL="D9XFCE-HOME" UUID="090a849c-a90f-4a8c-ae1a-274609da4efc" TYPE="ext4" PARTLABEL="D9XFCE-HOME" PARTUUID="cc94bd7b-24f4-4c38-925f-c87d341fdd4e"
/dev/sda6: LABEL="DEBIAN8-OS" UUID="13b081a7-653e-48e1-b0db-1175f2a6cd66" TYPE="ext4" PARTLABEL="DEBIAN8-OS" PARTUUID="2fbe6f6f-1b11-454d-b80e-03e8f62f0200"
/dev/sda7: LABEL="DEBIAN8-HOME" UUID="09a78e50-1716-49c5-8439-f94f314c62bf" TYPE="ext4" PARTLABEL="DEBIAN8-HOME" PARTUUID="e35ceaf8-57ac-44cf-91d7-89d76548f891"
/dev/sda8: LABEL="DEB10KDE-OS" UUID="e5934d55-007b-4b81-915e-a863ffd7c04d" TYPE="ext4" PARTLABEL="DEB10KDE-OS" PARTUUID="b70939b7-a79f-4401-bf1c-9a83d07a928e"
/dev/sda9: LABEL="DEB10KDE-HOME" UUID="521e731b-da13-4dcd-99e3-14251aa3faf4" TYPE="ext4" PARTLABEL="DEB10KDE-HOME" PARTUUID="7c7658ff-4ed6-4944-8c8f-a864dd32471f"
/dev/sda10: LABEL="SWAP" UUID="fb76a968-8ee2-4277-8eea-2feb628a5852" TYPE="swap" PARTLABEL="SWAP" PARTUUID="65086bbe-7410-4c43-bc90-0bf009a6eb85"
/dev/sdb1: LABEL="DATA2" UUID="a08f0c13-cfe8-4bc2-8ae0-95550ad9ce58" TYPE="ext4" PARTUUID="6e321f73-66c3-4588-acd6-a35fcc312814"
/dev/sdc1: LABEL="DATA" UUID="d295f63a-5933-428b-bbe5-cd8173421d14" TYPE="ext4" PARTUUID="cdddcd13-c42e-45b6-a6d9-c441f50878c3"


In my case the /home partitions are 40GB but that's only because I use a shared Public folder to move virtual machines around the network. Other than that need the /home partitions could be quite small since nothing is actually stored there except for config files.
User avatar
NFT5
 
Posts: 324
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: Dedicate a partition for the whole system or separate it

Postby Dai_trying » 2019-08-20 16:37

Sorry I guess I misunderstood the post, probably speed reading which tends to give me 404's in my head :lol:

And I usually keep each OS in it's own single partition just to make it easier for housekeeping (for my methods anyway) but I would not say there is anything wrong with your method, I think both are fine just different :)
Dai_trying
 
Posts: 752
Joined: 2016-01-07 12:25

Re: Dedicate a partition for the whole system or separate it

Postby wizard10000 » 2019-08-20 16:42

You know, this thread started me thinking. I think I'm about to move from a separate /home to One Big Partition and a swapfile.

I'm pretty anal about backups - at any given time I have backups on one local drive, two on different spindles on my home server and one backup in the cloud and they all update nightly. It's been years since I broke Debian badly enough to justify a reinstall so I'm beginning to question the wisdom of continuing to maintain a separate /home partition. I'm really not interested managing partitions on the fly and have a pretty solid backup strategy so I don't really see a use for LVM.

Anyway, this weekend I think I'm gonna move home back to the root partition, kill the swap partition, add a swapfile and resize the root partition to fill up the disk.

Anyway, like I said this thread started me thinking :mrgreen:
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 66
Joined: 2019-04-16 23:15
Location: southeastern us

Re: Dedicate a partition for the whole system or separate it

Postby 4D696B65 » 2019-08-20 16:47

wizard10000 wrote:Anyway, this weekend I think I'm gonna move home back to the root partition, kill the swap partition, add a swapfile and resize the root partition to fill up the disk.

Great idea but Microsoft thought of it first. :mrgreen:
User avatar
4D696B65
 
Posts: 2428
Joined: 2009-06-28 06:09

Re: Dedicate a partition for the whole system or separate it

Postby Dai_trying » 2019-08-20 16:52

My backup strategy is to only backup my DATA partition which is sym-linked to all OS's, since I can re-install any OS (the ones I use anyway) with my required software in around 30 - 45 minutes I think restoring an OS from backup would probably take longer.
Dai_trying
 
Posts: 752
Joined: 2016-01-07 12:25

Re: Dedicate a partition for the whole system or separate it

Postby p.H » 2019-08-20 17:41

wizard10000 wrote:kill the swap partition, add a swapfile

Do think twice before doing that. Linux was designed to use raw block devices as swap space, and still is. Using swapfiles with Linux is a hack. A dirty one. It does not work natively on filesystems types which do not allow to map files to physical blocks, use copy-on-write, and so on ; making it work natively on some of them (NFS, Btrfs) has required heavy intrusive kernel patching. The only clean way to use a swap file would be through a loop device, which incurs a performance penalty.
p.H
 
Posts: 1084
Joined: 2017-09-17 07:12

Re: Dedicate a partition for the whole system or separate it

Postby CwF » 2019-08-20 18:53

When ports and drives are plentiful,
Code: Select all
root@sarah:/var/log#  blkid
/dev/mapper/sda5_crypt: UUID="BX....Q" TYPE="LVM2_member"
/dev/mapper/sarah--vg-root: UUID="10....0" TYPE="ext4"
/dev/sda1: LABEL="dvr" UUID="56....f" TYPE="ext4" PARTUUID="6ee26032-01"
/dev/sdb1: LABEL="pasture" UUID="26....7" TYPE="ext4" PARTUUID="48df53c9-01"
/dev/sdc1: LABEL="USB_POOL" UUID="E897-A125" TYPE="vfat"
/dev/sdd1: UUID="41....2" TYPE="ext2" PARTUUID="56854b99-01"
/dev/sdd5: UUID="e1....3" TYPE="crypto_LUKS" PARTUUID="56854b99-05"
/dev/sde1: LABEL="Media" UUID="D0....0" TYPE="ntfs" PARTUUID="dec171a6-01"
/dev/sdf1: LABEL="meadow" UUID="a8....6" TYPE="ext4" PARTUUID="fdcc92f3-01"
/dev/mapper/sarah--vg-swap: UUID="95....03" TYPE="swap"

I have flipped, and agree a dedicated swap partition is best when you need swap. In VM's I use no swap at all with memory ballooning available.
I don't partition at all, only for LVM purposes,
CwF
 
Posts: 443
Joined: 2018-06-20 15:16

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable