[PLUG] Configuring Dual SSD/spinning HD System

Dale Snell ddsnell at frontier.com
Sat Oct 24 00:05:18 UTC 2015


On Fri, 23 Oct 2015 14:21:50 -0700 (PDT), in message
alpine.LNX.2.11.1510231419540.1161 at localhost, Rich Shepard wrote:

>    The new system has a 60G SSD drive and a 750G WD Caviar Black
> drive. I've read enough to know that the SSD drive needs to be tuned
> to work well with linux (and I have a bookmarked Web page with
> explicit instructions and explanations for that). But, what I've not
> found to my satisfaction are 1) what file system(s) to use on each
> drive and 2) what partitions to put on the SSD.
> 
>    One forum thread suggested putting /, /boot, /bin, /etc, and /usr
> on the SSD drive since they have fewer writes than
> do /usr/local, /opt, /home, /var, and /tmp. The latter group go on
> the conventional, spinning HD.
> 
>    Another thread (on a Ubuntu forum) was by a user who had problems
> booting from the SSD; he could not partition it, IIRC.
> 
>    I'll be running only Slackware on this system (as I do on all my
> hosts), and I suspect that the distribution flavor makes no
> difference in selecting an appropriate file system (or two) and a
> partitioning scheme.
> 
>    All your suggestions and recommendations are eagerly awaited. :-)


First off, does Slackware have any recommendations?  If so, I'd
follow them first, then listen to what a bunch of crazies on the
'Net have to say.  :-)  That said, here's what I do:

First off, I'd have multiple partitions.  This nonsense of having
one partition to rule them all is just that, nonsense.  In my
case, I go so far as to use LVM.  I can have one logical volume to
hold /, and one to hold /home, /opt/ and /usr/local.  /boot goes
on a separate physical partition.  /tmp is in memory using tmpfs.
/var (and thus /var/tmp) goes on my rotating disk.  As I said,
that's how I set my system up, and it works quite nicely for me.
YMMV, of course.

Here's my basic setup, from lsblk:
(sdb is my SSD; sdc is my rotating medium hard drive)
NAME                           SIZE  TYPE MOUNTPOINT
sdb                          119.2G  disk 
├─sdb1                         512M  part /boot
├─sdb2                         8.1G  part [SWAP]
├─sdb3                          25G  part 
│ └─vg_Fedora-lv0_root.usr      15G  lvm  /
└─sdb4                        85.7G  part 
  ├─vg_Zothique-lv0_home        50G  lvm  /home
  ├─vg_Zothique-lv1_usr.local    8G  lvm  /usr/local
  └─vg_Zothique-lv2_opt          8G  lvm  /opt
sdc                          931.5G  disk 
└─sdc2                           8G  part /var

I could have simply gone with a regular partition for Fedora, but
when I originally set it up, I had /var as a separate partition on
the SSD.  Since that partition's now on the magnetic HD, there's
no need for the logical volume.  Ah well.  Live and learn.

"Tuning" the SSD.  It's possible to put the "discard" option in
your /etc/fstab, but that's not the best idea, IMO.  Not all SSDs
react well to that, including the Samsung that I've got.  Better
is to create a small script and store it in /etc/crontab.weekly.
It can be something as simple as this command:

    fstab --all

Or you can do something more elaborate:

    for partition in <you-partitions-here> ; do
        fstab $partitions
    done

That part's easy enough.  I set it up to run on a weekly basis,
since you don't want to run it too often -- it'll accelerate the
wear of the SSD.  If you're using LVM, as I am, you'll also want
to edit the /etc/lvm/lvm.conf file, and change "issue_discards=0"
to "issue_discards=1".

Now, if you want to have an encrypted disk, DON'T do it on your
SSD.  The discard/fstrim operation is a major security leak.  (You
can't scrub the file(s), either, since the SSD will automatically
write into an unused set of blocks.  Oops.)  So your best bet is
to run dm-crypt on your rotating magnetic media, and ignore the
SSD.  Again, IMO and YMMV.

Once you've made your configuration changes, you'll need to
rebuild your initramfs.  On my system, I ran "sudo dracut -f".  I
have no idea what Slackware would need.  Once initramfs is
rebuilt, re-boot the system and have fun.  :-)

Anyway, I hope this helps.

--Dale

-- 
I recall hearing that highly-classified data must be destroyed by
physically shredding the medium.  Yes, throw your disk drive in
the shredder!  (Just imagine the class of machinery required to
digest an RA81 HDA.)  -- Mark Wood on linux-kernel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20151023/be3bd493/attachment.asc>


More information about the PLUG mailing list