Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to write a program to format SD card with, FAT boot, ext4 and swap partitions. I would like the ext4 to use LVM. Ideally there would be scope for mdadm.

I need help finding a command line utity which is capable of all this. I will be able to control any command from within my program. Would rather not cut & paste source.

I understand that Gparted does not cope well with LVM.
Any suggestions for a better command?

share|improve this question
Do you tried parted? It is the same as gparted, but in command line – Ielton Dec 24 '11 at 12:15
There are various command-line utilities that achieve each of the steps. Why is it that you require them all in a single one? – Garrett Dec 24 '11 at 17:32

sfdisk - cli partitioning
pvcgreate, lvcreate, lvchange, lvresize - create and manage LVM volumes

You don't need a specific tool to manage LVM partitions because once a logical volume has been created, it looks like any other block device (hard-drive, sdcard, etc).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.