This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mount /dev/sdXY /mnt | |
| sudo mount --bind /dev /mnt/dev && | |
| sudo mount --bind /dev/pts /mnt/dev/pts && | |
| sudo mount --bind /proc /mnt/proc && | |
| sudo mount --bind /sys /mnt/sys | |
| sudo chroot /mnt | |
| grub-install /dev/sdXY | |
| grub-install --recheck /dev/sdXY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ensuring a Clean Device Removal | |
| * Close all users of the device and backup device data as needed. | |
| * Use umount to unmount any file systems that mounted the device. | |
| * Remove the device from any md and LVM volume using it. If the device is a member of an LVM Volume group, then it may be necessary to move data off the device using the pvmove command, then use the vgreduce command to remove the physical volume, and (optionally) pvremove to remove the LVM metadata from the disk. | |
| * If the device uses multipathing, run multipath -l and note all the paths to the device. Afterwards, remove the multipathed device using multipath -f device. | |
| * Run blockdev –flushbufs device to flush any outstanding I/O to all paths to the device. This is particularly important for raw devices, where there is no umount or vgreduce operation to cause an I/O flush. | |
| * Remove any reference to the device's path-based name, like /dev/sd, /dev/disk/by-path or the major:minor number, in applications, scripts, or utilities on the system. This is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -kL https://raw.github.com/cstrap/monaco-font/master/install-font-ubuntu.sh | sudo bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use Data::Dumper; | |
| my $pid = $ARGV[0]; | |
| open my $f, "/proc/$pid/environ" || die($!); | |
| my $linea = <$f>; | |
| print Dumper(split '\0', $linea); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #================ | |
| Start Swarm setup | |
| PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
| ROLE=MANAGER | |
| PRIVATE_IP=10.0.0.6 | |
| DOCKER_FOR_IAAS_VERSION=azure-v1.13.0-rc4-beta14 | |
| ACCOUNT_ID=0aff12f8-9fd1-467b-b90a-5979b2aabf60 | |
| REGION=northeurope | |
| AZURE_HOSTNAME=e4b4e1ca87f5 | |
| #================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for d in $(docker ps -q); | |
| do | |
| container_layer=$(docker inspect --format '{{ .GraphDriver.Data.MergedDir }}' $d); | |
| size=$(du -sh $container_layer/..|cut -f1); | |
| echo "container $d escribe en $container_layer, ocupa $size"; | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| echo "<h1 style='text-align: center'>".gethostname()."</h1><hr>"; | |
| phpinfo(); |
OlderNewer