Jump to content

Navigation menu

Note: Currently new registrations are closed, if you want an account Contact us

Difference between revisions of "Poddery - Diaspora, Matrix and XMPP"

Line 66: Line 66:


* There should be a data disk attached (added from cloud.scaleway.com)
* There should be a data disk attached (added from cloud.scaleway.com)
* The attached disk (/dev/nbd2) should be an lvm physical volume (pvcreate /dev/nbd2). We cannot use it directly for encryption, so we use lvm.
* The attached disk (/dev/nbdX) should be an lvm physical volume. We cannot use it directly for encryption, so we use lvm.
* /dev/data is an lvm volume group created from /dev/nbd2 (vgcreate data /dev/nbd2).
  # Make sure '''lvm2''' and '''udev''' packages are installed
* /dev/data/diaspora is an lvm logical volume (lvcreate -n diaspora /dev/data -L 93.5G).
  sudo apt-get install lvm2 udev
* /dev/mapper/diaspora is an encrypted device (cryptsetup luksFormat /dev/data/diaspora; cryptsetup luksOpen /dev/data/diaspora diaspora)
 
* /dev/mapper/diaspora is an ext4 file system (mkfs.ext4 /dev/mapper/diaspora)
  # Replace X with valid number according to '''lsblk'''
* /var/lib/diaspora should be mounted (mount /dev/mapper/diaspora /var/lib/diaspora)
  sudo pvcreate /dev/nbdX
* all critical data should be on /var/lib/diaspora.
* /dev/data is an lvm volume group created from /dev/nbdX
''' /etc/init.d/mysql stop; mv /var/lib/mysql /var/lib/diaspora; ln /var/lib/diaspora/mysql /var/lib/diaspora
  sudo vgcreate data /dev/nbdX
''' mkdir /var/lib/diaspora/uploads; chown -R diaspora: /var/lib/diaspora/uploads;ln -s /var/lib/diaspora/uploads /usr/share/diaspora/public/uploads
* /dev/data/diaspora is an lvm logical volume  
  sudo lvcreate -n diaspora /dev/data -L <size_of_disk>
* /dev/mapper/diaspora is an encrypted device  
  # Make sure '''cryptsetup''' package is installed
  sudo apt-get install cryptsetup
 
  # Give disk encryption password as specified in the [[#Server_Access|access repo]]
  sudo cryptsetup luksFormat /dev/data/diaspora
  sudo cryptsetup luksOpen /dev/data/diaspora diaspora
* /dev/mapper/diaspora is an ext4 file system  
  sudo mkfs.ext4 /dev/mapper/diaspora
* /var/lib/diaspora should be mounted  
  sudo mkdir /var/lib/diaspora
  sudo mount /dev/mapper/diaspora /var/lib/diaspora
* All critical data should be on /var/lib/diaspora
  sudo /etc/init.d/mysql stop
  sudo mv /var/lib/mysql /var/lib/diaspora
  sudo ln /var/lib/diaspora/mysql /var/lib/diaspora
  sudo mkdir /var/lib/diaspora/uploads
  sudo chown -R diaspora: /var/lib/diaspora/uploads
  sudo ln -s /var/lib/diaspora/uploads /usr/share/diaspora/public/uploads


=== Services health check ===
=== Services health check ===