DEV Community

Muhammad Nafis
Muhammad Nafis

Posted on

Lxc command list

melihat storage <x> dipakai oleh container mana saja

lxc storage volume list <nama_storage>

membuat storage zpool zfs

lxc storage create <nama_zpool> zfs

membuat container baru dengan zpool yang sudah dibuat

lxc launch -s

contoh:

lxc launch ubuntu:18.04 fss -s pool1

hapus lxd container

lxc delete

lihat list zpool yang dapat di import

zpool import

lihat list zpool import dari img file

zpool import -d /var/snap/lxd/common/lxd/disks
"/var/snap/lxd/common/lxd/disks" adalah direktory di mana .img berada

import zpool berdasarkan id dari zpool import

zpool import

lokasi storage pools

/var/snap/lxd/common/lxd/storage-pools/

lain2

/var/snap/lxd/common/mntns/var/snap/lxd/common/lxd/storage-pools/Pool-1/containers/container-name
zfs list
zpool list
zpool status
lxc exec cont-cobazfa1 -- bash
lsblk
fdisk -l
df -h

delete lxc storage

destroy zpool

zpool destroy cobazfs1/containers/cont-cobazfa1

delete lxc storage

lxc storage delete

Mount dan unmount ZFS legacy ke directory

mount:
mount -t zfs cobazfs1/containers/cont-cobazfa1 /cobamount/cobazfs1/
Unmount:
umount cobazfs1/containers/cont-cobazfa1

Mount dan unmount ZFS dir ke directory

zfs mount default/containers/shinobi-coba

jika ada error cannot mount '/export/home/lalt': directory is not empty, use legacy mountpoint to allow this behavior, or use the -O flag

zfs mount -O default/containers/shinobi-coba

unmount

zfs unmount default/containers/shinobi-coba

chown rootfs

chown -R 1000000:1000000 rootfs

👋 Kindness is contagious

Please leave your appreciation by commenting on this post!

It takes one minute and is worth it for your career.

Get started

Thank you!

Top comments (0)

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay