7

I have created a VG, and want to create a LV for swap:

$ sudo lvcreate -n swap -L 4G VG
WARNING: ext4 signature detected on /dev/VG/swap at offset 1080. Wipe it? [y/n]: y
  Wiping ext4 signature on /dev/VG/swap.
  Logical volume "swap" created.
$ sudo lvcreate -n root -L 40G VG
  Logical volume "root" created.
$ sudo lvcreate -n home -l 100%FREE VG
  Logical volume "home" created.

What does that warning mean? What shall I do about it?

Why do the following two commands not have the warning?

Thanks.

Tim
  • 101,790

1 Answers1

11

What does that warning mean?

The warning means that once upon a time, there was an ext4 filesystem in the same disk location (start offset) as the swap partition you were trying to create.

NOTICE: When you delete a partition, the filesystem within does not get deleted.

The warning exists to give you a chance to back out of the irreversible operation, in case you selected the block device.

What shall I do about it?

You already did something about it. You wiped it.

Why do the following two commands not have the warning?

The following two commands did not have the warning because no previous filesystem was detected at those disk locations.

  • 1
    If I don't wipe it, will I automatically restore the old drive, that was sitting there "once upon a time"? – rubo77 May 10 '20 at 00:10
  • 1
    Not exactly, rubo77. That warning only means that once upon a time, an ext4 filesystem was created starting at that location. It makes no guarantees about the integrity of the entire filesystem. testdisk is a utility you can use to attempt to restore a filesystem. – Emmanuel Rosa May 10 '20 at 04:39