Date: Thu, 16 Apr 2020 19:44:35 +0200 From: Harry Schmalzbauer <freebsd@omnilan.de> To: ian@dijix.com, "freebsd-stable@freebsd.org >> freebsd-stable" <freebsd-stable@freebsd.org> Subject: Re: Issue with gpart "Device Busy" Message-ID: <2a7532fd-6fee-deb6-c133-6150aaf1b8c2@omnilan.de> In-Reply-To: <3BF9F702-81FD-4156-B6A2-E32C549ACA90@dijix.com> References: <3BF9F702-81FD-4156-B6A2-E32C549ACA90@dijix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 15.04.2020 um 20:35 schrieb ian@dijix.com: > I have an issue with gpart, it will not let me delete partition ada0p2 responding with “Device Busy” > The man page gpart(8) says this may be shown if a partition exists but I cannot seem to delete partition 2 in my case via gpart delete or gpart destroy > > This is a used disk but new to the machine, I can modify the partition type and create partitions before and after partition 2 but I cannot delete it. > > Here’s what I have tried so far: > > > root@beastie:~ # gpart show > => 34 1250263661 ada0 GPT (596G) > 34 409606 - free - (200M) > 409640 1249591904 2 freebsd-ufs (596G) > 1250001544 262151 - free - (128M) > > => 40 976773088 ada1 GPT (466G) > 40 1024 1 freebsd-boot (512K) > 1064 984 - free - (492K) > 2048 4194304 2 freebsd-swap (2.0G) > 4196352 972576768 3 freebsd-zfs (464G) > 976773120 8 - free - (4.0K) > > root@beastie:~ # gpart delete -i2 ada0 > gpart: Device busy : : > : > root@beastie:~ # gpart destroy -F ada0 > gpart: Device busy There might still be situations where 'sysctl kern.geom.debugflags=16' helps, but I never needed it in the last years (since 7.x I guess). Are you sure p2 (-i2) of ada0, most likely home for a ufs filesystem, isn't mounted anymore? Was it a mountpoint inside a jail? Stopping the jail might leave network related active sockets blocking the filesystem (reboot without starting the jail before deleteing the partition should work in that case). -harry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2a7532fd-6fee-deb6-c133-6150aaf1b8c2>