Etendre un volume logique(lvm2) sous linux debian

1-Vérifier l’espace disponible sur le volume(vgdisplay), voir la valeur du champ FREE PE /SIZE

2-Arrêter les services liés à la partition à étendre(/home)

3-Démonter la partition(ex: /home) avec umount  ou umount -l

#umount -l /home

4-Etendre le volume logique

#lvextend -L+50G /dev/mapper/vg1-home

5-Vérifier le système de fichiers

#e2fsck (-f) /dev/mapper/vg1-home

6-Redimensionner le système de fichiers:

#resize2fs /dev/mapper/vg1-home

7-Monter votre partition existante:

mount /home

8-Démarrer les services liés à la partition.

Dans cet exemple, on a ajouté 50go sur la partition /home

Change keyboard to fr keyboard on linux

Modify the file /etc/sysconfig/keyboard

KEYTABLE = »fr-latin1″
KEYCHARSET= »iso-8859-15″
KEYBOARD= »pc »

 

#loadkeys fr

Instruction to restore host vmware backup from vranger

Note:
These instructions assume that a backup has been taken using the vRanger
product, but for whatever reason, the VM from which the backup was taken
is not available to be restored. All of the actions/ commands can be
executed on the target Host using Putty, except where noted to use
WinSCP.

1. Locate the .tvzc files that were created when the backup was made.
These files should be located either in the storage associated with the
VM, or the box from which vRanger was run.
2. If the backed up VM is gone/ deleted from disk in the VIC, make
sure to also delete all the .vmdk files associated with that VM from the
Host. This prevents issues when registering the .tvzc files for the
restore.
3. Download vcbrestore.zip from
http://www.vizioncore.com/Downloads/ProductSupport/vcbrestore.zip.
Extract vcbrestore to the tmp directory on the Host where the restore
will reside using WinSCP.
4. Run chmod 777 /tmp/ vcbrestore in the tmp directory on the Host
where the restore will reside.
5. Create a directory on the VMFS volume of the Host where the
restore will reside, naming the directory in accordance with the VM that
is to be restored. (i.e. if the backed up VM was named ‘test01’, the
directory should also be named ‘test01’)
6. Using WinSCP (disable Transfer Resume), move the .tvzc files from
their storage location to the VMFS directory on the Host where the
restore will reside.
Example:
Use WinSCP to copy test01.tvzc files from storage to the Host in
the directory you created. i.e. /vmfs/volumes/storage/test01
7. List the files in the .tvzc
/tmp/vcbrestore -D -I ./test01.tvzc -O /dev/stdout |tar tvf –
-O
where ‘test01′ is the name of the tvzc file
8. Extract each file needed in the directory.
/tmp/vcbrestore -D -I ./test01.tvzc -O /dev/stdout |tar xvf –
« file names »
Note: The file names can be stringed together in one command line
vs. executing individual commands for file extraction by putting a space
between the various file names.
9. Rename the .vzsnp files.
This is accomplished by actually moving the files within the same
directory and removing the .vzsnp extension from the files.
Example:
mv ./test01.vmdk.vzsnp ./test01.vmxf
10. Register the .vmx file to the Host
vmware-cmd -s register <full path to the .vmx file>

You might still have to edit the VM in the Vi3 client to fix any issues.
Once the VM is up and running rm tvzc to remove the files from the VMFS.

[root@vc-esx3-lab02 mac-12]# ls
mac-12_2.tvzc  mac-12_2.tvzc.info
[root@vc-esx3-lab02 mac-12]# /tmp/vcbrestore -D -I ./mac-12_2.tvzc -O /dev/stdout |tar tvf – -O
-rw——- root/root 104857600 2007-11-12 03:58:07 mac-12-flat.vmdk
-rw——- root/root       331 2007-11-13 03:23:54 mac-12.vmdk.vzsnp
-rw-r–r– root/root     17873 2007-11-13 03:23:54 vmware.log.vzsnp
-rw-r–r– root/root     17597 2007-11-13 03:23:54 vmware-1.log.vzsnp
-rw——- root/root       250 2007-11-13 03:23:54 mac-12.vmxf.vzsnp
-rwxr-xr-x root/root      1464 2007-11-13 03:23:54 mac-12.vmx.vzsnp
-rw——- root/root         0 2007-11-13 03:23:54 mac-12.vmsd.vzsnp
-rw——- root/root      8664 2007-11-13 03:23:55 mac-12.nvram.vzsnp
[root@vc-esx3-lab02 mac-12]# /tmp/vcbrestore -D -I ./mac-12_2.tvzc -O /dev/stdout |tar xvf – mac-12-flat.vmdk
mac-12-flat.vmdk
[root@vc-esx3-lab02 mac-12]# /tmp/vcbrestore -D -I ./mac-12_2.tvzc -O /dev/stdout |tar xvf – mac-12.vmdk.vzsnp vmware.log.vzsnp vmware-1.log.vzsnp
mac-12.vmdk.vzsnp
vmware.log.vzsnp
vmware-1.log.vzsnp
[root@vc-esx3-lab02 mac-12]# /tmp/vcbrestore -D -I ./mac-12_2.tvzc -O /dev/stdout |tar xvf – mac-12.vmxf.vzsnp mac-12.vmx.vzsnp mac-12.vmsd.vzsnp mac-12.nvram.vzsnp
mac-12.vmxf.vzsnp
mac-12.vmx.vzsnp
mac-12.vmsd.vzsnp
mac-12.nvram.vzsnp
[root@vc-esx3-lab02 mac-12]# mv mac-12.vmdk.vzsnp mac-12.vmdk
[root@vc-esx3-lab02 mac-12]# mv vmware.log.vzsnp vmware.log
[root@vc-esx3-lab02 mac-12]# mv vmware-1.log.vzsnp vmware-1.log
[root@vc-esx3-lab02 mac-12]# mv mac-12.vmxf.vzsnp mac-12.vmxf
[root@vc-esx3-lab02 mac-12]# mv mac-12.vmx.vzsnp mac-12.vmx
[root@vc-esx3-lab02 mac-12]# mv mac-12.vmsd.vzsnp mac-12.vmsd
[root@vc-esx3-lab02 mac-12]# mv mac-12.nvram.vzsnp mac-12.nvram
[root@vc-esx3-lab02 mac-12]# vmware-cmd -s register /vmfs/volumes/46e15bf9-b95f948e-1f6b-0015c5ef9ac7/mac-12/mac-12.vmx
register(/vmfs/volumes/46e15bf9-b95f948e-1f6b-0015c5ef9ac7/mac-12/mac-12.vmx) = 1
[root@vc-esx3-lab02 mac-12]# rm mac-12_2.tvzc mac-12_2.tvzc.info
rm: remove regular file `mac-12_2.tvzc’? y
rm: remove regular file `mac-12_2.tvzc.info’? y
[root@vc-esx3-lab02 mac-12]# vmware-cmd /vmfs/volumes/46e15bf9-b95f948e-1f6b-0015c5ef9ac7/mac-12/mac-12.vmx start
start() = 1

—-
Sous windows:
C:\Program Files\vizioncore\esxRanger Professional\FileZipper.exe” -D -I “D:\bak-restore\serverX.tvzc” -O “D:\RestoreVM\server_X-flat.vmdk.vzsnp

bsdtar.exe xzvf – “D:\Restore\server_X-flat.vmdk.vzsnp” “D:\vm\server_1.vmdk”

how-to restore a esxRanger Pro 3.1 tvzc backup

esxRanger Pro 3.1 tvzc Manual Restore Details
esxRanger Pro product is unavailable to restore

Solution
This is a how-to restore a esxRanger Pro 3.1 tvzc backup by hand

Download this file from vizoncore.com
http://www.vizioncore.com/Downloads/ProductSupport/vcbrestore.zip
Extract and Copy vcbrestore to /tmp on the Vi3 host (note you can not run this binary from a VMFS)
Note: if you’re going to use winscp make sure to “disable transfer resume” in preferences. This will remove any errors when sending large files to the vmfs3.
Run chmod 777 /tmp/vcbrestore
Create a directory on the vmfs3 where the VM will be contained.
Copy *.tvzc to the folder you just created on the VMFS.

List the files in the tvzc
/tmp/vcbrestore -D -I ./test_4.tvzc -O /dev/stdout | tar tvf – -O

Extract each file needed in the directory
/tmp/vcbrestore -D -I ./test_4.tvzc -O /dev/stdout | tar xvf – “each fie needed”
(If the vzc files are not on the VMFS where the VM will be created just use a path in the output file name)

Repeat for each file needed and remove .vzsnap off each file name
Register the VMX file the esx host
vmware-cmd -s register <full- path to the VMX>
You might still have to edit the VM in the Vi3 client to fix any issues.
Once the VM is up and running rm tvzc to remove the files from the VMFS

Example:

$:~/vranger$ ./vcbrestore -D -I pollux_1.tvzc  -O /dev/stdout | tar tvf – -O
-rw——- root/root 41154617344 2010-08-02 17:12 pollux-000001-delta.vmdk
-rw——- root/root    16883712 2010-08-02 17:57 pollux-000002-delta.vmdk
-rw——- root/root         255 2010-08-02 17:57 pollux-000002.vmdk.vzsnp
-rw——- root/root         248 2010-08-02 17:57 pollux-000001.vmdk.vzsnp
-rw-r–r– root/root       26575 2010-08-02 17:57 vmware.log.vzsnp
-rw-r–r– root/root       83337 2010-08-02 17:57 vmware-9.log.vzsnp
-rw-r–r– root/root      108204 2010-08-02 17:57 vmware-14.log.vzsnp
-rw-r–r– root/root       26145 2010-08-02 17:57 vmware-13.log.vzsnp
-rw-r–r– root/root      499547 2010-08-02 17:57 vmware-12.log.vzsnp
-rw-r–r– root/root       35452 2010-08-02 17:57 vmware-11.log.vzsnp
-rw-r–r– root/root      463210 2010-08-02 17:57 vmware-10.log.vzsnp
-rw——- root/root         261 2010-08-02 17:57 pollux.vmxf.vzsnp
-rwxr-xr-x root/root        2532 2010-08-02 17:57 pollux.vmx.vzsnp
-rw——- root/root         478 2010-08-02 17:57 pollux.vmsd.vzsnp
-rw——- root/root       19543 2010-08-02 17:57 pollux-Snapshot111.vmsn.vzsnp
-rw——- root/root        8684 2010-08-02 17:57 pollux.nvram.vzsnp

Example to extract each file needed in the directory.
/tmp/vcbrestore ?D ?I ./test01.tvzc ?O /dev/stdout |tar xvf ? ?file names?
Note: The file names can be stringed together in one command line vs. executing individual commands for file extraction by putting a space between the various file names.
Rename the .vzsnp files.
This is accomplished by actually moving the files within the same directory and removing the .vzsnp extension from the files.
Example:
mv ./test01.vmdk.vzsnp ./test01.vmxf
Register the .vmx file to the Host
vmware-cmd ?s register <full path to the .vmx file>

initialisation de cakephp

$/chemin/vers/cake/console/cake schema run create DbAcl