On 2014-06-18 16:10, Chris Murphy wrote: > > On Jun 18, 2014, at 1:29 PM, Daniel Cegiełka <daniel.cegie...@gmail.com> > wrote: > >> Hi, >> I created btrfs directly to disk using such a scheme (no partitions): >> >> dd if=/dev/zero of=/dev/sda bs=4096 >> mkfs.btrfs -L dev_sda /dev/sda >> mount /dev/sda /mnt >> >> cd /mnt >> btrfs subvolume create __active >> btrfs subvolume create __active/rootvol >> btrfs subvolume create __active/usr >> btrfs subvolume create __active/home >> btrfs subvolume create __active/var >> btrfs subvolume create __snapshots >> >> cd / >> umount /mnt >> mount -o subvol=__active/rootvol /dev/sda /mnt >> mkdir /mnt/{usr,home,var} >> mount -o subvol=__active/usr /dev/sda /mnt/usr >> mount -o subvol=__active/home /dev/sda /mnt/home >> mount -o subvol=__active/var /dev/sda /mnt/var >> >> # /etc/fstab >> UID=ID / btrfs rw,relative,space_cache,subvol=__active/rootvol 0 0 >> UUID=ID /usr btrfs rw,relative,space_cache,subvol=__active/usr 0 0 >> UUID=ID /home btrfs rw,relative,space_cache,subvol=__active/home 0 0 >> UUID=ID /var btrfs rw,relative,space_cache,subvol=__active/var 0 0 > > rw and space_cache are redundant because they are default; and relative is > not a valid mount option. All you need is subvol= > >> Everything works fine. Is such a solution is recommended? In my >> opinion, the creation of the partitions seems to be completely >> unnecessary if you can use btrfs. > > It's firmware specific. Some BIOS firmwares will want to see a valid MBR > partition map at LBA 0, not just boot code. Others only care to blindly > execute the boot code which would be put in the Btrfs bootloader pad (64KB). > I don't know if parted 3.1 recognizes partitionless disks with Btrfs though > so it might slightly increase the risk that it's treated as something other > than what it is. > > For UEFI firmware, it would definitely need to be partitioned since an EFI > System partition is required. > > Chris Murphy-- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > On most hardware, I would definitely suggest at least adding a minimal sized partition table, the people who design the BIOS code on most systems make too many assumptions to trust their code to work correctly. That said, I regularly use BTRFS on flat devices for the root filesystems for Xen PV Guest systems, systems that boot from SAN, and secondary disks on other systems with no issues whatsoever.
smime.p7s
Description: S/MIME Cryptographic Signature