SSD & HDD with /var and /tmp Partitions

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read how to get help

SSD & HDD with /var and /tmp Partitions

Postby Jesse654 on Fri Dec 27, 2013 1:00 pm

After lots of SSD and partitions research, I installed LMDE MATE 64-bit, currently with UP6.

On sda, the SSD:
/boot
/
/home

On sdb, the HDD:
swap
tmpvar
data

tmpvar partition is used to house /tmp and /var (and hopefully the Firefox (currently 19.0) cache). The fstab section is:
Code: Select all
# /dev/sdb2
LABEL=tmpvar         /media/tmpvar         ext4   defaults      0   2
/media/tmpvar/tmp      /tmp               none   bind         0   0
/media/tmpvar/var      /var               none   bind         0   0

data partition is set up similarly for Documents, Downloads, etc.

I set up /tmp and /var after the install, so stuff went into /tmp and /var on the SSD during the install. When changing those partitions over to the HDD, I got an mdm error, not finding /var/lib/mdm, which I created. At the same time I:
Code: Select all
sudo chmod -v 0777 /tmp
which seemed to solve boot issues.

Here's the kicker: Mint's Update Manager did not work, so I ended up copying the original /tmp and /var to the new /tmp and /var or at least whatever could be copied via su; a message came up saying some files were special and could not be copied. This copying seems like a real sloppy way to do things (I take full blame!), but the Update Manager seems to load fine now.
Is/Was there a better way to do this? Can you see any potential problems in the future re /var? Do I just wait and see (*cringe*) ?

Also, in Firefox, I pointed
browser.cache.disk.parent_directory
to
/media/tmpvar/ffcache
but nothing seems to show up there (or in my home's .cache directory, where I thought FF's original cache was).
Any insight and guidance would be greatly appreciated.
(I have yet to load/configure nvidia, kde, UP7.)
Jesse654
Level 2
Level 2
 
Posts: 96
Joined: Thu Sep 02, 2010 8:04 pm

Linux Mint is funded by ads and donations.
 

Re: SSD & HDD with /var and /tmp Partitions

Postby Jesse654 on Tue Dec 31, 2013 4:18 pm

Hmm, no responses. I guess that's my fault for asking a bunch of vague questions. :) Also one of my links below might answer my OP.

Anyway, let me change gears here and post the process, links and commands I used in this SSD/HDD adventure in the hopes that it will be useful to others. This post is more of a research aid and not really a tutorial. Hold on to your hats, fellow *nixers, this post will be long!


Process

I wanted to get an SSD for speed and a large HDD for data storage. I had an old, small HDD which I disconnected, so this install was setup with two new drives. When I first started the installation, I entered all my information and setup the partitions on both drives (see list below). Then, about 30 seconds into the install, the installation program crashed with no error message--nothing. I retried, pointing the SSD partitions to the right places, and this time it worked. Later on when I booted into the working system, I found all the partitions I created, but the labels for boot, root and home (all on the SSD) did not seem to take. sudo e2label fixed that.

I wasn't sure which OS directories should go on the HDD. Beyond /tmp and /var, I thought perhaps /media, /mnt, /dev, /proc and /run. As far as I know, /dev, /proc and /run are special in-memory kernel specific directories. I read that /dev, /proc and /sys are virtual devices. And I reasoned that /media and /mnt hold their data on the devices being mounted. Some people like to separate /usr or /srv, but /usr is essential to the OS, holding most of the installed applications (with /opt possibly holding some too). /srv is reportedly used only for server systems. Everything else, other than swap, pure data and the aforementioned /tmp and /var, seemed best to put on the SSD.

Fair warning: I'm only as good as my research. I don't pretend to have all the answers here. In addition, research shows that some people disagree on which course to take (no surprise there) when there are multiple options (which there always are--this is a computer system we are talking about :) ). For example, some say put /home on the HDD and be done with it; others say /home should be on the SSD since it contains often read configuration files. Some say it's okay at this point to put a swap partition on an SSD (especially if SSD is all you have). And there are a lot of differences in opinion regarding scheduling (cfq v. noop v. deadline). The size of partitions, for data in particular, is really dependent upon how much the user feels he needs. Also I put both /tmp and /var into one partition, and I put all my data file directories into one partition as well; some people suggest splitting these to have a partition for each individual purpose. I thought that was a potential waste of space. So do the research, decide for yourself, and feel free to voice your preferences to any such issues. :)

What else...I had hoped there would be more SSD-HDD combo system info, but I found it more piecemeal. Also a lot of the web pages I found were a few years old. That's probably why newer pages were saying that SSDs were ok for swap and that file systems can handle SSD garbage collection now. Even though I'm not using a dual-boot Windows system, I found a couple good related links. See the web links section, below.


Files and Partitions

SSD - sda
Code: Select all
device  partition  label    size  fs    partition type
------  ---------  -----    ----  --    --------------
sda1    /boot      boot     128M  ext2  primary
sda2    /          root     10G   ext4  primary
--      extended   extpart  *     --    extended
sda5    /home      home     10G   ext4  logical
--      --         --       *     --    [empty space for future expansion]


HDD - sdb
Code: Select all
device  partition  label    size  fs    partition type
------  ---------  -----    ----  --    --------------
sdb1    swap       swap     256M  swap  primary
sdb2    tmpvar     tmpvar   8G    ext4  primary
--      --         --       100G  --    [empty space for future expansion]
--      extended   extpart  *     --    extended
sdb5    data       data     200G  ext4  logical
--      --         --       *     --    [empty space for future expansion]
* I set the extended partitions to use the rest of each disk. There is empty space for future expansion at the end of each disk too.

Since you can have at most four primary partitions, the first logical partition is always #5 (eg, sda5, sdb5). (This is true for the traditional MBR partition tables; GPT tables have all primary partitions. I use MBR.)

I used only 256M for swap since I have 2G memory with another 2G memory card waiting to be installed. I don't think I've ever used swap on this computer. If it is used, it is used very rarely. (Even on a very old computer of mine with only 512M RAM, swap is not used very much. I find the Linux kernel to be very efficient in that regard.)


Here are the mounted partitions as I write this.

cat /etc/mtab
Code: Select all
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=10240k,nr_inodes=247373,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=199484k,mode=755 0 0
/dev/disk/by-uuid/7e777cc9-83d2-4c14-8af3-9677588ec808 / ext4 rw,nodiratime,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered,discard 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=451380k 0 0
/dev/sda5 /home ext4 rw,nodiratime,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered,discard 0 0
/dev/sdb2 /media/tmpvar ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb2 /tmp ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb2 /var ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /media/data ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /home/nste/Documents ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /home/nste/Downloads ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /home/nste/Music ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /home/nste/Pictures ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /home/nste/Projects ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
/dev/sdb5 /home/nste/Videos ext4 rw,relatime,user_xattr,barrier=1,data=ordered 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
cgroup /dev/cgroup/cpu cgroup rw,relatime,cpu,release_agent=/usr/local/sbin/cgroup_clean 0 0
/dev/sdc1 /media/PATRIOT vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=utf8,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
"user_xattr,barrier=1,data=ordered" were added automatically. I checked
http://man7.org/linux/man-pages/man5/attr.5.html
and found that "user_xattr" is needed for extended user attributes to be used.
Re "barrier=1"
http://man7.org/linux/man-pages/man8/mount.8.html
says that "Write barriers enforce proper on-disk ordering of journal commits...[and] the ext4 filesystem enables write barriers by default."
Not sure about "data=ordered."
The PATRIOT on sdc1 is a flash drive.


Here is my file system table.

cat /etc/fstab
Code: Select all
# /etc/fstab: static file system information.
#
# <file system>                <mount point>   <type>  <options>                            <dump>  <pass>
proc                              /proc   proc   defaults                                 0   0
# /dev/sda1
UUID=db4ddd47-4d10-482c-871e-b46b653f120d   /boot   ext2   rw,errors=remount-ro,discard,relatime,nodiratime   0   0
# /dev/sda2
UUID=7e777cc9-83d2-4c14-8af3-9677588ec808   /      ext4   rw,errors=remount-ro,discard,relatime,nodiratime   0   1
# /dev/sda5
UUID=3cf91808-5468-42f1-9fd8-50fdbd0483ad   /home   ext4   rw,errors=remount-ro,discard,relatime,nodiratime   0   2

# /dev/sdb1
LABEL=swap            none               swap   sw            0   0

# /dev/sdb2
LABEL=tmpvar         /media/tmpvar         ext4   defaults      0   2
/media/tmpvar/tmp      /tmp               none   bind         0   0
/media/tmpvar/var      /var               none   bind         0   0

# /dev/sdb5
LABEL=data            /media/data            ext4   defaults      0   2
/media/data/Documents   /home/nste/Documents   none   bind         0   0
/media/data/Downloads   /home/nste/Downloads   none   bind         0   0
/media/data/Music      /home/nste/Music      none   bind         0   0
/media/data/Pictures   /home/nste/Pictures      none   bind         0   0
/media/data/Projects   /home/nste/Projects      none   bind         0   0
/media/data/Videos      /home/nste/Videos      none   bind         0   0
On /boot, root and /home, I added discard, relatime, and nodiratime because they are on the SSD; the other options were added automatically during install.

For tmpvar and data, I decided to link the various directories here in the fstab. The "bind" option allows one to mount part of a partition to a second location. Research shows that the same effect can be had via symbolic links (see web links, below). Note that mtab, above, does not show the full path to these locations.



cat /etc/udev/rules.d/60-schedulers.rules
Code: Select all
#from:
#https://wiki.archlinux.org/index.php/Solid_State_Drives#Using_udev_for_one_device_or_HDD.2FSSD_mixed_environment

# set deadline scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"

# set cfq scheduler for rotating disks; not necessary with the standard kernel
#ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"
I noted in the rule file itself where I got this info (Arch wiki) and commented out the unnecessary default line for HDD (rotational) drives. (No doubt the standard kernel they are referring to in the wiki is the standard Arch kernel.) As you can see, the SSD uses the "noop" scheduler. The SSD is indicated as a non-rotational drive, i.e., rotational=="0". From what I read, I felt this was the best option; other opinions vary. There are also other places and ways to set up the scheduler; see the web links, below.



Web Links

Note: A couple web pages (with otherwise useful information) make the mistake of confusing / which is the "root" directory with /root which is the root user's home directory.

Of course, Wikipedia is a great place to start any research endeavor. Check out entries for:

Disk partitioning
http://en.wikipedia.org/wiki/Disk_partitioning

Master boot record
http://en.wikipedia.org/wiki/Master_Boot_Record

SSD
http://en.wikipedia.org/wiki/Ssd

Hard disk drive
http://en.wikipedia.org/wiki/Hard_drive

---

Solid State Drives - ArchWiki
https://wiki.archlinux.org/index.php/Solid_State_Drives#I.2FO_Scheduler
This section is on the scheduler, but the whole page gives good, general info on SSDs. It was referred to by a couple places I looked.
Includes how to tell if SSD supports TRIM.
Dated: 23 December 2013

Partitioning - ArchWiki
https://wiki.archlinux.org/index.php/Partitioning
For those who need a refresher in basic partitioning terms, this is good. Also it gives reasons why directories such as /boot, /home, /var, /tmp are good candidates for separate partitions. Gives recommended sizes for some partitions (although this is highly debatable wherever you look).
Dated: 11 December 2013

---

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&p=72906#p72906
The venerable Fred thread from the venerable Fred. Definitely a great place to start. Read the first post. Read some other posts on this thread, detailed below, as you see fit.
Dated: Sun Apr 27, 2008

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&p=72906#p78203
GuttaMan talks of separate /usr, /opt, and /var folders. Fred calls it over-kill but ok.
Dated: Sat May 17, 2008

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=120#p151224
Fred tells how to change permissions on a Data directory.
Dated: Sat May 16, 2009

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=140#p154592
richyrich gives some links to Linux Guides (which I didn't get to read).
Dated: Sat May 30, 2009

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=160#p165936
Fred instructs on how to rsync a backup of a partition.
Dated: Thu Jul 02, 2009

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=160#p184792
Muzer contrasts various parts of the Linux and Windows file systems.
Dated: Mon Aug 31, 2009

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=200#p277779
hinto gives swap size hints for using VMs.
Dated: Fri May 21, 2010

Linux Mint Forums • View topic - Considerations before you install
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=220#p306772
http://forums.linuxmint.com/viewtopic.php?f=90&t=11872&start=220#p340508
vincent contrasts suspend (ACPI S3) with hibernate (ACPI S4) and the swap space needed for each;
he also says that virtual hard drives (.vdi) are stored within your /home partition.
Dated: Sun Aug 15, 2010; Sat Nov 13, 2010

---

Auto Mount Partitions on Boot (also Windows partitions)
http://forums.linuxmint.com/viewtopic.php?f=42&t=22093
Another venerable Fred thread. Again read the first post and others as needed.
Dated: Fri Feb 13, 2009

Auto Mount Partitions on Boot (also Windows partitions)
http://forums.linuxmint.com/viewtopic.php?f=42&t=22093&start=20#p203253
Fred's way to mount a partition to a directory within /home via symbolic links.
Dated: Sun Nov 01, 2009

Auto Mount Partitions on Boot (also Windows partitions)
http://forums.linuxmint.com/viewtopic.php?f=42&t=22093&start=20#p203259
altair4's post where I got the "bind" idea from: mount to a directory within a partition via fstab (the alternative to Fred's way via links).
Dated: Sun Nov 01, 2009

Auto Mount Partitions on Boot (also Windows partitions)
http://forums.linuxmint.com/viewtopic.php?f=42&t=22093&start=60#p262707
altair4 explains NTFS permissions when setting up a Linux partition; see next two links also.
Dated: Tue Apr 06, 2010

Auto Mount Partitions on Boot (also Windows partitions)
http://forums.linuxmint.com/viewtopic.php?f=42&t=22093&start=100#p646212
altair4 updates explanation of NTFS permissions when setting up a Linux partition.
Dated: Fri Nov 09, 2012

Auto Mount Partitions on Boot (also Windows partitions)
http://forums.linuxmint.com/viewtopic.php?f=42&t=22093&start=100#p749493
MagicMint gives his NTFS permissions here.
Dated: Sun Aug 04, 2013

---

Linux Mint Forums • View topic - SSD: fstab for ext4 + multiple logical partitions
http://forums.linuxmint.com/viewtopic.php?f=90&t=101810&p=578163
TRIM/discard; tmpfs options; system wide scheduler via grub. Warning: This sets the scheduler on all drives; for individual drives, consider the udev rules option given in the Arch wiki.
Dated: Thu May 10, 2012

Linux Mint Forums • View topic - Partitioning and installing on an SSD
http://forums.linuxmint.com/viewtopic.php?f=46&t=116103
Says SSD needs partitions aligned to 1 MiB boundaries. This is the default in most partition managers now. Also swap size help.
Dated: Fri Nov 02, 2012

Linux Mint Forums • View topic - Help with ssd
http://forums.linuxmint.com/viewtopic.php?f=90&t=79503#p461796
Scheduler in grub; how to tell if SSD supports TRIM; setting up a tmpfs /tmp partition and directing Firefox's cache to it, good if you have plenty of RAM.
Dated: Tue Aug 16, 2011

Enable TRIM On SSD (Solid-State Drives) In Ubuntu For Better Performance ~ Web Upd8: Ubuntu / Linux blog
http://www.webupd8.org/2013/01/enable-trim-on-ssd-solid-state-drives.html
Includes how to tell if SSD supports TRIM, using discard, using a daily cron job for TRIM, and the extra steps needed for encrypted partitions.
Dated: 15 Jan 2013

print ('Random geek stuff');: Tweaks
http://dustiesblog.blogspot.dk/search/label/Tweaks
Says most distros use "relatime" by default, negating some of the writes, so using "noatime" is not an absolute must. Strongly suggests leaving journaling on and using trim if your SSD supports it. Includes good info on tmpfs.
Dated: December 22, 2012

Debian Bug report logs - #630615
RAMTMP should default to no
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630615#50
Compares three possible setups for /tmp.
Dated: 15 Jun 2011

Linux Mint Forums • View topic - How To: Partition your Hard Drive.
http://forums.linuxmint.com/viewtopic.php?p=83999#p83999
Another take on how to partition your HD and suggestions for various system directories.
Dated: Wed Jun 11, 2008

Linux Mint LMDE on Hybrid Disk Laptop | Flexion.Org
http://flexion.org/posts/2013-08-linux-mint-lmde-on-hybrid-disk-laptop.html
A quick tutorial on the LMDE installer using the advanced /target option. Note: The installer fix mentioned has already been fixed.
Dated: 28 August 2013

How to maximise SSD performance with Linux
http://apcmag.com/how-to-maximise-ssd-performance-with-linux.htm
Discourages 'relatime' and suggests 'noatime,nodiratime,discard', deadline scheduler, swap on HDD, and tmpfs for /tmp and a few /var directories.
Also has the Firefox cache movement hint and even suggests you might want it in /tmp. If /tmp is on a tmpfs, you will lose it between boots. Says to align SSD partitions on 1MB boundaries.
Dated: 06 March 2012

Debian User Forums • View topic - Using an SSD as a boot device in Debian
http://forums.debian.net/viewtopic.php?f=16&t=76921
Suggests /home and swap on HDD and linking data files to directories under the user's home directory. Suggests moving log files to RAM disk if you have enough memory, but warns that they will be removed between boots. Also says the .cache directory under the user's home directory should go onto the HDD. (This sounds right to me; it is something I will do.)
Dated: 2012-03-07

Debian User Forums • View topic - SSD + HDD partition sanity check
http://forums.debian.net/viewtopic.php?t=92563
The OP puts all but /var, /tmp and /home on SSD. (Sound familiar?) But he creates separate partitions for each. Sizes for those partitions are then discussed.
Dated: 2013-01-13

Filesystem and partitioning for SSDs on Linux - Server Fault
http://serverfault.com/questions/351678/filesystem-and-partitioning-for-ssds-on-linux
Answers say you don't have to treat an SSD any different from an HDD except perhaps for ram-based filesystems or swap space; says to align SSD partitions on 4MiB boundaries.
Dated: Jan 19 '12

Linux Mint Forums • View topic - [SOLVED] ssd + hdd: move /var to hdd
http://forums.linuxmint.com/viewtopic.php?f=18&t=81910
Hey, this might actually answer my OP. I guess I did the research just not enough of the reading! :) Also tells you that SSD quality has improved, so don't be paranoid about doing writes to an SSD.
Dated: Thu Sep 22, 2011

A Good SSD/HDD Partitioning Scheme « $ cat /dev/blog
http://catdevblog.nickbair.net/2010/10/30/a-good-ssdhdd-partitioning-scheme/
Another take on how to partition your HDD and SSD and suggestions for various system directories. Says, "Rather than complicate matters by partitioning subdirectories of /home, it is more sensible to create a separate /home partition on the HDD and be done with it."
Dated: October 30, 2010

Manual disk partitioning guide for Linux Mint Debian | LinuxBSDos.com
http://www.linuxbsdos.com/2012/04/25/manual-disk-partitioning-guide-for-linux-mint-debian/
Gives many screenshots of gparted for LMDE partitioning. A good step-by-step visual aid for those that appreciate such tutorials. (Also it confirms what I thought about installing grub to /dev/sda: Choosing sda (or sdb, whatever) without a number indicates grub will go into the MBR. That was never totally clear to me.)
Dated: April 25, 2012

Linux Mint Forums • View topic - How to install with manual partitioning
http://forums.linuxmint.com/viewtopic.php?f=42&t=122276
xenopeek's recent take on partitioning, an example with a clean 250G HD with plenty of screenshots and suggestions for partition sizes.
Dated: Wed Jan 09, 2013

[Phoronix] Linux I/O Scheduler Comparison On The Linux 3.4 Desktop
http://www.phoronix.com/scan.php?page=article&item=linux_iosched_2012&num=1
This graphs the results of several tests and compares cfq v. noop v. deadline in a HDD and two SSDs for desktop usage. Their conclusion: "For most workloads, the Completely Fair Queuing (CFQ) scheduler tended to be the best Linux I/O scheduler overall for these HDD and SSD systems." My take: A lot of the tests were really close. How do these tests compare with real desktop usage?
Dated: 11 May 2012

Linux Mint Forums • View topic - Fresh install SSD partitions?
http://forums.linuxmint.com/viewtopic.php?f=90&t=96567
xenopeek says he wouldn't turn off ext4 journaling since it risks data loss.
Dated: Wed Mar 07, 2012

Install and Optimize Linux Mint on a Solid State Drive - Linux Mint Community
http://community.linuxmint.com/tutorial/view/293
Options for ext4 on SSD including how to turn off journaling.
Dated: Created: 3 years ago.

Karel Zak's blog: bind mounts, mtab and read-only
http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html
Karel Zak (who helped improve blkid) writes an advanced topic that shows that there are three layers (hardware device -> FS -> VFS), and that a file system can be read-only via an option on any of those layers. It all depends on how you mount/remount the partition.
Dated: Wednesday, April 20, 2011



Commands

Of course, internet search, info pages and man pages are your friends. :) Here are some commands I found useful:

Code: Select all
free -m
Displays free and used memory; -m option puts numbers in megs.

Code: Select all
df -h
Reports disk space usage on the various devices and where they are mounted; -h gives human readable numbers, eg, in megs and gigs.

Code: Select all
sudo e2label
Changes the label on an ext2/ext3/ext4 filesystem.

Code: Select all
sudo tune2fs -l /dev/sda1
tune2fs can adjust filesystem parameters on ext2/ext3/ext4 filesystems; the -l (lowercase "el") option lists all the current values of the parameters that can be adjusted with this tool; that includes the UUID and the label (volume name) of the given device.

Code: Select all
sudo blkid
Shows the attributes for all the block devices, including the label, UUID and file system type; SSD and HDD partitions don't necessarily need to be mounted for this to work.

Code: Select all
cat /proc/partitions
cat /proc/self/mountinfo
ls -l /dev/disk/by-uuid
ls -l /dev/disk/by-id
ls -l /dev/disk/by-label
ls -l /dev/disk/by-path
None of these need sudo privileges to run. Check them out to find various device and partition info.

Code: Select all
cat /sys/block/sda/queue/scheduler
cat /sys/block/sdb/queue/scheduler
cat /sys/block/sdc/queue/scheduler
The scheduler in use for the specified device (sda, sdb, sdc) is in square brackets. Use these as a check after creating
/etc/udev/rules.d/60-schedulers.rules
and rebooting your system.


Bootup and Shutdown Times for SSD-only v. SSD/HDD Combo v. HDD-only

I calculate bootup times from a cold boot to a working DE. A working DE to me means one is able to use the desktop. If the hard drive isn't grinding away and slowing down the system (which happens only on the very old machines with very old hard drives), then the DE is usable when the menu can be clicked and appears. Shutdown is calculated from clicking the main menu, clicking the Quit/Shutdown sequence of buttons to when the box turns off.

bootup: 0:46
shutdown: 0:10

I found no real difference between SSD-only v. SSD/HDD combo. The SSD only was done before I had the /tmp and /var partitions set up on the HDD; they were still being used on the SSD.

Compare this to my last, HDD-only system, the unofficial LMDE KDE (a little bit of apples-to-oranges re the DE, but still somewhat comparable):
bootup: 1:42
shutdown: 0:14

So comparing in seconds:
bootup: 46/102 = 45% ==> SSD/HDD 2.2x faster bootup than HDD alone
shutdown: 10/14 = 71% ==> SSD/HDD 1.4x faster shutdown than HDD alone

Actually, come to think of it, the HDD that the KDE system is on is an 11 year old HD, so...


Conclusion and Future Plans

Still need to setup nvidia, KDE, UP7 and all the little things I like on my system. Maybe I'll try to do another install using the advanced /target option in the installation program. That's probably the "proper" way to set up a /tmp and /var on a separate drive. I certainly have enough space on the drives to do it.

I still have questions:
Does /boot need to be checked (via pass 2 in fstab)? Based on other installs, I think the answer is no.
Should I use "noexec" on /home or /data or other partitions?
Do I dare try noauto on /boot? That seems like an advanced option where you need to remember you set it so you can unset it if you update your kernel.
Is ECC disabled in my BIOS? I have to check. I saw some error message, perhaps when I did dmesg | less. Ok, I just did dmesg | grep -i ecc and saw it is desabled. I need to check my BIOS.
Why was I getting a command-not-found error in my error messages when I was logged in at the console?
Are /tmp and /var the only system directories that have high churn rates, or are there other good candidate for the HDD?
Where's the cache for Thunderbird, and how do I change it (internet search is my friend... :) )?
Why does Firefox Preferences | Advanced | Network | Cached Web Content no longer show how much cache is being used now that I (supposedly) changed the cache location? It still gives the Clear Now button.

Conclusions? It's a lot of reading, a lot of learning, then just doing it (or trying to do it) if you dare! I like to learn, though, so it's a fun process. Enjoy.

Happy New Year to the Linux Mint Community and beyond!
Happy New Systems to people trying this stuff out.
Jesse654
Level 2
Level 2
 
Posts: 96
Joined: Thu Sep 02, 2010 8:04 pm

Re: SSD & HDD with /var and /tmp Partitions

Postby tearlach2 on Tue Feb 18, 2014 9:56 am

Thank you for this post. I'm doing this very thing in xfceDebian and this was a wonderful refresher on flags and schedulers and you have given me much to read.
tearlach2
Level 1
Level 1
 
Posts: 1
Joined: Thu May 30, 2013 9:15 pm

Re: SSD & HDD with /var and /tmp Partitions

Postby Jesse654 on Thu Feb 20, 2014 8:55 am

Thanks for your post. This thread has several hundred views (other people's threads go into the thousands or tens of thousands), but, of course, I cannot tell how many people are actually helped by my verbose style of writing. And one could probably just google (or duckduckgo) that same info anyway.

Again, thanks for your feedback. I appreciated it.
Jesse654
Level 2
Level 2
 
Posts: 96
Joined: Thu Sep 02, 2010 8:04 pm


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 2 guests