You are not logged in.

#1 2016-10-28 00:07:50

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

duplicate uuid - need a way out without zfs data loss

i gdisk copied the partition table from my zfs3 drive, to my zfs4 drive, then i changed the guid, enrolled the device by its unique label, and now i see it still hung on to the old uuid, my bad.  Isnt this incorrect, or is that because its all part of the same pool? How can i correct this? 

$ blkid
/dev/sda1: LABEL="san" UUID="11416166127217488013" UUID_SUB="14518459066712051675" TYPE="zfs_member" PARTLABEL="zfs-8c23d44bfc8d2964" PARTUUID="c33a6a7e-b677-4046-b070-3b018fd65500"
/dev/sdc1: LABEL="san" UUID="11416166127217488013" UUID_SUB="11804841023597111856" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="3a9c0e72-b9d0-4221-bf04-693e2e8647f6"
/dev/sdd1: LABEL="san" UUID="11416166127217488013" UUID_SUB="2919623713328565230" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="80dca56c-c70c-2040-bc67-9e1d0b3e5550"
/dev/sdb2: UUID="66431d3d-2445-4a57-8852-788663a1f87d" TYPE="swap" PARTLABEL="Linux swap" PARTUUID="0fc9c659-f49f-4187-836a-12a4f804de75"
/dev/sdb3: LABEL="root" UUID="1a0461bd-92d6-4230-b3e1-7cea37d58683" TYPE="ext3" PARTLABEL="Linux filesystem" PARTUUID="89534d76-10b9-4dff-9914-4ef23b975429"
/dev/sdb4: LABEL="home" UUID="57b2807e-852f-4600-b239-598a1ec98806" TYPE="ext3" PARTLABEL="Linux filesystem" PARTUUID="73be57e8-19d6-413b-b8bc-df7643b2e74a"
/dev/sdb5: LABEL="gpt_backup" UUID="47cbe2f2-25cd-4a5e-835a-21ad137736cc" TYPE="ext2" PARTLABEL="Linux filesystem" PARTUUID="12d8d174-1c23-40f9-8d0e-3648edc5e283"
/dev/sde1: LABEL="san" UUID="11416166127217488013" UUID_SUB="3127014554633437690" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="0e812763-f6f4-2441-9fa3-2ae11b98d483"
/dev/sda9: PARTUUID="89c3b986-42c8-be40-b8a6-5222503fc214"
/dev/sdc9: PARTUUID="06025b50-d575-4970-b026-b34c0e1d2271"
/dev/sdd9: PARTUUID="18e909d9-f50d-2d4a-af8b-c399980f3889"
/dev/sdb1: PARTLABEL="BIOS boot partition" PARTUUID="67cac3f9-4f1c-4d57-8ef5-16270641fc49"
/dev/sde9: PARTUUID="d7713e72-7b58-8b42-bee1-60ce26d06a27"

Also, Im getting a sparse error, as if zfs flags it to be available, but when tried to write, it errors, not sure if its related to the dup uuid, doubt it though. 
note, its a win system runnign freefilesync doing the pushing, and an arch(of course) zfs.

 Info: Cannot write file attributes of "\\FALCON\san\vault\redtail\e\PublicArchive\videos\Reality Series\Out Of The Wild\Season 1 The Alaska Experiment\Alaska.ExperimentS01E04.alaska.bites.back.hdtv.xvid.avi.ffs_tmp".
                   Error Code 1: Incorrect function. (DeviceIoControl, FSCTL_SET_SPARSE)
                   -> Automatic retry in 0 seconds...

Last edited by wolfdogg (2016-10-28 00:11:33)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#2 2016-10-28 01:13:08

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: duplicate uuid - need a way out without zfs data loss

Partitions look correct to me, though I'm confused about what exactly you did/trying to achieve.
ZFS manages the whole disk (if that's what you've given it) and has its own on-disk structure. The initial header is designed to look like a valid GPT partition table to partition tools, but it isn't. You mess with it at your own peril.
When you add a whole disk to a pool, ZFS will overwrite anything already on the disk; so it's pointless partitioning a disk, as ZFS doesn't use it.

Sparse file problem looks like a bug. If it's not already reported/fixed upstream, you should report it to them.

Offline

#3 2016-10-28 09:17:35

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: duplicate uuid - need a way out without zfs data loss

Thanks for that.  on the first note, i did that because it was an MBR table first, and was some complications around that.  No success on zpool add dry runs. I didnt want to risk adding it as /dev/sdc and lose it right after reboot. I always stick with guid, or label.  So, carefully going about it, i copied over the partition table from another existing san drive to give it a clean valid table and tried again.  The dry run passed this time (-n option), so i altered this new drive to random guid, then zpool added it.

Now, seeing the uuid the same on i, i paniced when i posted this, however in hindsight, the others are also carrying the same uuid, and this makes sense to me NOW, that i think of it, its all the same drive, one array.  I was thinking the UUID should be unique to the hardware DEVICE, however it appears its unique to the san array as a whole based on the fact that your saying it looks normal, and since more than just the one i copied over the partition table from carry that same UUID.  It must have been automatically designated, as you mentioned zfs taking care of it. 

On the sparse issue, yeah thanks, i had already reported it, no response there yet.  thanks , i assumed the same thing.  Ill keep an eye out for that one.

Last edited by wolfdogg (2016-10-28 09:27:40)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#4 2016-10-28 12:19:03

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: duplicate uuid - need a way out without zfs data loss

I use the /dev/disk/by-id/... entries that are based on device model and serial number. Those are constant regardless of what's written to the disk, unlike the other “by-XXX” entries.

Offline

Board footer

Powered by FluxBB