Suggestions on Partitions and Mounts for Solid State Disk Drive

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggestions on Partitions and Mounts for Solid State Disk Drive

Samba - linux mailing list
    Hi,

I have been reviewing partitions and mounts for a 500 GB Solid State
Disk Drive.

If you are into this kind of thing, please reply with your comments. I
would be particularly interested in comments about partition sizing. I
usually take the lazy way out and format a single '/' partition, so I
am not sure about allocating sizes.

If you have any tips on OS configuration for SSD's, I would be
interested in learning.

My final solution may end up being a combination of a SSD and a HD due
to a) I have a 2TB HD, b) cheaper for great space, c) I could leave
out noatime.

Below are my current settings for a single 500 GB Solid State Disk
Drive laptop on which I would support one or more virtual machines
using qemu-kvm.

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       8.2G  283M  7.5G   4% /
udev             10M     0   10M   0% /dev
tmpfs           2.0G  8.9M  2.0G   1% /run
/dev/sda7        19G  3.5G   14G  20% /usr
tmpfs           4.8G   80K  4.8G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.8G     0  4.8G   0% /sys/fs/cgroup
/dev/sda3       2.7G  245M  2.3G  10% /var
/dev/sda6       360M  2.1M  335M   1% /tmp
/dev/sda9       342G   69M  324G   1% /home
/dev/sda8        92G   60M   87G   1% /var/lib/libvirt
tmpfs           979M  4.0K  979M   1% /run/user/117
tmpfs           979M  8.0K  979M   1% /run/user/1000

----------------------------------------

Device     Boot     Start        End    Sectors  
Size Id Type
/dev/sda1  *         2048   17577983   17575936   8.4G
83 Linux
/dev/sda2        23439358 1048573951 1025134594 488.8G  5
Extended
/dev/sda3        17577984   23437311    5859328   2.8G
83 Linux
/dev/sda5        23439360   64395263   40955904  19.5G 82
Linux swap / Solaris
/dev/sda6        64397312   65175551     778240   380M
83 Linux
/dev/sda7        65177600  104237055   39059456  18.6G 83
Linux
/dev/sda8       125724672  321034239  195309568  93.1G 83
Linux
/dev/sda9       321036288 1048573951  727537664 346.9G 83 Linux
--------------------------
#               
# / was on /dev/sda1 during installation
UUID=f4ac944a-931e-4266-8a98-d4e4746cd733
/               ext4   
errors=remount-ro,defaults,noatime,nosuid 0       1
# /home was on /dev/sda9 during installation
UUID=4cc155f3-ddeb-4215-8eb4-f49dfef8a260 /home          
ext4    defaults,noatime,nosuid,nodev,noexec       
0       2
# /tmp was on /dev/sda6 during installation
UUID=f55d8d39-152b-4fef-bd54-f5caf2c88294 /tmp           
ext4    defaults,noatime,nosuid,noexec,nodev       
0       2
# /usr was on /dev/sda7 during installation
UUID=0e790f53-4382-4098-90ce-cabc78121d6f /usr           
ext4    defaults,noatime,nodev        0       2
# /var was on /dev/sda3 during installation
UUID=49df0494-213e-43a7-a4f5-70f1c2f241dc /var           
ext4    defaults,noatime,nosuid,nodev,noexec       
0       2
# /var/lib/libvirt was on /dev/sda8 during installation
UUID=6d24d6e4-5a0c-48d2-8fe8-830a3bb0fcbe /var/lib/libvirt ext4   
defaults,noatime,nosuid,nodev,noexec        0       2
# swap was on /dev/sda5 during installation
UUID=2bd1a149-7847-48fe-bfe8-f8b7623b7c38 none           
swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660
user,noauto     0       0

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: Suggestions on Partitions and Mounts for Solid State Disk Drive

Samba - linux mailing list
I'll bite. :-)

As there a reason you're wanting to use plain partitions rather than using
LVM?

Generally, I'd have a smallish /boot partition on sda1, then sda2 would be
the rest of the disk as a PV. Then all the various mounts would be LVs
which can be easily resized as the need arises.

The one aspect I don't know about is how using SSDs changes things.
However, using LVM means you can transparently migrate between SSD and
spinning rust.

Using LVM means what partition sizes you use is less critical.

Andrew


On 26 Mar 2017 14:46, "George at Clug via linux" <[hidden email]>
wrote:

    Hi,

I have been reviewing partitions and mounts for a 500 GB Solid State
Disk Drive.

If you are into this kind of thing, please reply with your comments. I
would be particularly interested in comments about partition sizing. I
usually take the lazy way out and format a single '/' partition, so I
am not sure about allocating sizes.

If you have any tips on OS configuration for SSD's, I would be
interested in learning.

My final solution may end up being a combination of a SSD and a HD due
to a) I have a 2TB HD, b) cheaper for great space, c) I could leave
out noatime.

Below are my current settings for a single 500 GB Solid State Disk
Drive laptop on which I would support one or more virtual machines
using qemu-kvm.

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       8.2G  283M  7.5G   4% /
udev             10M     0   10M   0% /dev
tmpfs           2.0G  8.9M  2.0G   1% /run
/dev/sda7        19G  3.5G   14G  20% /usr
tmpfs           4.8G   80K  4.8G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           4.8G     0  4.8G   0% /sys/fs/cgroup
/dev/sda3       2.7G  245M  2.3G  10% /var
/dev/sda6       360M  2.1M  335M   1% /tmp
/dev/sda9       342G   69M  324G   1% /home
/dev/sda8        92G   60M   87G   1% /var/lib/libvirt
tmpfs           979M  4.0K  979M   1% /run/user/117
tmpfs           979M  8.0K  979M   1% /run/user/1000

----------------------------------------

Device     Boot     Start        End    Sectors
Size Id Type
/dev/sda1  *         2048   17577983   17575936   8.4G
83 Linux
/dev/sda2        23439358 1048573951 1025134594 488.8G  5
Extended
/dev/sda3        17577984   23437311    5859328   2.8G
83 Linux
/dev/sda5        23439360   64395263   40955904  19.5G 82
Linux swap / Solaris
/dev/sda6        64397312   65175551     778240   380M
83 Linux
/dev/sda7        65177600  104237055   39059456  18.6G 83
Linux
/dev/sda8       125724672  321034239  195309568  93.1G 83
Linux
/dev/sda9       321036288 1048573951  727537664 346.9G 83 Linux
--------------------------
#
# / was on /dev/sda1 during installation
UUID=f4ac944a-931e-4266-8a98-d4e4746cd733
/               ext4
errors=remount-ro,defaults,noatime,nosuid 0       1
# /home was on /dev/sda9 during installation
UUID=4cc155f3-ddeb-4215-8eb4-f49dfef8a260 /home
ext4    defaults,noatime,nosuid,nodev,noexec
0       2
# /tmp was on /dev/sda6 during installation
UUID=f55d8d39-152b-4fef-bd54-f5caf2c88294 /tmp
ext4    defaults,noatime,nosuid,noexec,nodev
0       2
# /usr was on /dev/sda7 during installation
UUID=0e790f53-4382-4098-90ce-cabc78121d6f /usr
ext4    defaults,noatime,nodev        0       2
# /var was on /dev/sda3 during installation
UUID=49df0494-213e-43a7-a4f5-70f1c2f241dc /var
ext4    defaults,noatime,nosuid,nodev,noexec
0       2
# /var/lib/libvirt was on /dev/sda8 during installation
UUID=6d24d6e4-5a0c-48d2-8fe8-830a3bb0fcbe /var/lib/libvirt ext4
defaults,noatime,nosuid,nodev,noexec        0       2
# swap was on /dev/sda5 during installation
UUID=2bd1a149-7847-48fe-bfe8-f8b7623b7c38 none
swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660
user,noauto     0       0

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: Suggestions on Partitions and Mounts for Solid State Disk Drive

Samba - linux mailing list
On 26 March 2017 at 18:35, Andrew Steele via linux
<[hidden email]> wrote:
> I'll bite. :-)

metoo.

> As there a reason you're wanting to use plain partitions rather than using
> LVM?
>
> Generally, I'd have a smallish /boot partition on sda1, then sda2 would be
> the rest of the disk as a PV. Then all the various mounts would be LVs
> which can be easily resized as the need arises.

In a similar fashion to the advice of LVM have you considered running
file based swap in order to reduce the number of partitions?

I changed to this many years ago due to needs of {in,de}creasing swap
on the fly. At the time it was on 500+ core linux clusters that were
running variable size jobs. Since then I've also started doing this on
laptops/desktops, the installer will gripe about no swap partition but
just ignore that. There is no noticeable speed penalty in all the
testing we've done, recipe for doing this is below:

# 4GB file based swap
dd if=/dev/zero of=/4GB-swap-00 bs=1M count=4096
mkswap /4GB-swap-00
swapon /4GB-swap-00

echo >> /etc/fstab
echo "# Swap file" >> /etc/fstab
echo "/4GB-swap-00  none  swap  sw  0 0" >> /etc/fstab

Note that when doing this you can have multiple swap files and just
add/remove them as you choose, you can even mix/match swap
partitions and files. If you are cautious you can flush the
file cache before adding/removing:

# to clear file cache (if you want)
sync
echo 3 > /proc/sys/vm/drop_caches
echo 0 > /proc/sys/vm/drop_caches

I myself typically don't run LVM and only run with two partitions on both
clusters and desktops/laptops, / and /tmp with TMPDIR set to /tmp.
Makes for simple management, home dirs and data are all via NFS
or on a separate disk. The only time I run a separate /boot partition is
to get around storage driver issues.

I'm surprised that the major distros don't use swap files over
partitions, it makes the install simpler.


a

--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux
Reply | Threaded
Open this post in threaded view
|

Re: Suggestions on Partitions and Mounts for Solid State Disk Drive

Samba - linux mailing list
On 26/03/17 20:52, Andrew Janke via linux wrote:
> On 26 March 2017 at 18:35, Andrew Steele via linux
> <[hidden email]> wrote:
>> I'll bite. :-)
>
> metoo.

metoo as well...

Generally I don't think you need to think of SSDs as being all that
different to HDDs.

However, if you have one of each, you can mirror your important stuff
using RAID 1. You can even set up the RAID so that it "writes-mostly"
to the HDD, meaning almost all of the read activity will prefer the
SSD - FTW (actually, my measurements have only seen a marginal
improvement in overall R/W performance using "write-mostly", vs. just
letting the RAID system decide for itself how to schedule reads).

As per Andrew Steele, I use LVM, mainly because I use a lot of LXC
containers, and LVM is great at keeping their stuff separate (mainly,
in this case, a form of enforced quota per container).

However, I also use NFS to mount home dirs (as per Andrew Janke) - the
file server serving the home dirs also mirror's between SSD and HDD
and uses drdb to keep another copy on a different box (in real time).

As for swap, I still use a (smaller) swap partition, then augment it,
if/when required with a swap file.

Hope this helps,

Bob Edwards.

>
>> As there a reason you're wanting to use plain partitions rather than using
>> LVM?
>>
>> Generally, I'd have a smallish /boot partition on sda1, then sda2 would be
>> the rest of the disk as a PV. Then all the various mounts would be LVs
>> which can be easily resized as the need arises.
>
> In a similar fashion to the advice of LVM have you considered running
> file based swap in order to reduce the number of partitions?
>
> I changed to this many years ago due to needs of {in,de}creasing swap
> on the fly. At the time it was on 500+ core linux clusters that were
> running variable size jobs. Since then I've also started doing this on
> laptops/desktops, the installer will gripe about no swap partition but
> just ignore that. There is no noticeable speed penalty in all the
> testing we've done, recipe for doing this is below:
>
> # 4GB file based swap
> dd if=/dev/zero of=/4GB-swap-00 bs=1M count=4096
> mkswap /4GB-swap-00
> swapon /4GB-swap-00
>
> echo >> /etc/fstab
> echo "# Swap file" >> /etc/fstab
> echo "/4GB-swap-00  none  swap  sw  0 0" >> /etc/fstab
>
> Note that when doing this you can have multiple swap files and just
> add/remove them as you choose, you can even mix/match swap
> partitions and files. If you are cautious you can flush the
> file cache before adding/removing:
>
> # to clear file cache (if you want)
> sync
> echo 3 > /proc/sys/vm/drop_caches
> echo 0 > /proc/sys/vm/drop_caches
>
> I myself typically don't run LVM and only run with two partitions on both
> clusters and desktops/laptops, / and /tmp with TMPDIR set to /tmp.
> Makes for simple management, home dirs and data are all via NFS
> or on a separate disk. The only time I run a separate /boot partition is
> to get around storage driver issues.
>
> I'm surprised that the major distros don't use swap files over
> partitions, it makes the install simpler.
>
>
> a
>


--
linux mailing list
[hidden email]
https://lists.samba.org/mailman/listinfo/linux