PDA

View Full Version : USB disks


kagura-san
May 22nd, 2009, 22:16
Hello.

I cannot solve this problem: I have several USB external disks and I would like to mount them automatically to assigned mount points. The problem is, that I dont know, how to recognise some device ID of the disk. I would like to have a mechanism, which is similar to Linux: /dev/disk/by-uuid. Can any FreeBSD utility help me? I tried to play with devd.conf, but without any results. I have a feeling, that some kernel GEOM_<?> option can do the thing, but I didnt found any documentation for these options.

Thank you for your answers.

JN :)

phoenix
May 22nd, 2009, 22:33
Upgrade to FreeBSD 7.2 which includes automatic GEOM labelling of filesystems, which gives you /dev/ufsid/someidstring

And/Or, use glabel to label the drives, and use /dev/label/labelname to mount them.

kagura-san
May 22nd, 2009, 22:43
But I have FreeBSD v 7.2. There is no /dev/label directory. I have ext2fs or ntfs filesystems on external drives :(

kagura-san
May 22nd, 2009, 22:46
Now I can see, that mount -t /dev/ext2fs/mydrive /mnt/mydrive works :) but some external disks does not create any /dev/ext2fs or /dev/ntfs files :(

phoenix
May 23rd, 2009, 00:13
But I have FreeBSD v 7.2. There is no /dev/label directory. I have ext2fs or ntfs filesystems on external drives :(

/dev/label/ only shows up if you use glabel to add a label to the disk.

/dev/ufsid/ only shows up if you have UFS filesystems on a disk.

/dev/<filesystemtype>/ only shows up once the GEOM system has "tasted" a disk and discovered those filesystems.

Try using glabel to create labels on each disk, and using those labels.

kagura-san
May 23rd, 2009, 11:59
Thank you :)