% lsblk -o NAME,PARTLABEL
NAME PARTLABEL
sda
├─sda1 Linux filesystem
├─sda2 Linux filesystem
├─sda3 Linux /home
│ └─home
└─sda4 Linux swap
I used `cgdisk` option `m` as @paneless suggested.
]]>I'm not changing this from solved, nor am I worried. Still. Something to think about.
]]>Do not make a block-level copy of a btrfs filesystem to a block device, and then try to mount either the original or the copy while both are visible to the same kernel.
.
.
.
This problem is due to the UUID on the original and the copy being the same. This confuses the kernel, and it can end up writing updates to the wrong filesystem, causing massive data corruption.
$ sgdisk -p /dev/sda
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 43292AF9-FF60-4921-85ED-40A847FE8B90
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 5860533134 2.7 TiB 8300 urbackup
$ sgdisk -p /dev/sdb
...
Number Start (sector) End (sector) Size Code Name
1 2048 5860533134 2.7 TiB 8300 urbackup
]$ ls -l /dev/disk/by-partlabel
total 0
lrwxrwxrwx 1 root root 10 Jun 27 03:15 urbackup -> ../../sda1
Both of these drives will try to enumerate as /dev/disk/by-partlabel/urbackup which annoys systemd. I can solve this with the same fix I used for zfs by giving each partition label a unique name. gdisk can be used by hand or sgdisk by command line:
sgdisk -c1:"urbackup1" /dev/sda
sgdisk -c1:"urbackup2" /dev/sdb
Edit /etc/fstab and /dev/mdadm.conf /etc/mdadm.conf as necessary.
There's 101 ways to mess this up so don't do this remotely or you'll be making a midnight run to fix the server.
]]>[ 9.378340] systemd[1]: Device dev-disk-by\x2dpartlabel-Linux\x5cx20filesystem.device appeared twice with different sysfs paths /sys/devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sda/sda3 and /sys/devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sda/sda4
I have the same problem as OP, though in my case I have a raid, where I can't just change the labels.
Same thing for me. Anyone know how to fix this?
]]>The problem is that every partition in a btrfs volume has the same label.
I don't understand this regression feature !
Ok for the same label, but in the btrfs the partitions have the same uuid ?
Yes. Every member of a btrfs volume has the same UUID. At least on my system. Once the semester is over and things settle down, I'll see about getting onto the IRC and figuring out if something can be done. These errors seem to be benign, but that doesn't mean they will stay that way.
[edit] For example:
$ sudo blkid |grep 3873
/dev/sdb2: LABEL="aroot" UUID="3873d8ba-9472-4d92-ab0d-e94574bd0eae" UUID_SUB="cdd62d1a-c0ae-4e19-ac6d-cc6973f607b1" TYPE="btrfs" PARTUUID="bed43306-02"
/dev/sde1: LABEL="aroot" UUID="3873d8ba-9472-4d92-ab0d-e94574bd0eae" UUID_SUB="85308e59-62ba-4675-8167-f5d2fb7f1cbf" TYPE="btrfs" PARTUUID="e5bf7f39-01"
/dev/sdf4: LABEL="aroot" UUID="3873d8ba-9472-4d92-ab0d-e94574bd0eae" UUID_SUB="df84655d-c186-4198-a360-782fa4ad97f2" TYPE="btrfs" PARTUUID="10e2bec1-04"