[postgis-tickets] [PostGIS] #4428: debbie-docker move to new disk
PostGIS
trac at osgeo.org
Thu Jun 13 09:22:43 PDT 2019
#4428: debbie-docker move to new disk
-------------------------+----------------------------
Reporter: robe | Owner: robe
Type: defect | Status: closed
Priority: medium | Milestone: Management 2.0
Component: management | Version: trunk
Resolution: fixed | Keywords:
-------------------------+----------------------------
Changes (by robe):
* status: new => closed
* resolution: => fixed
Old description:
> We have a lot of fat docker images for postgis, geos, geos-php which was
> eating up a lot of space so was down to 4 GB on the partition I had
> alotted for lxd zfs.
>
> That said I created a new 500GB disk zfs partition and moved debbie
> docker to that.
>
> I'll write the steps in
>
> https://git.osgeo.org/gitea/postgis/postgis-servers
>
> once I've figured the best place to put it, for now here are my scribbled
> notes:
New description:
We have a lot of fat docker images for postgis, geos, geos-php which was
eating up a lot of space so was down to 4 GB on the partition I had
alotted for lxd zfs.
That said I created a new 250GB disk zfs partition and moved debbie docker
to that.
I'll write the steps in
https://git.osgeo.org/gitea/postgis/postgis-servers
once I've figured the best place to put it, for now here are my scribbled
notes:
--
Comment:
My scribbled notes
----
{{{
Attach to host.postgis.net
https://www.atlantic.net/community/howto/configuring-block-storage-linux-
servers/
#Go back into to server
ls /dev/disk/by-id/scsi-0AN_Volume_*
should output - /dev/disk/by-id/scsi-0AN_Volume_postgis_storage
#now install gdisk to help setting up
apt install gdisk
gdisk /dev/disk/by-id/scsi-0AN_Volume_postgis_storage
Command (? or help): n #this will create a new partition taking up whole
drive
take remaining defualts by clicking enter
When hit the next:
Command (? or help): p #this will print the disk layout
When hit the next:
Command (? or help): w #saves the partition
Y to confirm
#now add new pool to existing lxd
#upgrade to larger disk
http://genetics.wustl.edu/technology/replacing-a-bad-zfs-drive-with-
larger-drive/
#create on existing zfs and add to lxd
zpool create -f lxd2 /dev/disk/by-id/scsi-0AN_Volume_postgis_storage
lxc storage create pool2 zfs source=lxd2
#move containers to new pool
https://blog.bilak.info/2018/07/08/moving-lxd-containers-from-one-pool-to-
another/
#move debbie-docker to new pool
lxc exec debbie-docker bash
#in debbie-docker
shutdown -P -H now
lxc storage list #confirm in use
lxc cp debbie-docker debbie-docker-moved -s=pool2
#rename original container
lxc mv debbie-docker debbie-docker-to-delete
#move new back to old name and cofirm good by starting
# rename container back for sanity ;)
lxc mv debbie-docker-moved debbie-docker
lxc start debbie-docker
# rename container back for sanity ;)
lxc move some_container-moved some_container
# if you want to move instead do
# move container to pool2
```
lxc mv some-container some-container-moved -s=pool2
```
}}}
----
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4428#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list