Replaced drive from command line -- no swap partition?

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
One of my pools was functioning with no reported errors although smartctl indicated Current_Pending_Sector
and Offline_Uncorrectable counts of 24 on one of the drives, so I decided to replace it anyway.

I couldn't find a way to do that from the GUI because the pool showed as Healthy and did not detect a problem drive with an option to replace it, so I replaced the drive from the command line:

zpool pool_name old_drive [by its gptid label] new_drive [by its /dev/daX id].

The pool is resilvering (four days to go), but when I execute

ls -l /dev/daX

it does not show two partitions, as the other drives in that pool do. Is this a problem? If so, how do I fix it?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
That's normal... there's a process you can use which includes partitioning the disk first, then using the second (data) partition gptid rather than the whole disk at the CLI.

If you have enough other disks with a swap partition, it's nothing to be concerned about.

The fix would be to offline, wipe and then replace it with itself using the GUI.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I couldn't find a way to do that from the GUI because the pool showed as Healthy and did not detect a problem drive with an option to replace it
If you couldn't find the option to replace the disk, you were looking in the wrong place (you should have been at the pool status page; the kebob menu for each disk in the pool gives you the options of edit, offline, and replace)--nothing in the process depends on FreeNAS deciding there's "a problem drive." There are a few problems with the procedure you followed:
  • As you've already seen, the swap partition isn't there--not too big a deal by itself, but not optimal
  • In fact, there's no partition table at all on the disk
  • And by referring to the disk with its daX label, there's a (slight) risk of ZFS not recognizing it if that label should change.
The best way to fix it is to do what @sretalla says: offline the disk, wipe it, and replace it using the GUI. Failing that (for whatever reason), do it at the CLI properly--this resource includes instructions to do that:
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you use the command line like I prefer too, you need to perform all the steps. You should have partitioned the new drive and then
zpool replace pool gptid/oldid gptid/newid

Never add raw drives.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
If you couldn't find the option to replace the disk, you were looking in the wrong place (you should have been at the pool status page; the kebob menu for each disk in the pool gives you the options of edit, offline, and replace)--nothing in the process depends on FreeNAS deciding there's "a problem drive." There are a few problems with the procedure you followed:
  • As you've already seen, the swap partition isn't there--not too big a deal by itself, but not optimal
  • In fact, there's no partition table at all on the disk
  • And by referring to the disk with its daX label, there's a (slight) risk of ZFS not recognizing it if that label should change.
The best way to fix it is to do what @sretalla says: offline the disk, wipe it, and replace it using the GUI. Failing that (for whatever reason), do it at the CLI properly--this resource includes instructions to do that:
The pool status page (for both pools) is blank except for the column headings. If I click REFRESH, I get nothing but a white rectangle in the middle of the screen:

'Status:

Time Remaining: 268950 Seconds

Errors: 0

Date:

NameReadWrite
'
(Beside each heading are up/down arrows that don't reproduce here, and neither do the Checksum and Status headings.)

I'm using FreeNAS-11.3-U4. I see there is a pending update, but the details did not seem to include anything that applies to my system.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The pool status page (for both pools) is blank except for the column headings.
That points to more serious problems--are you sure your boot device/pool are OK? And in this case, I guess it's up to you the sequence in which you want to address these problems--if you want to take care of the disk first, I'd still offline it, partition it properly, and replace it into the pool.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
That points to more serious problems--are you sure your boot device/pool are OK? And in this case, I guess it's up to you the sequence in which you want to address these problems--if you want to take care of the disk first, I'd still offline it, partition it properly, and replace it into the pool.
But the pools do show as HEALTHY: it's only when I click STATUS that the display misbehaves. And zpool status from the command line shows the pools as OK.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
But the pools do show as HEALTHY: it's only when I click STATUS that the display misbehaves. And zpool status from the command line shows the pools as OK.
And I have now discovered that this messed-up STATUS (non-)display occurs only with the Chrome browser, which I was using on my Linux machine to access the FreeNAS box: everything is fine when I use Firefox or Brave.
 
Top