commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
see the partition
To get most of you HDD/SSD driver you need to make sure you partition are aligned, if not the speed penalty can be up to 50% slower!
this simple one liner will check to see if each partition start sector is divided by 512
you need to change sda with your driver
if you find the one of your partitions is not aligned use gparted to move the start sector of the partition to be divided of 512
this work even if a partition table exist
Used this after cloning a disk with dd to make the newly written partitions show up in /dev/
This is a bit hacky, but if you're setting up a bunch of new LUNs, it can save a bunch of time. Also check out sfdisk. The fdisk will fail if, for example, a partition table already exists.