[PVE-User] About PROXMOX4 lxc

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Oct 8 15:12:07 CEST 2015


pct set $vmid -mp$number $storage:$size,mp=$path

eg:
pct set 100 -mp0 local:8,mp=/data

would create an 8G disk on the 'local' storage and mount it on /data the next
time you start the container.

If you have an existing disk, use the volume id instead of a size, eg;
`local:100/vm-100-disk-3.raw` (eg you might have allocated one with `pveasm
alloc` and formatted it with a different filesystem. The above command will
create an ext4 on the disk.)

> On October 8, 2015 at 3:04 PM Diaolin <diaolin at diaolin.com> wrote:
> 
> 
> First: tx for the big work!
> 
> Second: i've imported all my vz containers as lxc and i searched the
>          possiblity to expand the rootfs
>          BINGO: pct resize <vmid> <disk> <size>
>          works perfect when container is stopped but
>          if the disk is on an logical volume it says that i should
>          use lvresize...
>        "error resizing volume '/dev/disco/vm-101-disk-1':
>         Run `lvextend --help'    for more information"
> 
>          perfect! The question: and after lvresize how can i resize the
>          raw fs? Should i use a normal resizefs?
> 
> #############################
> lvextend --size +4G /dev/disco/vm-101-disk-1
>    Size of logical volume disco/vm-101-disk-1 changed from 8.00 GiB (2048 
> extents) to 12.00 GiB (3072 extents).
>    Logical volume vm-101-disk-1 successfully resized
> #############################
> 
> lvchange -a y /dev/disco/vm-101-disk-1
> 
> resize2fs -f /dev/disco/vm-101-disk-1
> 
> Perfect.
> 
> Now... the real question
> 
> Can i use an additional disk? Like mp0 mp1 or so on?
> 
> The rest is ok
> 
> Tx, Diaolin
> 
> 
> 
> -- 
> Certe mattine, come oggi, mi sento molto più psicopatico del solito.
> Temo sia l'età che mi porta alla consapevolezza! (autocit.)
> [Diaolin]
> 
> Tel: 349 66 84 215
> Skype: diaolin
> 
> 
> 
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user




More information about the pve-user mailing list