1

How to create a LVM and ext4 file system using lvcreate command only. is there any swich in lvcreate command to include the file system type?

skv
  • 11
  • 2

1 Answers1

1

There is none, and there shouldn't be: A logical volume (i.e. a block device) and a file system are two very different concepts:

  • A file system can exist without at block device (i.e. NFS)
  • A block device an exist without a file system (i.e. LVM as a VM vbd)

It might be, that the easiest way to achive what you want is a short shell script (maybe called lvcreateext4), that calls lvcreate and mkfs.ext4, then use it instead of lvcreate.

Eugen Rieck
  • 20,271