we have rhel 7.2 server , server is VM server
and we add new disk - sde
with the following example we create ext file system with label - disk2
mkfs.ext4 -L disk2 /dev/sde
mke2fs 1.42.9 (28-Dec-2013)
/dev/sde is entire device, not just one partition!
Proceed anyway? (y,n) y
Discarding device blocks: done
Filesystem label=disk2
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
262144 inodes, 1048576 blocks
52428 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
so we get
lsblk -o +FSTYPE,LABEL | grep sde
sde 8:64 0 4G 0 disk ext4 disk2
is it possible to create on new disk only the label but without creation of file system?
example of expected output ( without file system on disk )
lsblk -o +FSTYPE,LABEL | grep sde
sde 8:64 0 4G 0 disk disk2