[virt-tools-list] fstrim makes LVM unbootable
Dennis Jacobfeuerborn
dennisml at conversis.de
Fri Jan 9 00:37:57 UTC 2015
On 09.01.2015 01:11, Richard Taubo wrote:
> Hi!
>
> I am running CentOS 7 on a machine with SSD, and trying to run the fstrim command.
>
> KVM is installed on a logical volume like this:
> [#] lvcreate -L 300G -n lv_vm1 VolGroup
> [#] mkfs.xfs /dev/VolGroup/lv_vm1
> [#] mkdir /mnt/b_vm_1
> [#] mount /dev/VolGroup/lv_vm1 /mnt/b_vm_1
> [#] virt-install --name=vm1.mydomain.com \
> --disk path=/dev/VolGroup/lv_vm1 \
> --ram=8192 --os-type=linux --os-variant=rhel7 \
> --vcpus=8 --check-cpu \
> --network bridge:br0 --nographics \
> --location=/usr/local/src/linux_isos/CENTOS7/CentOS-7.0-1406-x86_64-Minimal.iso \
> --extra-args 'ks=http://www.mydomain.com/anaconda-ks.cfg ksdevice=eth0 \
> ip=192.168.19.2 netmask=255.255.255.192 dns=8.8.8.8 gateway=192.168.19.1 console=ttyS0,115200n8 serial’
>
Why do you format and mount /dev/VolGroup/lv_vm1 and then specify it as
a disk for the VM? That looks extremely broken. You should only create
the volume with lvcreate and then call virt-install otherwise you will
probably end up with all kinds of corruption.
Regards,
Dennis
More information about the virt-tools-list
mailing list