Remove a Jail

From HateotU
Revision as of 17:23, 13 September 2018 by Damarx (talk | contribs) (Created page with "==Remove a Jail== Replace <jailname> with the Name of your Jail ===Precautions=== * Backup all necessary data from the jail-filesystem (/export/<jailname>) * Remember to stop...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Remove a Jail

Replace <jailname> with the Name of your Jail

Precautions

  • Backup all necessary data from the jail-filesystem (/export/<jailname>)
  • Remember to stop the jail before proceeding
service jail stop <jailname>

Destroy ZFS Pool

  • Unmount the new Pool
zfs umount /export/<jailname>
  • Please double check the jail that shall be deleted. Otherwise other people might LART you.
  • Destroy the zfs pool
zfs destroy zfs0/<jailname>

If You're not using ZFS, delete the Folder

rm -r /export/jails/<jailname>

/etc/jail.conf

  • Remove the jail.conf entry for the selected jail
vi /etc/jail.conf
  • Be careful to only delete the entry of your the desired Jail. Just remove the lines below for the corresponding Jail.
<jailname> {
        host.hostname = "<jailname>.hateotu.de";
        ip4.addr = <ip the new Jail should have>;
}

fstab

  • Remove the fstab file for the Jail
rm /etc/fstab.<jailname>

Die Jail aus Saltstack entfernen

WIP

DNS entfernen

WIP