Wednesday, May 8, 2013

lvm saved my media organization

I had decent media organization until all my drives got full. Now finding a new TV show episode requires looking in 4 potential places, and my fstab is looking convoluted. Upgrading my server gave me the right opportunity to switch to lvm. Current server is 'stolen' and new server is 'Jupiter'.

On Jupiter:
coty@Jupiter:~$ sudo -i
root@Jupiter:~# apt-get install lvm2
root@Jupiter:~# mkdir /mnt/media
root@Jupiter:~# lvm
lvm> pvcreate /dev/sdb1 /dev/sdc1
lvm> vgcreate vg /dev/sdb1 /dev/sdc1
lvm> lvcreate -l 100%FREE -n media vg
lvm> exit
root@Jupiter:~# mkfs.ext4 /dev/vg/media
root@Jupiter:~# mount /dev/vg/media /mnt/media
//root@Jupiter:~# echo '/mnt/media 10.10.10.0/24(rw,async,subtree_check,wdelay)' >> /etc/exports
//root@Jupiter:~# mkdir /etc/exports.d
//root@Jupiter:~# service nfs-kernel-server restart
vi /etc/default/rsync
set RSYNC_ENABLE=true
vi /etc/rsyncd.conf

#motd file = /etc/rsyncd.motd
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock

[media]
path = /mnt/media
#comment = My Very Own Rsync Server
#uid = nobody
#gid = nobody
read only = no
list = yes
#auth users = username
#secrets file = /etc/rsyncd.scrt


On stolen:
//mount 10.10.10.115:/mnt/media /mnt/Jupiter

No comments: