Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAID array replaced by ZFS pool, but still appears as RAID #698

Closed
MrAlucardDante opened this issue Jun 16, 2022 · 6 comments
Closed

RAID array replaced by ZFS pool, but still appears as RAID #698

MrAlucardDante opened this issue Jun 16, 2022 · 6 comments

Comments

@MrAlucardDante
Copy link

I used to have a 2x2TB RAID 1 array created with mdadm (called SERVEUR-BB).

I then added 2 extra drives, deleted every partition and mount points for the older drives and created a ZFS pool with 4x2TB HDD (2 mirrored vDev) which results in a 4TB array (called data-pool).

I have removed the old RAID array in /etc/fstab, /proc/mdstat returns nothing as well as mdadm --monitor --scan.

For some reason, the 2 drives that were in RAID are not updated in the output and shows as RAID member with their former label, instead of being ZFS members, like the 2 new drives.

dh -kPT:

Filesystem                        Type  1024-blocks       Used  Available Capacity Mounted on
tmpfs                             tmpfs     1606824      13372    1593452       1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4    102626232   19384420   77982548      20% /
tmpfs                             tmpfs     8034120          0    8034120       0% /dev/shm
tmpfs                             tmpfs        5120          0       5120       0% /run/lock
/dev/sdb2                         ext4      1992552     248240    1623072      14% /boot
data-pool                         zfs    3771705088 1642273280 2129431808      44% /mnt/data

fdisk -l:

Disk /dev/loop0: 61,92 MiB, 64925696 bytes, 126808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 61,93 MiB, 64933888 bytes, 126824 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 79,95 MiB, 83832832 bytes, 163736 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 44,7 MiB, 46870528 bytes, 91544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 46,95 MiB, 49233920 bytes, 96160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 11C78F98-B4BC-A54F-80B6-11108B0DD7F3

Device          Start        End    Sectors  Size Type
/dev/sda1        2048 3907012607 3907010560  1,8T Solaris /usr & Apple ZFS
/dev/sda9  3907012608 3907028991      16384    8M Solaris reserved 1


Disk /dev/sdc: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F3DC9634-4448-0741-B01D-ECB016788FCC

Device          Start        End    Sectors  Size Type
/dev/sdc1        2048 3907012607 3907010560  1,8T Solaris /usr & Apple ZFS
/dev/sdc9  3907012608 3907028991      16384    8M Solaris reserved 1


Disk /dev/sdd: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 23781841-21CF-D34D-9341-4C6B99D04770

Device          Start        End    Sectors  Size Type
/dev/sdd1        2048 3907012607 3907010560  1,8T Solaris /usr & Apple ZFS
/dev/sdd9  3907012608 3907028991      16384    8M Solaris reserved 1


Disk /dev/sdb: 223,57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: D11432FB-2775-4F71-A25B-859D9AB38630

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048      4095      2048     1M BIOS boot
/dev/sdb2     4096   4198399   4194304     2G Linux filesystem
/dev/sdb3  4198400 468858879 464660480 221,6G Linux filesystem


Disk /dev/sde: 1,82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM008-2FR1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 546D804D-22AA-5148-8FD8-0DBD24B07745

Device          Start        End    Sectors  Size Type
/dev/sde1        2048 3907012607 3907010560  1,8T Solaris /usr & Apple ZFS
/dev/sde9  3907012608 3907028991      16384    8M Solaris reserved 1


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

zpool status

  pool: data-pool
 state: ONLINE
  scan: scrub repaired 0B in 01:35:25 with 0 errors on Sun Jun 12 01:59:26 2022
config:

        NAME        STATE     READ WRITE CKSUM
        data-pool   ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            sda     ONLINE       0     0     0
            sdd     ONLINE       0     0     0
          mirror-1  ONLINE       0     0     0
            sdc     ONLINE       0     0     0
            sde     ONLINE       0     0     0

errors: No known data errors

docker exec dashdot yarn cli raw-data --storage --custom blockDevices:

$ node dist/apps/cli/main.js raw-data --storage --custom blockDevices
Disk Layout: [
  {
    device: '/dev/sda',
    type: 'HD',
    name: 'ST2000DM001-1CH1',
    vendor: 'Seagate',
    size: 2000398934016,
    bytesPerSector: null,
    totalCylinders: null,
    totalHeads: null,
    totalSectors: null,
    totalTracks: null,
    tracksPerCylinder: null,
    sectorsPerTrack: null,
    firmwareRevision: 'CC27',
    serialNum: '',
    interfaceType: 'SATA',
    smartStatus: 'unknown',
    temperature: null
  },
  {
    device: '/dev/sdb',
    type: 'SSD',
    name: 'KINGSTON SA400S3',
    vendor: 'Kingston Technology',
    size: 240057409536,
    bytesPerSector: null,
    totalCylinders: null,
    totalHeads: null,
    totalSectors: null,
    totalTracks: null,
    tracksPerCylinder: null,
    sectorsPerTrack: null,
    firmwareRevision: 'B1E1',
    serialNum: '',
    interfaceType: 'SATA',
    smartStatus: 'unknown',
    temperature: null
  },
  {
    device: '/dev/sdc',
    type: 'HD',
    name: 'ST2000DM008-2FR1',
    vendor: 'Seagate',
    size: 2000398934016,
    bytesPerSector: null,
    totalCylinders: null,
    totalHeads: null,
    totalSectors: null,
    totalTracks: null,
    tracksPerCylinder: null,
    sectorsPerTrack: null,
    firmwareRevision: '0001',
    serialNum: '',
    interfaceType: 'SATA',
    smartStatus: 'unknown',
    temperature: null
  },
  {
    device: '/dev/sdd',
    type: 'HD',
    name: 'ST2000DM008-2FR1',
    vendor: 'Seagate',
    size: 2000398934016,
    bytesPerSector: null,
    totalCylinders: null,
    totalHeads: null,
    totalSectors: null,
    totalTracks: null,
    tracksPerCylinder: null,
    sectorsPerTrack: null,
    firmwareRevision: '0001',
    serialNum: '',
    interfaceType: 'SATA',
    smartStatus: 'unknown',
    temperature: null
  },
  {
    device: '/dev/sde',
    type: 'HD',
    name: 'ST2000DM008-2FR1',
    vendor: 'Seagate',
    size: 2000398934016,
    bytesPerSector: null,
    totalCylinders: null,
    totalHeads: null,
    totalSectors: null,
    totalTracks: null,
    tracksPerCylinder: null,
    sectorsPerTrack: null,
    firmwareRevision: '0001',
    serialNum: '',
    interfaceType: 'SATA',
    smartStatus: 'unknown',
    temperature: null
  }
]
FS Size [
  {
    fs: 'overlay',
    type: 'overlay',
    size: 105089261568,
    used: 19850518528,
    available: 79853256704,
    use: 19.91,
    mount: '/'
  },
  {
    fs: '/dev/mapper/ubuntu--vg-ubuntu--lv',
    type: 'ext4',
    size: 105089261568,
    used: 19850518528,
    available: 79853256704,
    use: 19.91,
    mount: '/etc/os-release'
  }
]
Custom [blockDevices] [
  {
    name: 'sda',
    type: 'disk',
    fsType: '',
    mount: '',
    size: 2000398934016,
    physical: 'HDD',
    uuid: '',
    label: '',
    model: 'ST2000DM001-1CH1',
    serial: '',
    removable: false,
    protocol: 'sata',
    group: undefined
  },
  {
    name: 'sdb',
    type: 'disk',
    fsType: '',
    mount: '',
    size: 240057409536,
    physical: 'SSD',
    uuid: '',
    label: '',
    model: 'KINGSTON SA400S3',
    serial: '',
    removable: false,
    protocol: 'sata',
    group: undefined
  },
  {
    name: 'sdc',
    type: 'disk',
    fsType: '',
    mount: '',
    size: 2000398934016,
    physical: 'HDD',
    uuid: '',
    label: '',
    model: 'ST2000DM008-2FR1',
    serial: '',
    removable: false,
    protocol: 'sata',
    group: undefined
  },
  {
    name: 'sdd',
    type: 'disk',
    fsType: '',
    mount: '',
    size: 2000398934016,
    physical: 'HDD',
    uuid: '',
    label: '',
    model: 'ST2000DM008-2FR1',
    serial: '',
    removable: false,
    protocol: 'sata',
    group: undefined
  },
  {
    name: 'sde',
    type: 'disk',
    fsType: '',
    mount: '',
    size: 2000398934016,
    physical: 'HDD',
    uuid: '',
    label: '',
    model: 'ST2000DM008-2FR1',
    serial: '',
    removable: false,
    protocol: 'sata',
    group: undefined
  },
  {
    name: 'loop0',
    type: 'loop',
    fsType: 'squashfs',
    mount: '',
    size: 64925696,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'loop1',
    type: 'loop',
    fsType: 'squashfs',
    mount: '',
    size: 64933888,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'loop2',
    type: 'loop',
    fsType: 'squashfs',
    mount: '',
    size: 83832832,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'loop4',
    type: 'loop',
    fsType: 'squashfs',
    mount: '',
    size: 46870528,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'loop5',
    type: 'loop',
    fsType: 'squashfs',
    mount: '',
    size: 49233920,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sda1',
    type: 'part',
    fsType: 'linux_raid_member',
    mount: '',
    size: 2000389406720,
    physical: '',
    uuid: '100776c9-bc80-9e31-c6d1-93f8c418c2d1',
    label: 'SERVEUR-BB:0',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sda9',
    type: 'part',
    fsType: '',
    mount: '',
    size: 8388608,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdb1',
    type: 'part',
    fsType: '',
    mount: '',
    size: 1048576,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdb2',
    type: 'part',
    fsType: 'ext4',
    mount: '',
    size: 2147483648,
    physical: '',
    uuid: 'f4fb588e-039a-40e7-9e7c-be1565cab7ac',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdb3',
    type: 'part',
    fsType: 'LVM2_member',
    mount: '',
    size: 237906165760,
    physical: '',
    uuid: '1yMIdP-6v1A-fXEE-Q8La-3JP4-yGXD-N3tG4Z',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdc1',
    type: 'part',
    fsType: 'linux_raid_member',
    mount: '',
    size: 2000389406720,
    physical: '',
    uuid: '100776c9-bc80-9e31-c6d1-93f8c418c2d1',
    label: 'SERVEUR-BB:0',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdc9',
    type: 'part',
    fsType: '',
    mount: '',
    size: 8388608,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdd1',
    type: 'part',
    fsType: 'zfs_member',
    mount: '',
    size: 2000389406720,
    physical: '',
    uuid: '15332071847395975336',
    label: 'data-pool',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sdd9',
    type: 'part',
    fsType: '',
    mount: '',
    size: 8388608,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sde1',
    type: 'part',
    fsType: 'zfs_member',
    mount: '',
    size: 2000389406720,
    physical: '',
    uuid: '15332071847395975336',
    label: 'data-pool',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  },
  {
    name: 'sde9',
    type: 'part',
    fsType: '',
    mount: '',
    size: 8388608,
    physical: '',
    uuid: '',
    label: '',
    model: '',
    serial: '',
    removable: false,
    protocol: '',
    group: undefined
  }
]
@sebhildebrandt
Copy link
Owner

@MrAlucardDante ... can you update me on what you would expect or seems to be wrong ... I am a bit confused and maybe a little bit more explanation could lead me to a more clear view on what might be wrong ;-) Thank you in advance ...

Generally: What output you would expect (what is to much / wrong / should be added) and based on which of the underlying commands would be very helpful.

@MrAlucardDante
Copy link
Author

sure @sebhildebrandt

sda1 and sdc1 should have the same label and fsType as sde1 and sdd1 (data-pool and zfs-member), like shown by the fdisk command.

@sebhildebrandt
Copy link
Owner

@MrAlucardDante ok, let me check this tonight ... if I have further questions, I will contact you again...

@sebhildebrandt
Copy link
Owner

Ok, still a little confused ... sorry for asking again ;-)

systeminformation has the following commands to determine file / disk structure:

diskLayout()
blockDevices()
fsSize()

See also https://systeminformation.io/filesystem.html

To determine diskLayout, I use the following underlying command:

lsblk -ablJO

To determine blockDevices, I use the following underlying command:

lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,TRAN,SERIAL,LABEL,MODEL,OWNER 2>/dev/null

To determine fsSize, I use the following underlying command:

df -lkPTx squashfs

or if this gives an error

df -kPT

Can you provide the output of those three commands and the corresponding output of the three System Information functions ...

It would be fine to run the systeminformation commands natively ... e.g. you clone the systeminformation repo and then run

npm run test

there you chose d, e and f

Can you then mark, what you think is wrong in which of the three systeminformation outputs? Thank you for all your help here!!

@MrAlucardDante
Copy link
Author

So it looks like when I switched from linux raid to zfs, some labels and fstype were kept, even though I deleted every partition on the disks, removed all the mdadm configuration and used whole disks when creating the pool.

So everything is working as intended on your side, I'll have to figure how to change the fstype and label on the GPT side of things on my end.

If anyone knows how to do that, I'm currently looking at exporting and re-importing the pool, but I don't want to mess my array and having to copy 3TB of backup 😄

Thank you for your time, the issue can be closed.

blockDevices.txt
diskLayout.txt
fsSize.txt

@sebhildebrandt
Copy link
Owner

@MrAlucardDante thank you for testing. Closing it for now. Feel free to reopen it if you see any problems on my side ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants