Posts Tagged ‘resize’

Many Linux servers these days are using LVM (Logical Volume Manager) in order to allow disk drives and partitions to be easily managed (shrinked / resized). It is interesting fact LVM is successor of HP-UX's volume manager. LVM can be considered as a thin software layer on top of the hard disks and partitions, which creates an abstraction of continuity and ease-of-use for managing hard drive replacement, re-partitioning, and backup.

LVM is commonly used for the following purposes:

Managing large hard disk farms by allowing disks to be added and replaced without downtimes and services disruption (useful whenever hot-swapping is needed)

On small systems (like a desktop at home), instead of having to estimate at installation time how big a partition might need to be in the future. – LVM lets file systems to be easily resized later as needed.

Performing consistent backups by taking snapshots of the logical volumes.

So if you're sysadmin it is quite likely that some LVM volume starts being filled up (because of bad initial planning), so the customer asks you to resize a LVM (volume), here is how to do it:

1. Check whether LVM configured on server has free disk space that can be relocated First lets list all LVM configured volumes on server:

# vgscanReading all physical volumes. This may take a while... Found volume group "web_log" using metadata type lvm2 Found volume group "web_all" using metadata type lvm2 Found volume group "rootvg" using metadata type lvm2

vgscan – scan all disks for volume groups and rebuild caches Then lets display the volume group information.

On other file systems to raise the size of the filesystem there are different tools to use also on some umount and mount is not necessary example for dynamicly resizable filesystem is reiserfs (though I don't recommend this FS to anyone as the creator of ReiserFS killed his family – moreover my personal experience with ReiserFS in past was quite bitter – I lost personal data because of ReiserFS break ups).

Here is how to dynamicly resize FS after lvextend on Reiserfs filesystem:

# resize_reiserfs -f /dev/myvg/homevol

XFS also supports resize of filesystem with no need to re-mount on server with XFS LVM resize after lvextend run:

I had to create a number of Facebook and Twitter accounts for one of the companies where I am employed. As I had to put Avatars to each and every new account. I therefore had to resize the company logos to fit the to the avatar dimensions.. It took me a bit of research until I found the proper picture dimensions. Here are the dimensions:

For facebook page Avatar the good picture width / height dimensions is a square like:

151x151 pixels

If however you prefer to have a sky scraper picture in Facebook, this is possible as thumbnail pictures up to 180×540 w/h pixels are showing up in FB. At most cases FaceBook automatically resizes the uploaded picture and generates a thumbnail which in most pictures looks okay, however in some odd picture dimensions the picture preview might be messy, so its better to ship the profile pic in standard square size like 151×151, 256×256, 313×313 etc.

In Twitter again the avatar picture should be a square like, to have twitter during upload automatically resize and make a good looking pic thumbnail. If some picture with a non square dimensions is uploaded as an Avatar for twitter account usually, twitter's pic auto resize server side program chops parts of the picture. This is not a bug but expected behaviour. In Twitter another requirement is that the uploaded avatar image does not exceed 700kb, trying to puload a picture over 700k fails.

In both Facebook and Twitter the uploaded Avatar logo should be in format JPEG, GIF or PNG . To resize the company logo pictures for FB and Twitter, I used GIMP 's:

Image -> Scale Image

menus.

I've red some people claiming the size of the Avatar logo in Facebook could have some impact in terms of e-marketing, but I'm not sure if this is a fact or some false rumour. Anyways it is sure that a wide sky scraper like picture allows you to show more even from the profile and maybe through the picture have larger influence over the audience.