I have a little (and might sound stupid) question.. but google didn't got me to a solid answer in all the weekend.
I am planning to make a file/webserver server for home/development use.. And I want to use LVM to be able to add storage space in the future, but I dont want to risk any important data.
Hardware I have:
- 160GB 3.5" Sata 2 HDD
- 1TB 3.5" Sata 3 HDD
- 3TB 3.5" Sata 3 HDD
Data:
Here is a list of what I plan to store and its location/importance (asterisk means that data cannot be recovered/re-downloaded if a disk fails):
- *Pictures
- *Home Folders (/home/me and /home/wife)
- *iTunes Library
- Movies / TV Shows
- Software
- Steam/Origin Game backups (games that I use in LAN parties, but not all the time)
Plan:
I've planned to setup 2 LVMs:
- LVM0 with the 160GB disk (solo) for the root, boot and swap partitions;
- LVM1 with the 1TB and 3TB disks.
So in the future if I run out of space on any of both LVMs I can snap another hard-drive and expand the desired LVM.
I am planning to setup the /media/4tb-lv mount which would be the root for the single-partitioned LVM1:
- /media/4tb-lv/pictures
- /media/4tb-lv/software
- /media/4tb-lv/videos
- /media/4tb-lv/games
- /media/4tb-lv/itunes
- /media/4tb-lv/homes/me
- /media/4tb-lv/homes/wife
then I'll symlink the /home/me and /home/wife to their respective real directories
Backups
As I mentioned before, Pictures, Homes and iTunes folders cannot be lost in a hdd failure. So, I am planning to create a /backups directory in the LVM0 and use rsync to sync those 3 folders (on a daily basis) to the /backups dir... So, in case the LVM1 fails I can recover the data from the LVM0. These directories are not that huge.. in fact today the sum up to 50GB total (it fits perfectly in the 160GB disk)...
Finally: the questions!
This setup looks almost perfect for my setup.. but I have only one minor doubt...
Lets assume that the 160GB disk dies completely, so the /, /boot, /backup, /etc and all the other files stored on it are gone forever..
1) What happens to the second LVM?
2) Can I still access the data if I boot a live disk?? How can I do that?
3) I Mac OS X you can install the OS in drive A, and then setup a raid0 with drive B+C and if you drive A dies, you just need to reinstall OSX in a new drive and the raid0 b+c will be available even in the installation process without the need to configure anything as the metadata is stored in the B and C drives. How LVM manages its metadata?
I appreciate your help guys!
vgscanshowed the VG and thenvgchange -aymade it available to mount the partitions... about grub.. yes, the idea is to have a /dev/sda1 as /boot (ext4), /dev/sda2 as VG (lvm partition type) and inside this VG create the / and swap partitions (this is the default centos 7 schema) as LV. Later I can add a disk to the VG and expand root the partition – Feb 23 '15 at 23:01