To LVM or not?
LVM for Spanning SSDs
1) Should I opt for LVM management by re-installing ubuntu? I've heard
how good it really is. I've heard it makes it into one drive - but
SSDs don't work when they're near full. So will LVM just take care of
things when one of the drive (say 250 GB SSD) gets nearly full?
LVM can be used for many different purposes. One of them is encryption, another is disk spanning, one can use both as well. Your first question is about disk spanning.
The default way disk spanning works will fill up one disk and then start putting files in the next one. However, this default behavior can be changed, and you can set it up to put the data (not necessarily files) evenly between the two disks.
One issue with disk spanning is you have no control where the data goes. For example, lets say you have a 5MB powerpoint file. Half of that file may be in one drive, and the rest in the other. This will speedup saving and loading the file. On the other hand, if one of the SSD fails, your data is toast. This is true not only for one file but for all the data in the LVM partition as a whole. Say you create a single 750 GB partition spanning the 250 GB SSD and the 500 GB SSD using LVM. One of the SSDs fails. You will have half a partition. There is no way to recover any data from half a partition in the working SSD.
You may want to create a large single partition spanning two SSDs if you need to work with a single 600GB file that won't fit in either of the SSDs.
See LVM - how is data allocated between disk for more information.
LVM for Encrypting Partitions
2) Or, should I format the 500 GB with ext4, and encrypt it, and use
it like an external harddisk? (Or is there any other alternatives?)
The LUKs encryption method will automatically create a LVM layer between the physical partition and the encryption layer.
It depends on what kind of data you will put in that SSD. If it is game saves and Lady Gaga songs, I would not bother with encryption. If it is your tax returns, and bank balance, I would encrypt the partition.
I understand the use the second SSD as an "external" disk to mean that the encrypted partition will not be mounted when the laptop boots. This means that you will not be asked for the encryption passphrase when the laptop boots. If and when you need to access this encrypted partition, you will enter the passphrase and mount the partition.
If you set it up this way, the data in the encrypted partition remains protected even when the laptop is on, as long as the partition is not mounted.
Other Alternatives
These alternatives are not about encryption, but mounting the second SSD. I assume you want to format the second SSD as a single partition. You can use encrypted partitions for these if you need it.
If you use encrypted partitions in the following alternatives, the encryption will only protect your data as long as the laptop is off. That is, if your laptop is off and a thief runs away with it, your data will be protected. However, if you are logged on and a thief gets your laptop, then there is no protection, as you have already unlocked the encrypted partition when the laptop booted.
/home
in the second SSD
In Ubuntu (Linux in general) a partition is mounted as a folder. This means you can setup your 500 GB SSD as a (encrypted or not) single partition and mount it as the /home
folder. If you do this, all your personal data, documents, music, videos, etc. will be in the 500 GB SSD.
If you have other users for this laptop, putting the whole /home
folder in a separate partition (in the second SSD) and encrypting that partition means all the data for all the other users will be protected by encryption.
You don't have to put the whole /home
folder in the second SSD. You can mount a partition in the second SSD as any sub-folder within the /home
folder. Here are some examples:
If you are a music buff, you can dedicate the whole 500 GB SSD to music by creating a single ext4
partition and mounting that partition as /home/$USER/Music
(where $USER is your username).
If you are a musician and want to protect your music from laptop thieves, you can LUKs encrypt this partition.
If you are a photographer, you can dedicate the whole 500 GB SSD to photos by creating a single ext4
partition and mounting that partition as /home/$USER/Pictures
.
As a professional photographer you may want to protect your photographs from laptop thieves. You can LUKs encrypt this partition.
If you are a Youtuber, you can dedicate the whole 500 GB SSD to videos by creating a single ext4
partition and mounting that partition as /home/$USER/Videos
.
As a professional vlogger you may want to protect your videos from laptop thieves. You can LUKs encrypt this partition.
3) Is there any workaround to use Dropbox on an encrypted ext4 system?
(I forgot to encrypt my ubuntu when installing; which I'm going to
encrypt it soon) Thanks in advance.
Yes there is!
You will need to encrypt at the partition level (not at the folder level). In other words, it depends on what kind of encryption method you use. In the default Ubuntu installation, /home
is a folder. The option to encrypt the home folder during installation uses ecryptfs
a folder level encryption method. This does not work with Dropbox any more.
If you use a whole partition mounted as /home
, then you can encrypt that partition using LUKs, which uses LVM as an underlying layer.
The /home
partition can reside in either the first or the second SSD. However, since this is a partition level encryption, and Ubuntu needs to make sure the /home
folder (which is a partition) is accessible during boot, you (and all other users) will be asked to enter the encryption passphrase when the system boots. If you forget the passphrase, your system will not boot. Moreover, you will not be able to get to your files, music, etc.
If your /home
folder is not a separate partition, as it should be with a default installation, you can move /home
to a new partition and at the same time encrypt that partition.
The process of creating the new /home
encrypted partition and copying all your files is described in Ecrypfts to LUKS on ext4 partition
Hope his helps