Introduzione
In questo documento viene descritto come eseguire un backup da un accessorio Prime Infrastructure (IP) Gen 1 esternamente utilizzando una porta USB dell'accessorio e viceversa.
Problema
In molti scenari dei clienti, l'utilizzo del protocollo FTP/TFTP (File Transfer Protocol/Trivial File Transfer Protocol) è limitato nel centro dati e rappresenta quindi una grande sfida per il cliente spostare il backup da IP a un punto esterno con l'aiuto di qualsiasi server FTP/TFTP. Poiché Appliance è un server basato su Linux, è molto difficile spostare il backup da qualsiasi altro modo al punto esterno perché potrebbe essere possibile che danneggi il backup al momento del trasferimento non corretto.
Soluzione
Per superare questa situazione, trovare una soluzione alternativa per spostare il backup da Prime Server a USB Stick con l'utilizzo di porta USB dell'accessorio. Un altro vantaggio è che è molto più veloce e aiuta a ridurre il tempo necessario per la copia con FTP/TFTP/SFTP e sarà molto utile anche copiare dati di grandi dimensioni.
Backup da accessorio IP Gen1 a USB
Passaggio 1. Inserire una chiavetta USB.
Passaggio 2. Creare un nuovo file system ext4 supportato per la partizione.
-bash-4.1# fdisk -l n e l t 8e w
-bash-4.1# partprobe
-bash-4.1# mkfs.ext4 /dev/sdb1
-bash-4.1# mkdir /media/usb-drive/
-bash-4.1# mount -t ext4 /dev/sdb1 /media/usb-drive/
-bash-4.1# umount /media/usb-drive
Passaggio 3. Copiare il backup da defaultRepo nel file system appena installato.
Passaggio 4. Convalidare la md5 del file in entrambe le posizioni.
Backup da USB a accessorio IP Gen1
Passaggio 1. Accedere alla PI.
pi/admin#
Passaggio 2. Passare alla shell.
pi/admin# shell
Enter shell access password :
Starting bash shell ...
ade #
ade #
ade # sudo su -
-bash-4.1#
Passaggio 3. Visualizzare tutte le partizioni del disco in PI.GRECO.
-bash-4.1# fdisk -l
Disk /dev/sda: 897.0 GB, 896998047744 bytes
255 heads, 63 sectors/track, 109053 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000591be
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 77 102400 83 Linux
Partition 2 does not end on cylinder boundary.
/dev/sda3 77 109054 875359232 8e Linux LVM
Disk /dev/mapper/smosvg-rootvol: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-swapvol: 16.8 GB, 16777216000 bytes
255 heads, 63 sectors/track, 2039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-tmpvol: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-usrvol: 7348 MB, 7348420608 bytes
255 heads, 63 sectors/track, 893 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-varvol: 4194 MB, 4194304000 bytes
255 heads, 63 sectors/track, 509 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-optvol: 716.3 GB, 716252905472 bytes
255 heads, 63 sectors/track, 87079 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-home: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-recvol: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-altrootvol: 134 MB, 134217728 bytes
255 heads, 63 sectors/track, 16 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-localdiskvol: 134.6 GB, 134553272320 bytes
255 heads, 63 sectors/track, 16358 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/smosvg-storeddatavol: 10.5 GB, 10502537216 bytes
255 heads, 63 sectors/track, 1276 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdb: 62.1 GB, 62075699200 bytes
255 heads, 63 sectors/track, 7546 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa5fe72c5
Device Boot Start End Blocks Id System
/dev/sdb1 1 7546 60613213+ 8e Linux LVM
Passaggio 4. Creare una nuova directory e installarla.
-bash-4.1# mkdir /media/usb-drive/
-bash-4.1# mount -t ext4 /dev/sdb1 /media/usb-drive/
-bash-4.1# ls -lv
total 60
-rw-------. 1 root root 8494 Aug 24 2018 anaconda-ks.cfg
drwxr-xr-x. 2 root root 4096 Aug 24 2018 bin
-rw-r--r--. 1 root root 18977 Aug 24 2018 install.log
-rw-r--r--. 1 root root 5646 Aug 24 2018 install.log.syslog
-rw-r--r--. 1 root root 5 Aug 24 2018 iso.ks.cfg
-rw-------. 1 root root 164 Aug 24 2018 ks-post.log
-rw-------. 1 root root 381 Aug 24 2018 ks-post-toinstall.log
-rw-rw-r--. 1 root root 120 Aug 23 17:47 test.log
-bash-4.1# cd /media/usb-drive/
-bash-4.1# pwd
/media/usb-drive
Passaggio 5. Prima di copiare il backup, controllare il md5 del backup da USB.
-bash-4.1# ls -lv
total 21197320
-rw-r--r--. 1 root root 21706033973 Jun 28 14:57 pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
drwx------. 2 root root 16384 Jun 28 14:29 lost+found
-bash-4.1#
-bash-4.1#
-bash-4.1# md5sum pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
44daa932e7ca10fafe480302f7a17b6a pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
-bash-4.1#
-bash-4.1#
Passaggio 6. Copiare il backup nella cartella /localdisk/defaultRepo.
-bash-4.1# cp pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg /localdisk/defaultRepo/
-bash-4.1#
-bash-4.1#
-bash-4.1# cd /localdisk/defaultRepo/
-bash-4.1# ls -lv
total 21218032
-rw-r--r--. 1 root root 21706033973 Aug 23 18:56 pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
-bash-4.1#
-bash-4.1#
Passaggio 7. Verificare il file md5 del backup copiato con il file md5 precedente.
-bash-4.1# md5sum pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
44daa932e7ca10fafe480302f7a17b6a pi-180419-1332__VER3.1.0.0.132_BKSZ204G_CPU16_MEM3G_RAM15G_SWAP15G_APP_CK1589549125.tar.gpg
-bash-4.1#
-bash-4.1#
Passaggio 8. Smontare la directory.
-bash-4.1# umount /media/usb-drive
-bash-4.1#
-bash-4.1#
-bash-4.1#