Page 1 of 1

USB disk disappears after creating Storage Pool

Posted: 04 Jan 2025, 02:59
by witchy
Hi folks,

I must be doing something wrong here. Hardware is a F2-423 with a pair of 8TB drives in Raid1 (not TRAID), latest TOS5 installed. I want to add an external USB disk so I can backup one of the volumes in Storage Pool 1 before I add a 256gb SSD and install TOS6.

I have a 4TB drive in a USB3 enclosure, so I plug it into the TNAS and it appears as USB Disk_sdc. So far so good. There's an icon on the top menu bar that says 'USB Disk'.

I create Storage Pool 2 on this disk as 'Single Disk' and the pool is created but... it disappears. I can't create a new volume. I still only have 1 storage pool. In an SSH session I can see that the drive exists and has 4 partitions on it

Code: Select all

sdc             8:32   0  3.7T  0 disk  
|-sdc1          8:33   0  285M  0 part  
|-sdc2          8:34   0  7.6G  0 part  
| `-md9         9:9    0  7.6G  0 raid1 /
|-sdc3          8:35   0  1.9G  0 part  
| `-md8         9:8    0  1.9G  0 raid1 [SWAP]
`-sdc4          8:36   0  3.6T  0 part  
  `-md1         9:1    0  3.6T  0 raid1
No volume. Nor can I create one, as far as the web GUI is concerned this drive doesn't exist apart from in the 'Hard Drive' section of control panel.

Is there something I'm missing? I'm slightly bothered that md8 and md9 are part of Storage Pool 1, and if I unplug the drive and reboot the console tells me it's degraded md8 and md9 and repairs them.

This is the full output of lsblk:

Code: Select all

NAME          MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda             8:0    0  7.3T  0 disk  
|-sda1          8:1    0  285M  0 part  
|-sda2          8:2    0  7.6G  0 part  
| `-md9         9:9    0  7.6G  0 raid1 /
|-sda3          8:3    0  1.9G  0 part  
| `-md8         9:8    0  1.9G  0 raid1 [SWAP]
`-sda4          8:4    0  7.3T  0 part  
  `-md0         9:0    0  7.3T  0 raid1 
    |-vg0-lv1 252:0    0  5.3T  0 lvm   /Volume2
    `-vg0-lv0 252:1    0    2T  0 lvm   /Volume1
sdb             8:16   0  7.3T  0 disk  
|-sdb1          8:17   0  285M  0 part  
|-sdb2          8:18   0  7.6G  0 part  
| `-md9         9:9    0  7.6G  0 raid1 /
|-sdb3          8:19   0  1.9G  0 part  
| `-md8         9:8    0  1.9G  0 raid1 [SWAP]
`-sdb4          8:20   0  7.3T  0 part  
  `-md0         9:0    0  7.3T  0 raid1 
    |-vg0-lv1 252:0    0  5.3T  0 lvm   /Volume2
    `-vg0-lv0 252:1    0    2T  0 lvm   /Volume1
sdc             8:32   0  3.7T  0 disk  
|-sdc1          8:33   0  285M  0 part  
|-sdc2          8:34   0  7.6G  0 part  
| `-md9         9:9    0  7.6G  0 raid1 /
|-sdc3          8:35   0  1.9G  0 part  
| `-md8         9:8    0  1.9G  0 raid1 [SWAP]
`-sdc4          8:36   0  3.6T  0 part  
  `-md1         9:1    0  3.6T  0 raid1 
I've been a TrueNAS (and FreeNAS) user for a decade so I'm dipping my toes in the water of TOS. So far I've broken it twice.

Cheers
Witchy

*edit* I've noticed the dmesg output matches md1 being a single 4TB drive, with md0 being Storage Pool 1 and its 2 Volumes.

Code: Select all

[81536.792777] sd 3:0:0:0: [sdc] Spinning up disk...
[81537.899269] .ready
[81537.899544] sd 3:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
[81537.899691] sd 3:0:0:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[81537.899722] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[81537.900088] sd 3:0:0:0: [sdc] Write Protect is off
[81537.900105] sd 3:0:0:0: [sdc] Mode Sense: 47 00 00 08
[81537.900458] sd 3:0:0:0: [sdc] Disabling FUA
[81537.900474] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[81537.970451]  sdc:
[81537.982006] sd 3:0:0:0: [sdc] Attached SCSI disk
[81539.039284] nfsd: last server has exited, flushing export cache
[81540.285187] NFSD: Using UMH upcall client tracking operations.
[81540.285220] NFSD: starting 90-second grace period (net f0000000)
[81633.584287] nfsd: last server has exited, flushing export cache
[81633.927717]  sdc:
[81634.757448] NFSD: Using UMH upcall client tracking operations.
[81634.757480] NFSD: starting 90-second grace period (net f0000000)
[81635.337288]  sdc:
[81647.419001] udevd[16510]: error opening ATTR{/sys/devices/virtual/block/md1/md/sync_speed_min} for writing: Permission denied
[81647.419061] udevd[16510]: error opening ATTR{/sys/devices/virtual/block/md1/md/sync_speed_max} for writing: Permission denied
[81647.471970] md/raid1:md1: active with 1 out of 1 mirrors
[81647.472012] md1: detected capacity change from 0 to 7791650816
[81732.874799] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[81732.953131] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

Re: USB disk disappears after creating Storage Pool

Posted: 04 Jan 2025, 03:30
by witchy
Is it because they've got the same BLKID I wonder.

Code: Select all

/dev/md0: UUID="Ns8EZQ-2E4c-lHdg-4qGc-S1DK-JwJc-x2y71S" TYPE="LVM2_member"
/dev/md1: UUID="Ns8EZQ-2E4c-lHdg-4qGc-S1DK-JwJc-x2y71S" TYPE="LVM2_member"
I see how it works now, since we're using LVM. Assuming the partition layout is standard for all TNAS disks this means I should be able to either assign a new BLKID to /dev/md1 (which may make it magically appear in the GUI), or delete and recreate md1. Then vgcreate to add vg1, followed by lvcreate to get me /dev/mapper/lv1-vg0 which I can format as ext4 and mount on /Volume3. I shouldn't HAVE to of course, but hey :D

Re: USB disk disappears after creating Storage Pool

Posted: 05 Jan 2025, 01:52
by witchy
OK, now that I know we're just using busybox Linux and I've seen the default partition structure of each disk I've just removed /dev/md1 from the system, formatted /dev/sdc4 with ext4, mounted it as /Volume3 and am rsync-ing the folders of Volume2 I need copied.

That'll do.

Hopefully this might be of use to someone, don't be scared of SSH.