6

I read on the arch wiki that it is not recommended to partition a disk before creating the ZFS filesystem on it. I searched but did not find any such statement about ext4.

So my questions:

  • Can I put a ext4 filesystem on a disk for storage (not a root partition of a system) without partitioning it?
  • What are the drawbacks?
0

4 Answers 4

5

Not required, but you should partition. The partition table eats up very little space, but it is universally recognizable. Windows will know that there's a filesystem there if you put it in a Windows box. If you have no partitions, other operating systems will just treat it as an empty drive.

5

You can run any filesystem on a bare block device with or without partitions, however the danger is that both people and OSes expect to see a partition table on a block device to realize that there is data present.

(both raw disks and partitions are just block devices, after all)

ZFS actually creates such a guardian partition table which is why it's safe to do it on an unpartitioned device:

$ zpool status
...
    NAME        STATE     READ WRITE CKSUM
    storage     ONLINE       0     0     0
      raidz2-0  ONLINE       0     0     0
        sda     ONLINE       0     0     0
        sdb     ONLINE       0     0     0
            ...

$ sudo gdisk -l /dev/sda
...
  MBR: protective
  GPT: present
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      7814019071   3.6 TiB     BF01  zfs
   9      7814019072      7814035455   8.0 MiB     BF07  
1

Yes you can format a whole block device and need not create a partition first.

On SAN LUNs and multi-boot systems I would recommend creating partitions though and setting the correct filesystem id, as you run the risk that other operating systems and/or operators could interpret a unpartitioned disk as free and unused.

0
-2

With OS disk you need to partition the disk, because boot loader read the partition table, but with data disk you don't need disk partition, but i recommend to use lvm with ext4, because maybe in a future your space will be gone

4
  • what is bed in this answer?
    – c4f4t0r
    Nov 28, 2013 at 17:53
  • tulips to the power of roses
    – MikeyB
    Nov 28, 2013 at 17:58
  • It doesn't make all that much sense. I can't tell what you're trying to say in the last sentence, even. Nov 28, 2013 at 17:58
  • what you don't understand?
    – c4f4t0r
    Nov 28, 2013 at 18:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .