2

I want advice on how to setup partitions on a new desktop system that I'll (initially) put Ubuntu 11.04 on. The system will have the following storage hardware:

  • 1 x 80 GB SSD (Intel 320 series)
  • 2 x 2 TB HDD (green, 64 MB cache, 5400 rpm, SATA-600)

I'm going to use the system to typeset with LaTeX, to watch movies, to listen to music, to edit images and graphics, to surf the web, as firewall for my LAN and as file and backup server for a laptop (it will sometimes need to be on for days). Some of the data I'm going to keep on it is really valuable so I'm not giving priority to speed over reliability or security. Also, I want to avoid unnecessary wear on the SSD.

The setup I'm considering is the following:

  • Have the SSD as boot partition, format it as ext4 (does ext4 work well with SSDs?) and mount it at /. Backup from the SSD will be handled by having sbackup scheduled to backup chosen files to the HDDs.
  • Put the HDDs in RAID-1, mostly for reliability, format them as ext4 (for reliability and ability to recover from corruption) and mount it somewhere, maybe /home/archive (what is the correct mount point according to convention?). Backup for these HDDs will simply be having them in RAID-1. Also, I'll keep the swap (how big?) on these HDDs.

I'm thinking that I should take measures to reduce wear on the SSD by mounting it with the flags noatime and discard and keep the swap on the HDDs (the system will have 4 GB RAM but I want to be able to hibernate). To further handle what goes on the SSD and what goes on the HDDs I'm thinking about using symlinks (e.g. symlink ~/Videos to the HDDs). I should say something about the needed storage capacity too. What I plan to initially put on the HDDs is ~400 GB.

My question: Is there anything in the setup that I'm considering that I should change given the mentioned hardware and the mentioned usage of the system? Or more generally: How should I setup my partitions given my hardware setup and how I want to use the system?

N.N.
  • 18,589

2 Answers2

3

Raid is not backup. The purpose of raid1 is to keep the system up and running, instead of having to restore from backup when a drive fails. You still need to keep regular backups. Raid1 does not help if your filesystem becomes corrupted, or you just accidentally delete or overwrite a file.

Yes, ext4 works well on SSDs and the noatime and discard options are somewhat helpful.

You might want to use LVM

psusi
  • 38,031
2

I think you sort of nailed it already.

  1. Test if trim is active with...
cd /tmp
sudo dd if=/dev/urandom of=tempfile count=100 bs=512k oflag=direct 
sudo hdparm --fibmap tempfile
sudo hdparm --read-sector 732160 /dev/sda
sudo rm tempfile
sync
sudo hdparm --read-sector 732160 /dev/sda
  

change the 732160 to a sector that --fibmap shows you.

  1. Use the 80 Gb for / only. Or set / to 25 Gb and leave the rest empty. Toss /home on your 2Tb too. I always put /home on 20 Gb and symlink the directories to another part with symlinks: I want to be able to format /home whenever I want w/o loosing any actual content.

  2. Add /tmp into ram with:

    tmpfs /tmp tmpfs nodev,nosuid,noexec,mode=1777 0 0

Rinzwind
  • 309,379