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
Showing posts with label LVM. Show all posts
Showing posts with label LVM. Show all posts
Wednesday, May 8, 2013
Adding drives to LVM and resizing volume
/dev/sdg1, /dev/sdf1 are 1.5TB drives. /dev/sdf1 is full, /dev/sdg1 is almost full. Move a bunch of stuff off of /dev/sdg1, resize it, make a partiton, add it to the lvm pool, move more stuff off...
Resize /dev/sdg1 to the minimum partition size:
Make the new partition from free space:
Add it to the pool:
Increase the pool partition size to maximum:
Resize /dev/sdg1 to the minimum partition size:
resize2fs -M /dev/sdg1
Make the new partition from free space:
cfdisk /dev/sdg1
Add it to the pool:
pvcreate /dev/sdg2 vgextend /dev/sdg2 lvextend -l 100%vg /dev/vg/media
Increase the pool partition size to maximum:
resize2fs /dev/vg/media
Subscribe to:
Posts (Atom)