Mounting swap without device name

Christian Baer christian.baer at
Sat Dec 6 11:48:46 UTC 2014

Polytropon wrote:

Greetings and thanks for your answer!

> With "glabel label" - you cannot use a UFS label (like for
> the partitions shown in your /etc/fstab) because swap does
> not have a file system, but you can use gpart to attach a
> label to the partition itself. It could be "/dev/label/swap"
> (note: not "/dev/ufs/swap" for mentioned reasons).

Thanks for the info and the link!

I had figured out why it didn't work the way I tried it - as you stated, 
swap is not a file system in the sense of UFS. What I hadn't figured out, 
was which tool I could use. :-)

Afer reading your post I tried this:

glabel label -v swap /dev/ada0s3b

The answer I got was "done". However, there is no new device under 
/dev/label/ - in fact, the directory /dev/label/ doesn't exist. According to 
the manpage of glabel, the required kernel module should be loaded 
automatically - if not loaded anyway - and thus the device should be 
created. Where did I go wrong?

Best regards,

More information about the freebsd-questions mailing list