Imagemagick power resizer command

This command is usefull to resize only images greater than x in a folder.It put resized images in a folder called thumbs but you can convert file implace deleting “thumb/” string.

1
for i in `ls *.jpg`; do convert $i -resize 800x800\> thumb/$i ; done

Lvm Extend Volume Group adding new Disk

These are the step to add space to and existing Logical Volume on a Volume Group:

1) add disk and perform  rescan-scsi-bus.sh
2) Add Physical Volume available for LVM:

pvcreate (-t)* /dev/sdc

3) Exteng the volume group (here namend system) with new create physical volume:

vgextend (-t)* system /dev/sdc

4) Extend target logical volume (here named /dev/system/opt) with new space (here 10gb):

lvextend -L +10G -t /dev/system/opt

5) verify :

lvmdisplay

6) In the end you have to resize physical space :

resize2fs /dev/system/opt

 

*Always by tiping -t you can test command before execute on production server.