The command, as root, as given: gpart show -p
And the result:
=> 63 312579632 ada3 MBR (149G)
63 312560577 ada3s1 ntfs [active] (149G)
312560640 19055 - free - (9.3M)
An MBR disk with 1 ntfs slice. Old Win7
I'm omitting the repeats with labels.
=> 63 976770992 ada0 MBR (466G)
63 975693957 ada0s1 ntfs [active] (465G)
975694020 1852 - free - (926K)
975695872 1071104 ada0s2 !39 (523M)
976766976 4079 - free - (2.0M)
An MBR disk with 2 slices, 1 ntfs. The second may be a Windows repair / recovery slice/partition (!39). Win10.
=> 0 3907029168 ada1 BSD (1.8T)
0 3898605568 ada1a freebsd-ufs (1.8T)
3898605568 8388608 ada1b freebsd-swap (4.0G)
3906994176 34992 - free - (17M)
This is (now WAS?) the problem child. BSD scheme but not within either an MBR (4 slices) or GPT (many partitions) framework. Known as "dangerously dedicated" mode, in that other OSes, esp. Windows, will see it as unused space, available to clobber.
So, no ada1s1a or ada1p1a, just ada1a and ada1b. This is why I asked for gpart's -p switch, to show full partition names rather than just the numerical indices.
Double-check
gpart(8) re encapsulating BSD scheme partitions within MBR slices or GPT partitions. The latter is rarely used, but possible.
=> 40 3907029088 ada2 GPT (1.8T)
40 1024 ada2p1 freebsd-boot (512K)
1064 3898604536 ada2p2 freebsd-ufs (1.8T)
3898605600 8388608 ada2p3 freebsd-swap (4.0G)
3906994208 34920 - free - (17M)
Ok. I'd have made a lot more swap on such a large drive, though putting swap on SSD may make more sense.
As you can see, I have 4 HDDs in this computer: the 160 GB drive is my old WinXP, the 500 GB drive is my present Win10 installation.
When I do cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ada2b / ufs rw 1 1
/dev/ada1b none swap sw 0 0
ada2b doesn't exist. swap is now ada2p3.
# Added by auto-admin from /usr/local/sbin/auto-add-fdesc-mount
I'm ignoring those ...
The problem entry, as I see it is:
/dev/ada1b
As you can see from the output of gpart show -p
, ada1 is the DISK-9VMV4Y01, but if I change that line to dev/ada2c, which should be the swap partition on ada2, the system returns that it can't find it.
No, under BSD scheme, swap is always the 'b' partition. 'c' denotes the whole 'disk' and you won't see it in fstab. As above, swap is ada2p3 (GPT).
So you should redo ata1 as GPT to match ata2, if that's what you wanted.
So, either the naming of the drives as far as the system is concerned does not mean the same as the naming of the drives under gpart show
, or the system is actually using ada1 as its swap drive.
Just use
% mount
to see what the system thinks.
[edit:] or
mount -p
to see mounts in fstab format.
Now, if I change these two lines from
/dev/ada2b / ufs rw 1 1
/dev/ada1b none swap sw 0 0
to
/dev/ada2a / ufs rw 1 1
/dev/ada2b none swap sw 0 0
the system crashes and I had to work very hard to recover.
I bet! Use -p with gpart and end naming confusions.
Glad to see you have it sorted(?)