LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Best partition Layout (https://www.linuxquestions.org/questions/slackware-14/best-partition-layout-824444/)

Laodiceans 08-05-2010 03:51 PM

Best partition Layout
 
I hope this is not a repost.

What is the best partition layout?

The OS is in a SATA 200 GB Disk, USB_Drive is a external 500GB USB Drive, LVM have one drive with 2TB

Code:

/dev/sda1                      swap                                    swap        defaults                                    0  0
/dev/sda2                      /                                      ext3        defaults                                    1  1
/dev/sda3                      /home                                  ext3        defaults                                    1  2
/dev/disk/by-label/backup      /home/kerml/backup                      ext3        defaults                                    1  2
/dev/lvm_vg/Data                /home/kerml/Data                        ext3        defaults                                    1  2
/dev/disk/by-label/USB_Drive    /home/kerml/USB_Drive                  ext3        defaults                                    1  2

Code:

df -h

Filesystem            Size  Used Avail Use% Mounted on
/dev/root              29G  6.4G  21G  24% /
/dev/sda3            148G  60G  82G  43% /home
/dev/sdf1              74G  49G  22G  70% /home/kerml/backup
/dev/lvm_vg/Data      1.8T  1.6T  106G  94% /home/kerml/Data
/dev/sdg1            459G  197G  239G  46% /home/kerml/USB_Drive

I know this is not the ideal for a pc that works as home server.
Anyone suggest a new layout?

Lufbery 08-05-2010 04:09 PM

Do what you like, it's your computer. :D

For me, I find that separate /home and /root partitions are all I need. Everything else goes into /.

On my terabyte disk, / gets 100 GB, /root gets 150 GB, and /home gets all the rest (except for 150 GB dedicated to a Windows partition).

I'm actually thinking of shrinking the / and /root partitions because Slackware simply doesn't take that much space and I seldom have much except tarballs in the /root directory.

Regards,

GazL 08-05-2010 05:28 PM

Code:

PV                  VG    Fmt  Attr PSize  PFree 
/dev/mapper/lukssda5 rootvg lvm2 a-  306.41g 184.91g

Filesystem                  Size  Used Avail Use% Mounted on
/dev/rootvg/lvroot          504M  298M  181M  63% /
/dev/sda1                  3.9G  33M  3.7G  1% /boot
/dev/mapper/rootvg-lvusr    16G  7.3G  7.8G  49% /usr
/dev/mapper/rootvg-lvopt    504M  17M  462M  4% /opt
/dev/mapper/rootvg-lvvar    16G  297M  15G  2% /var
/dev/mapper/rootvg-lvtmp    504M  17M  462M  4% /tmp
/dev/mapper/rootvg-lvhome  7.9G  3.7G  3.9G  49% /home
/dev/mapper/rootvg-lvlocal  79G  77G  1.9G  98% /local
tmpfs                      2.0G    0  2.0G  0% /dev/shm

That's what mine looks like at the moment (ignore the silly size of /boot. It's that big for historic reasons)

Plenty of room left in the vg to expand any lvs when they need it. Trick to running with lvm is to not allocate everything at the start. Keep the space back and add it to your lvs as needed.


When I next get around to reworking it I'll most likely merge both /usr and /opt back into '/' but keep the rest the same.

There's no right answer though. it's all personal preference.

piratesmack 08-05-2010 06:43 PM

This is mine

Code:

PV        VG  Fmt  Attr PSize  PFree
/dev/sda2  myvg lvm2 a-  148.95g 86.95g


Filesystem            Size  Used Avail Use% Mounted on
/dev/myvg/root        9.9G  6.2G  3.3G 66%  /
/dev/mapper/myvg-home 50G  19G  29G  40%  /home
/dev/sda1            97M  19M  74M  21%  /boot
tmpfs                500M  140K  500M 1%  /dev/shm


zbreaker 08-05-2010 08:26 PM

I don't get too fancy myself. On any linux install besides a swap partition I go for a / and /home
only generally in the proportion of 30%/70% respective of disk space.

samac 08-06-2010 02:30 AM

I always keep an empty partition of the same size a my / partition. That way when a new version comes along I can do a fresh install and get it fully working before I swap over to my "working" system. i.e. / for 13.1 is currently sda3 for 13.0 it was sda1 and for 13.2/14.0 it will also be sda1. This way I always have a fully working backup system (as long as I don't get a hardware failure - then I have to use the XP laptop - yuch!).

samac

tronayne 08-06-2010 07:01 AM

I do it this way so I can do a clean install of a new release without having to copy everything off to another server or back up media (I just don't format the non-root partitions when doing the fstab part of the installation -- saves a whole lot of time and trouble):
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/root            9.2G  6.5G  2.3G  75% /
/dev/sda6              19G  1.5G  16G  9% /usr/local
/dev/sda7              19G  1.3G  17G  8% /opt
/dev/sda8              19G  195M  18G  2% /var/lib/mysql
/dev/sda9              19G  9.5G  8.0G  55% /var/lib/virtual
/dev/sda10            19G  2.4G  16G  14% /home
/dev/sda11            104G  7.6G  91G  8% /spares
tmpfs                1.5G    0  1.5G  0% /dev/shm
/dev/sda2              20G  17G  3.0G  85% /fat-c

Hope this helps some.

guanx 08-06-2010 10:30 AM

Put your least important partition to the innermost region (highest track numbers). The heads are nearest to the plate in this (dangerous) region.

I had my /usr/src destroyed under low air pressure because it's the last partition. Fortunately my /home is in the middle so it had no problem.

Dinithion 08-06-2010 05:55 PM

I have it like this
Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/root              14G  8,6G  4,5G  66% /
/dev/sda2              16G  10G  4,9G  67% /home
/dev/sdc1            148G  76G  65G  54% /mp3
/dev/sdc2            311G  218G  78G  74% /video
tmpfs                1009M    0 1009M  0% /dev/shm
/dev/sdb6              19G  12G  6,4G  64% /stuff
/dev/loop0            4,1G  4,1G    0 100% /media/cdrom0

I know, having sub-directories in / violates LSB or posix or whatever, but I'm lazy. I had mp3, video and stuff in /usr/local/ some time ago, but soon I got tired and symlinked to /, and eventually just ended up mounting them directly at the root.

And another thing, since guanx mentioned sectors. I wasn't aware that some sections were more likely to get corrupt, but the seek-time in the other region of the plate is less then on the inner part. Before I changed to SSD, I always had /home at the end. :)

qweasd 08-06-2010 07:55 PM

I agree with the people above: it's whatever floats your boat. For my own computer, I see no reason to separate / from /home, since instead of preventing one partition from overflowing, now I have to watch two, or three, or whatever, and space gets wasted at the same time. What I found really useful, though, is having at least two similarly sized partitions around, both ready for a GNU/Linux install (e.g., ext3 or ext4). The spare one can be used to test and possibly migrate to a different distribution, and also serves as a place for large temporary files (my Downloads folder links to that). Right now I actually have them on two different hard drives, which really simplified my last Ubuntu -> Slackware migration.


All times are GMT -5. The time now is 07:50 PM.