LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Partition recommendation (https://www.linuxquestions.org/questions/slackware-installation-40/partition-recommendation-726088/)

escaflown 05-14-2009 07:06 PM

Partition recommendation
 
Hello everyone,
I have 40 GB of free disk space on my hard drive that I would like to dedicate to Slackware. I am looking for some advices about the optimal partitioning strategy to adopt: size of /(root) partition, /usr, /home, ... Thanks!

fotoguy 05-15-2009 03:10 AM

This can be hard to define since everyone has different needs, and depending on what you are going to use this for. If you are using it to test and run different software, you might need a larger /(root) partition.

If you are using it for just general web surfing, checking you emails, keeping in contact with friends, you might not need such a large root partition and only need a small /home. If you download mp3 and videos, you will need a larger /home partition. If you are running just servers on it, your log files can become quite large quickly, so you may need to have /var/log on a separate partition and define a larger size for it.

khodeir 05-15-2009 03:31 AM

if i were you i would make /home 30G and /10G this is if u will use it as a Desktop

Vit77 05-15-2009 03:59 AM

I would create a swap partition, if there's still no one.
Usually it's recommended to have swap space at least as your RAM is.

Libu 05-15-2009 04:32 AM

I too would go with 10G for "/" and the rest for /home (and around 1G for swap, if you haven't already set that up.)
Usually a normal slackware installation would take up around 3-4G. And the rest of the space in / can be used for additional program installation. In case you run out of space on /, then you can repartition your /home and assign additional space to "/" as and when needed.

onebuck 05-15-2009 07:19 AM

Hi,

Quote:

Originally Posted by escaflown (Post 3541202)
Hello everyone,
I have 40 GB of free disk space on my hard drive that I would like to dedicate to Slackware. I am looking for some advices about the optimal partitioning strategy to adopt: size of /(root) partition, /usr, /home, ... Thanks!

As you can see by the example(s) below that '/' doesn't require that much when you create partitions for '/usr', '/var', '/home', and '/tmp'. Partition schemes are very personal but there are advantages to utilizing good layouts. You could move or create your '/home' at the end of the hdd space then if you need to re-size then use space from '/home' by shrinking then allocate a new partition space.

If you don't add a lot then your '/usr' could be squashed down a bit. This particular machine is a testbed so things have been generous for space allocation.

I hope this satisfies your post request.

Code:

:~# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf5b5f5b5

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        3824    30716248+  7  HPFS/NTFS
/dev/sda2            3825        4074    2008125  82  Linux swap
/dev/sda3            4075      10300    50010345  83  Linux
/dev/sda4          10301      60801  405649282+  5  Extended
/dev/sda5          10301      10425    1004031  83  Linux
/dev/sda6          10426      11671    10008463+  83  Linux
/dev/sda7          11672      12668    8008371  83  Linux
/dev/sda8          12669      12918    2008093+  83  Linux
/dev/sda9          12919      13915    8008371  83  Linux
/dev/sda10          13916      15161    10008463+  83  Linux
/dev/sda11          15162      16407    10008463+  83  Linux
/dev/sda12          16408      28856    99996561  83  Linux
/dev/sda13          28857      41305    99996561  83  Linux
/dev/sda14          41306      53754    99996561  83  Linux
/dev/sda15          53755      60801    56604996  83  Linux

Disk /dev/sdd: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xb2214719

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1  *          1        4981    40009851    7  HPFS/NTFS
/dev/sdd2            4982        9962    40009882+  83  Linux

:~# cfdisk /dev/sda

cfdisk (util-linux-ng 2.13.1)

                              Disk Drive: /dev/sda
                      Size: 500107862016 bytes, 500.1 GB
            Heads: 255  Sectors per Track: 63  Cylinders: 60801

    Name        Flags      Part Type  FS Type          [Label]        Size (MB)
 ------------------------------------------------------------------------------
    sda1        Boot        Primary  NTFS            [^C]            31453.48
    sda2                    Primary  Linux swap                        2056.32
    sda3                    Primary  Linux ext3      [/spare1]      51210.60
    sda5                    Logical  Linux ext3      [/]              1028.16
    sda6                    Logical  Linux ext3      [/home]        10248.70
    sda7                    Logical  Linux ext3      [/usr]          8200.61
    sda8                    Logical  Linux ext3      [/var]          2056.32
    sda9                    Logical  Linux ext3      [/tmp]          8200.61
    sda10                  Logical  Linux ext3                      10248.70
    sda11                  Logical  Linux ext3                      10248.70
    sda12                  Logical  Linux ext3                      102396.52
    sda13                  Logical  Linux ext3                      102396.52


~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5            966M  204M  713M  23% /
/dev/sda6            9.4G  745M  8.2G  9% /home
/dev/sda7            7.6G  3.9G  3.3G  55% /usr
/dev/sda8            1.9G  68M  1.8G  4% /var
/dev/sda9            7.6G  146M  7.0G  2% /tmp
/dev/sda1              30G  9.4G  20G  33% /mnt/winxp
tmpfs                884M    0  884M  0% /dev/shm
/dev/sdd2              38G  25G  11G  70% /media/Linux_Archive

~# cat /etc/fstab
/dev/sda2        swap            swap        defaults        0  0
/dev/sda5        /                ext3        defaults        1  1
/dev/sda6        /home            ext3        defaults        1  2
/dev/sda7        /usr            ext3        defaults        1  2
/dev/sda8        /var            ext3        defaults        1  2
/dev/sda9        /tmp            ext3        defaults        1  2
/dev/sda1        /mnt/winxp      ntfs-3g    umask=000        1  0
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0


H_TeXMeX_H 05-15-2009 07:41 AM

If you wanted maximum space efficiency you could just make one large partition. The downside is upgrades will be more difficult.

escaflown 05-16-2009 01:51 AM

I would like to thank you all for your advises. I'm going for 1 GB of swap with the configuration style proposed by onebuck. Thanks!!!

Toods 05-16-2009 03:35 AM

Instead of separate HD partition for /tmp, I create it in ram by having the following line in '/etc/fstab':

Code:

tmpfs    /tmp      tmpfs      defaults    0  0
I also use this for my Firefox disk cache to avoid lots of disk writes during browsing.

Bill.

escaflown 05-16-2009 04:46 PM

Quote:

Originally Posted by Toods (Post 3542592)
Instead of separate HD partition for /tmp, I create it in ram by having the following line in '/etc/fstab':

Code:

tmpfs    /tmp      tmpfs      defaults    0  0
I also use this for my Firefox disk cache to avoid lots of disk writes during browsing.

Bill.

Doesn't it slow down the system a little bit? You're taking out some of your RAM by doing that, right?

Toods 05-17-2009 02:37 AM

Quote:

Originally Posted by escaflown (Post 3543129)
Doesn't it slow down the system a little bit? You're taking out some of your RAM by doing that, right?

I understand that the default maximum size for 'tmpfs' is half of physical ram. I have half gig and never see any slow down nor use of 'swap'. I guess it depends how ram intensive one's application are. The only time I ran into any problem was compiling Firefox with PGO.

Bill.

onebuck 05-17-2009 07:22 AM

Hi,

You can always set the 'size' of the RAM that will be used by tmpfs;

Quote:

excerpt tmpfs wiki;

tmpfs is a file system that stores all files in virtual memory (meaning it will also use the swap space). It adjusts the actual memory size it uses to fit the files, so it doesn't used a fixed amount of memory. It allows to specify a maximum size with the size option when (re)mounting. The default size is half the available RAM.

It is mainly used to implement POSIX shared memory in Linux, by mounting a tmpfs file system on /dev/shm. It is also often mounted on /tmp, /var/tmp or some other personal tmp directory to increase performance of these often used directories. It is also used by udev (which mounts a tmpfs on /dev/).
Example usage

mounting a tmpfs on /tmp with max size of 512 Megabytes and permissions of 1777:

mount -t tmpfs tmpfs /tmp -o size=512M,mode=1777

the equivalent entry in the fstab

Read more: http://wiki.linuxquestions.org/wiki/...xzz0FlXWycT5&B


archtoad6 06-12-2009 10:04 AM

Any fixed partitioning scheme is inflexible. If you guess wrong about how your different filesystems will grow, you can have one running out of space while another has bytes to spare.

Have you considered LVM? (I assume that Slack can do LVM.)

H_TeXMeX_H 06-12-2009 10:43 AM

Quote:

Originally Posted by archtoad6 (Post 3571798)
Any fixed partitioning scheme is inflexible. If you guess wrong about how your different filesystems will grow, you can have one running out of space while another has bytes to spare.

Have you considered LVM? (I assume that Slack can do LVM.)

LVM does work with slackware. But, having one large partition is my solution ... no space wasted, and it's simple, and easy to recover from (LVM is more difficult).

archtoad6 06-14-2009 03:18 PM

Glad to know that (as I suspected) Slack has LVM.

No argument about simplicity and ease of recovery; my comment was offering an alternative to post #6 .


All times are GMT -5. The time now is 09:16 PM.