gpart device busy trying to remove partition
0
votes
0
answers
324
views
The situation is the following:
# lsblk
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
da0 0:92 36G GPT - -
-:- 33M - - -
da0p3 0:95 1.0G freebsd-swap gpt/swapfs -
-:- 37G - - -
md0 0:106 4.0G ufs - /
I want to delete da0p3. So I try that:
# gpart delete -i 3 da0
gpart: Device busy
Ok, maybe I need to turn off swap?
# swapoff /dev/da0p3
swapoff: /dev/da0p3: Invalid argument
So swap is already turned off. Maybe it is mounted somewhere?
# mount
/dev/md0 on / (ufs, local, soft-updates)
devfs on /dev (devfs)
Looks like it also isn't mounted. At this point I have no clue how to delete this partition. Any ideas?
I am running FreeBSD 14.1. I moved the filesystem to a RAM disk so I could delete the current filesystem and re-do it.
Asked by Jomy
(121 rep)
Sep 13, 2024, 09:56 AM