ZFS Cannot destroy geom using gpart

Hello everyone, I'm having trouble destroying the partitioning scheme of a drive I have just plugged into my home server setup, in order to increase the redundancy of a zpool containing a vdev of currently 2 mirrors.

From reading what I can find on this forum, I looked into /etc/fstab to make sure no partitions were listed in there, as well as verified whether a partition was somehow mounted and could not find anything.

The disk I am trying to destroy the partitioning scheme for is `/dev/da2`.



Code:
sysadmin@dagger:~ $ cat /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/gpt/efiboot0               /boot/efi       msdosfs rw              2       2
/dev/ada0p2.eli         none    swap    sw              0       0

sysadmin@dagger:~ $ zpool status
  pool: pylon
 state: ONLINE
config:

        NAME           STATE     READ WRITE CKSUM
        pylon          ONLINE       0     0     0
          mirror-0     ONLINE       0     0     0
            da0p1.eli  ONLINE       0     0     0
            da1p1.eli  ONLINE       0     0     0

errors: No known data errors

  pool: zroot
 state: ONLINE
config:

        NAME          STATE     READ WRITE CKSUM
        zroot         ONLINE       0     0     0
          ada0p3.eli  ONLINE       0     0     0

errors: No known data errors

sysadmin@dagger:~ $ dmesg
da2 at umass-sim2 bus 2 scbus9 target 0 lun 0
da2: <Seagate One Touch HDD 1708> Fixed Direct Access SPC-4 SCSI device
da2: Serial Number 00000000NABM68YL
da2: 400.000MB/s transfers
da2: 1907729MB (3907029167 512 byte sectors)
da2: quirks=0x2<NO_6_BYTE>
sysadmin@dagger:~ $ doas gpart destroy /dev/da2
gpart: Device busy
sysadmin@dagger:~ $

I'm pretty sure that passing the `-f` flag would do what I want, but I would like to understand what is holding up the destroy operation beforehand.


Any pointers would be appreciated,

Thanks in advance for your time :)
 
Code:
sysadmin@dagger:~ $ doas gpart show da2
=>        34  3907029100  da2  GPT  (1.8T)
          34           6       - free -  (3.0K)
          40      409600    1  efi  (200M)
      409640  3906619488    2  apple-apfs  (1.8T)
  3907029128           6       - free -  (3.0K)
 
Are you doing this from within a GUI environment? A lot of the DEs have an automount process that will try to mount removable devices for you. Maybe output of "mount | grep -i da0" will tell you.
 
Are you doing this from within a GUI environment? A lot of the DEs have an automount process that will try to mount removable devices for you. Maybe output of "mount | grep -i da0" will tell you.
No, I am logged in via ssh, and there is not even xorg or wayland on this machine.
Code:
sysadmin@dagger:~ $ mount | grep da2
sysadmin@dagger:~ $
 
No, I am logged in via ssh, and there is not even xorg or wayland on this machine.
Code:
sysadmin@dagger:~ $ mount | grep da2
sysadmin@dagger:~ $
Ok, so that implies to me that the removable device is not mounted anywhere (thanks for picking up on my da0 instead of da2)
 
Back
Top