Advertisement
grahamperrin

FreeBSD – glabel clear -v /dev/da1p1 – Can't clear metadata on /dev/da1p1: Invalid argument.

Jun 13th, 2022 (edited)
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.57 KB | None
  1. root@mowa219-gjp4-8570p-freebsd:~ # gdisk /dev/da1
  2. GPT fdisk (gdisk) version 1.0.9
  3.  
  4. Partition table scan:
  5. MBR: not present
  6. BSD: not present
  7. APM: not present
  8. GPT: not present
  9.  
  10. Creating new GPT entries in memory.
  11.  
  12. Command (? for help): n
  13. Partition number (1-128, default 1):
  14. First sector (34-30277598, default = 2048) or {+-}size{KMGTP}:
  15. Last sector (2048-30277598, default = 30275583) or {+-}size{KMGTP}:
  16. Current type is A503 (FreeBSD UFS)
  17. Hex code or GUID (L to show codes, Enter = A503): a504
  18. Changed type of partition to 'FreeBSD ZFS'
  19.  
  20. Command (? for help): w
  21.  
  22. Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
  23. PARTITIONS!!
  24.  
  25. Do you want to proceed? (Y/N): y
  26. OK; writing new GUID partition table (GPT) to /dev/da1.
  27. Warning: The kernel may continue to use old or deleted partitions.
  28. You should reboot or remove the drive.
  29. The operation has completed successfully.
  30. root@mowa219-gjp4-8570p-freebsd:~ # gpart show -l da1
  31. => 34 30277565 da1 GPT (14G)
  32. 34 2014 - free - (1.0M)
  33. 2048 30273536 1 FreeBSD ZFS (14G)
  34. 30275584 2015 - free - (1.0M)
  35.  
  36. root@mowa219-gjp4-8570p-freebsd:~ # lsblk da1
  37. DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
  38. da1 0:190 14G GPT - -
  39. <FREE> -:- 1.0M - - -
  40. da1p1 0:191 14G freebsd-zfs gpt/FreeBSD%20ZFS <ZFS>
  41. <FREE> -:- 1.0M - - -
  42. root@mowa219-gjp4-8570p-freebsd:~ # glabel stop "FreeBSD ZFS"
  43. glabel: Label FreeBSD ZFS is invalid.
  44. root@mowa219-gjp4-8570p-freebsd:~ # glabel stop FreeBSD\ ZFS
  45. glabel: Label FreeBSD ZFS is invalid.
  46. root@mowa219-gjp4-8570p-freebsd:~ # glabel stop FreeBSD%20ZFS
  47. root@mowa219-gjp4-8570p-freebsd:~ # gpart show -l da1
  48. => 34 30277565 da1 GPT (14G)
  49. 34 2014 - free - (1.0M)
  50. 2048 30273536 1 FreeBSD ZFS (14G)
  51. 30275584 2015 - free - (1.0M)
  52.  
  53. root@mowa219-gjp4-8570p-freebsd:~ # lsblk da1
  54. DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
  55. da1 0:190 14G GPT - -
  56. <FREE> -:- 1.0M - - -
  57. da1p1 0:191 14G freebsd-zfs gpt/FreeBSD <ZFS>
  58. <FREE> -:- 1.0M - - -
  59. root@mowa219-gjp4-8570p-freebsd:~ # lsblk
  60. DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
  61. ada0 0:119 932G GPT - -
  62. ada0p1 0:121 260M efi gpt/efiboot0 -
  63. <FREE> -:- 1.0M - - -
  64. ada0p2 0:123 16G freebsd-swap gpt/swap0 SWAP
  65. ada0p2.eli 1:48 16G freebsd-swap - SWAP
  66. ada0p3 0:125 915G freebsd-zfs gpt/zfs0 <ZFS>
  67. ada0p3.eli 0:131 915G zfs - -
  68. <FREE> -:- 708K - - -
  69. da0 0:160 29G GPT - -
  70. <FREE> -:- 1.0M - - -
  71. da0p1 0:164 29G freebsd-zfs gpt/cache-august <ZFS>
  72. da1 0:190 14G GPT - -
  73. <FREE> -:- 1.0M - - -
  74. da1p1 0:191 14G freebsd-zfs gpt/FreeBSD <ZFS>
  75. <FREE> -:- 1.0M - - -
  76. root@mowa219-gjp4-8570p-freebsd:~ # glabel stop FreeBSD
  77. glabel: Label FreeBSD is invalid.
  78. root@mowa219-gjp4-8570p-freebsd:~ # glabel clear /dev/da1p1
  79. Can't clear metadata on /dev/da1p1: Invalid argument.
  80. glabel: Not fully done.
  81. root@mowa219-gjp4-8570p-freebsd:~ # tail -f -n 0 /var/log/messages
  82. Jun 14 02:33:04 mowa219-gjp4-8570p-freebsd kernel: ugen0.5: <Kingston DataTraveler 3.0> at usbus0 (disconnected)
  83. Jun 14 02:33:04 mowa219-gjp4-8570p-freebsd kernel: umass1: at uhub0, port 8, addr 12 (disconnected)
  84. Jun 14 02:33:04 mowa219-gjp4-8570p-freebsd kernel: da1 at umass-sim1 bus 1 scbus4 target 0 lun 0
  85. Jun 14 02:33:04 mowa219-gjp4-8570p-freebsd kernel: da1: <Kingston DataTraveler 3.0 PMAP> s/n 08606E6B6446BFB138159554 detached
  86. Jun 14 02:33:04 mowa219-gjp4-8570p-freebsd kernel: (da1:umass-sim1:1:0:0): Periph destroyed
  87. Jun 14 02:33:04 mowa219-gjp4-8570p-freebsd kernel: umass1: detached
  88. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: ugen0.5: <Kingston DataTraveler 3.0> at usbus0
  89. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: umass1 on uhub0
  90. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: umass1: <Kingston DataTraveler 3.0, class 0/0, rev 3.00/1.10, addr 14> on usbus0
  91. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: da1 at umass-sim1 bus 1 scbus4 target 0 lun 0
  92. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: da1: <Kingston DataTraveler 3.0 PMAP> Removable Direct Access SPC-4 SCSI device
  93. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: da1: Serial Number 08606E6B6446BFB138159554
  94. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: da1: 400.000MB/s transfers
  95. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: da1: 14784MB (30277632 512 byte sectors)
  96. Jun 14 02:33:07 mowa219-gjp4-8570p-freebsd kernel: da1: quirks=0x2<NO_6_BYTE>
  97. ^C
  98. root@mowa219-gjp4-8570p-freebsd:~ # glabel clear /dev/da1p1
  99. Can't clear metadata on /dev/da1p1: Invalid argument.
  100. glabel: Not fully done.
  101. root@mowa219-gjp4-8570p-freebsd:~ # glabel clear -v /dev/da1p1
  102. Can't clear metadata on /dev/da1p1: Invalid argument.
  103. glabel: Not fully done.
  104. root@mowa219-gjp4-8570p-freebsd:~ # glabel clear -v /dev/da1
  105. Can't clear metadata on /dev/da1: Invalid argument.
  106. glabel: Not fully done.
  107. root@mowa219-gjp4-8570p-freebsd:~ # lsblk
  108. DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
  109. ada0 0:119 932G GPT - -
  110. ada0p1 0:121 260M efi gpt/efiboot0 -
  111. <FREE> -:- 1.0M - - -
  112. ada0p2 0:123 16G freebsd-swap gpt/swap0 SWAP
  113. ada0p2.eli 1:48 16G freebsd-swap - SWAP
  114. ada0p3 0:125 915G freebsd-zfs gpt/zfs0 <ZFS>
  115. ada0p3.eli 0:131 915G zfs - -
  116. <FREE> -:- 708K - - -
  117. da0 0:160 29G GPT - -
  118. <FREE> -:- 1.0M - - -
  119. da0p1 0:164 29G freebsd-zfs gpt/cache-august <ZFS>
  120. da1 0:190 14G GPT - -
  121. <FREE> -:- 1.0M - - -
  122. da1p1 0:193 14G freebsd-zfs gpt/FreeBSD%20ZFS <ZFS>
  123. <FREE> -:- 1.0M - - -
  124. root@mowa219-gjp4-8570p-freebsd:~ # gpart modify -i 1 -l cache2-august da1
  125. da1p1 modified
  126. root@mowa219-gjp4-8570p-freebsd:~ # lsblk da1
  127. DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
  128. da1 0:190 14G GPT - -
  129. <FREE> -:- 1.0M - - -
  130. da1p1 0:193 14G freebsd-zfs gpt/cache2-august <ZFS>
  131. <FREE> -:- 1.0M - - -
  132. root@mowa219-gjp4-8570p-freebsd:~ # zpool add august cache gpt/cache2-august
  133. root@mowa219-gjp4-8570p-freebsd:~ # zpool status -v
  134. pool: august
  135. state: ONLINE
  136. status: One or more devices has been taken offline by the administrator.
  137. Sufficient replicas exist for the pool to continue functioning in a
  138. degraded state.
  139. action: Online the device using 'zpool online' or replace the device with
  140. 'zpool replace'.
  141. scan: scrub repaired 0B in 02:44:47 with 0 errors on Sun Dec 12 06:14:24 2021
  142. config:
  143.  
  144. NAME STATE READ WRITE CKSUM
  145. august ONLINE 0 0 0
  146. ada0p3.eli ONLINE 0 0 0
  147. cache
  148. gpt/cache-august ONLINE 0 0 0
  149. gpt/duracell OFFLINE 0 0 0
  150. gpt/cache2-august ONLINE 0 0 0
  151.  
  152. errors: No known data errors
  153. root@mowa219-gjp4-8570p-freebsd:~ # zpool iostat -v
  154. capacity operations bandwidth
  155. pool alloc free read write read write
  156. ------------------- ----- ----- ----- ----- ----- -----
  157. august 752G 160G 15 33 837K 850K
  158. ada0p3.eli 752G 160G 15 33 837K 850K
  159. cache - - - - - -
  160. gpt/cache-august 28.7G 96.4M 17 0 811K 34.9K
  161. gpt/duracell 12.8G 2.57G 14 0 691K 23.8K
  162. gpt/cache2-august 36K 14.4G 0 0 23.8K 3.43K
  163. ------------------- ----- ----- ----- ----- ----- -----
  164. root@mowa219-gjp4-8570p-freebsd:~ #
  165.  
Advertisement
RAW Paste Data Copied
Advertisement