Hi,
I have a 2TB hard disc (no ssd) in my system. There are 3 partitions:
/boot/efi on /dev/sda1
one btrsfs partition with / and everything else on /dev/sda2, and
one swap partiton on /dev/sda3.
Now I got my hands on a 500 GB nvme device and plan to add it to my filesystem on /dev/sda2. My question is can I simply call:
btrfs device add /dev/nvme0n1 /
to increase the storage space on my system?
Here are some additional information:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 1.8T 0 part /var
│ /usr/local
│ /srv
│ /root
│ /opt
│ /home
│ /boot/grub2/x86_64-efi
│ /boot/grub2/i386-pc
│ /.snapshots
│ /
└─sda3 8:3 0 32.6G 0 part [SWAP]
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 1.8T 0 part
├─sdb2 8:18 0 537M 0 part
└─sdb3 8:19 0 537M 0 part
sr0 11:0 1 1024M 0 rom
nvme0n1 259:0 0 465.8G 0 disk
I do not plan to change the edit partition, just adding to the file system on the root partition. Should not this be different? Also I have no real use for another mount point, I would prefer to increase the existing file system.
I do not understand what you mean here. There seems to be a language barrier. But when it is an answer to advice #3 of @arvidjaar , I assume you do not understand it.
He means that it is probably better to create one partition on the device (only a partition, no file sytem, no mount point involved, nothing, just the partition) and then use
I see, there was indeed a misunderstanding. So I will create a partition on the nvme and then add the partition to root, ok thanks.
Do I need to create a files system on the partition before adding it?
Of course not. We both said: create a partition (probably encompassing all space available). Nobody talked about creating a file system. In any case that would be overwritten as soon as you let Btrfs / take possession of it.
You seem to be confused by the fact that many so called “partition managers” not only do partitioning, but also other actions related to partitioning. Like creating file systems, creating/editing /etc/fstab entries, creating mount points. But that is all NOT partitioning.
Ok, I created the partition, added the partition to the existing fs and am currently balancing the fs. I did not restart the system, I will probably do so tomorrow. I hope that works
Partition table is customary convention to mark (some area) on disk as being in use. It avoids confusion between used disk and free disk. It avoid confusion whether metadata found on this disk belongs to the disk itself or to something this disk is just a part of. It allows for nice goodies like persistent device names or even meaningful partition description. Etc.
It is by no means mandatory. It is just a useful habit that helps to prevent some handling mistakes.
Not the “free space” as @arvidjaar means. He means space on disk that is not in use for any organized data.
On a partitioned disk it is rather easy to see, because it is all space not allocated to any partition (on a MS-DOS partitioned disk also all space inside an extended partition not allocated to any secondary partition).
On a not partitioned disk it is difficult to find out if the bytes in the disk are organized in data of some sort, or just bytes with random (left over from earlier use) bits. One must know if there is “something” on the disk to take care of.
There is no special “supporting a whole device”. A whole device is not different from a partition or from a LVM Logical Volume, or a MD RAID device, or any other construct that is usable through block special device file. The file system just lays on /dev/whatever.
Please try to understand the difference between the mass storage containers/volumes of whatever type that are available through the block device files /dev/whatever and file systems that may be on such containers.
The file system as such has no knowledge about the type of container it is on. It only uses the space of that container. It reads/writes to an address withing the container and the Kernel translates that to the address on the device. When on whole disk, then the two addresses are the same, when on a partition, the start address of the partition must be added to it, and similar for other container types. But that is NOT the business of the file system.
Well, without ¿acrimony? it’s that the right word?
Support a whole device is similar to support COW, to support RAID, to support SSD, to support anything. A filesystem can support it, or can’t support it.
Support in this context is different that “you can do it”.
I have some experience with old partitions (MBR-MS-DOS scheme) and GPT, also with LVM and Btrfs. I have a entire disk as btrfs in this desktop system and I have some VM with this setting. When you say
and I answer that I expect the filesystem do that, I hope you can point out a bug, an issue… something I don’t know that make better choice avoid that.