Re: Fixing a USB disk to a specific device name
Jerry McAllister wrote: On Mon, Jan 21, 2008 at 02:19:54PM -0300, Mario Lobo wrote: On Monday 21 January 2008 14:05:04 Mike Bristow wrote: On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: It is possible, but not as daX. Use the glabel(8) utility to label your disks. They will show up as /dev/label/ On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC kernel, so it shouldn't be necessary there. Note that you can use UFS (and other filesystems labeling) too: for example. 'newfs -L bobs_disk' will cause the device containing it to appear as /dev/ufs/bobs_disk. This approach may be better for removable disks; it'll play better with other OSs, for example. I simply put /dev/da0s1 /PenDrive msdosfs rw,noauto 0 0 on fstab. After I plug it in, I type mount /PenDrive. In KDE, I use Kwikdisk to mount it. Maybe I am missing something, but I don't think that is what the OP was asking - just a mount moiunt. I think the OP wants the /dev/da0s1 to always be /dev/da0s1 even if he switches the drives around in physical drive slots. Yup, that's what I wanted. For the drive to always appear as /dev/da0 (or anything similar). The glabel feature (and newfs labelling feature too) are exactly what I was looking for. Thanks a ton for all the replies. Much appreciated. :) Regards, - Rakhesh http://rakhesh.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Mon, 21 Jan 2008 17:05:04 + Mike Bristow <[EMAIL PROTECTED]> wrote: > Note that you can use UFS (and other filesystems labeling) too: for > example. 'newfs -L bobs_disk' will cause the device containing it to > appear as /dev/ufs/bobs_disk. For an existing filesystem you'll need to use tunefs instead of newfs. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Mon, Jan 21, 2008 at 02:19:54PM -0300, Mario Lobo wrote: > On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > > >> your disks. They will show up as /dev/label/ > > > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > > kernel, so it shouldn't be necessary there. > > > > Note that you can use UFS (and other filesystems labeling) too: for > > example. 'newfs -L bobs_disk' will cause the device containing it to appear > > as /dev/ufs/bobs_disk. > > > > This approach may be better for removable disks; it'll play better with > > other OSs, for example. > > I simply put > > /dev/da0s1/PenDrive msdosfs rw,noauto 0 0 > > on fstab. After I plug it in, I type > > mount /PenDrive. In KDE, I use Kwikdisk to mount it. Maybe I am missing something, but I don't think that is what the OP was asking - just a mount moiunt. I think the OP wants the /dev/da0s1 to always be /dev/da0s1 even if he switches the drives around in physical drive slots. jerry > > Mario Lobo > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Mon, Jan 21, 2008 at 02:16:50PM -0300, Mario Lobo wrote: > On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > > >> your disks. They will show up as /dev/label/ > > > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > > kernel, so it shouldn't be necessary there. > > > > Note that you can use UFS (and other filesystems labeling) too: for > > example. 'newfs -L bobs_disk' will cause the device containing it to appear > > as /dev/ufs/bobs_disk. > > > > This approach may be better for removable disks; it'll play better with > > other OSs, for example. > > I simply put; > > /dev/da0s1/PenDrive msdosfs rw,noauto 0 0 > > in fstab. After pluging it in, i type > > mount /PenDrive Keep in mind that this only works for _one_ drive. As soon as you have two, this won't work correctly. If you have multiple drives, you should label them (with newfs_msdos or mtools) e.g. 'diskA' and 'diskB'. With GEOM_LABEL you'll then get /dev/msdosfs/diskA and /dev/msdosfs/diskB, which you can then put in your /etc/fstab; /dev/msdosfs/diskA /mnt/diskA msdosfs rw,noauto 0 0 /dev/msdosfs/diskB /mnt/diskB msdosfs rw,noauto 0 0 Of course you need to own /mnt/diskX if you want to mount it as a normal user. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpsar1UxP9JI.pgp Description: PGP signature
Re: Fixing a USB disk to a specific device name
On Monday 21 January 2008 14:19:54 Mario Lobo wrote: > On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > > >> your disks. They will show up as /dev/label/ > > > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > > kernel, so it shouldn't be necessary there. > > > > Note that you can use UFS (and other filesystems labeling) too: for > > example. 'newfs -L bobs_disk' will cause the device containing it to > > appear as /dev/ufs/bobs_disk. > > > > This approach may be better for removable disks; it'll play better with > > other OSs, for example. > > I simply put > > /dev/da0s1/PenDrive msdosfs rw,noauto 0 0 > > on fstab. After I plug it in, I type > > mount /PenDrive. In KDE, I use Kwikdisk to mount it. > > Mario Lobo > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" Sorry for the multiple posts. I have just installed FBSD 7 here on my desktop and I am struggling a bit to recover my kmail configs from my previous 6.2. By the way, I've been using it for 3 days and I must say right way how incredibly improved and smooth multitasking is on 7 !! Mario Lobo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Monday 21 January 2008 14:14:56 Mario Lobo wrote: > On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > > >> your disks. They will show up as /dev/label/ > > > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > > kernel, so it shouldn't be necessary there. > > > > Note that you can use UFS (and other filesystems labeling) too: for > > example. 'newfs -L bobs_disk' will cause the device containing it to > > appear as /dev/ufs/bobs_disk. > > > > This approach may be better for removable disks; it'll play better with > > other OSs, for example. > > I simply put > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" Sorry :( I simply put: /dev/da0s1 /PenDrive msdosfs rw,noauto 0 0 on fstab. After pluging in, I type mount /PenDrive. - Mario Lobo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > >> your disks. They will show up as /dev/label/ > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > kernel, so it shouldn't be necessary there. > > Note that you can use UFS (and other filesystems labeling) too: for > example. 'newfs -L bobs_disk' will cause the device containing it to appear > as /dev/ufs/bobs_disk. > > This approach may be better for removable disks; it'll play better with > other OSs, for example. I simply put /dev/da0s1 /PenDrive msdosfs rw,noauto 0 0 on fstab. After I plug it in, I type mount /PenDrive. In KDE, I use Kwikdisk to mount it. Mario Lobo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > >> your disks. They will show up as /dev/label/ > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > kernel, so it shouldn't be necessary there. > > Note that you can use UFS (and other filesystems labeling) too: for > example. 'newfs -L bobs_disk' will cause the device containing it to appear > as /dev/ufs/bobs_disk. > > This approach may be better for removable disks; it'll play better with > other OSs, for example. I simply put: /dev/da0s1 /PenDrive msdosfs rw,noauto 0 0 in my fstab. After pluging it in, i type mount /PenDrive ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > >> your disks. They will show up as /dev/label/ > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > kernel, so it shouldn't be necessary there. > > Note that you can use UFS (and other filesystems labeling) too: for > example. 'newfs -L bobs_disk' will cause the device containing it to appear > as /dev/ufs/bobs_disk. > > This approach may be better for removable disks; it'll play better with > other OSs, for example. I simply put; /dev/da0s1 /PenDrive msdosfs rw,noauto 0 0 in fstab. After pluging it in, i type mount /PenDrive Mario ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Monday 21 January 2008 14:05:04 Mike Bristow wrote: > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > >> It is possible, but not as daX. Use the glabel(8) utility to label > > >> your disks. They will show up as /dev/label/ > > > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > > kernel, so it shouldn't be necessary there. > > Note that you can use UFS (and other filesystems labeling) too: for > example. 'newfs -L bobs_disk' will cause the device containing it to appear > as /dev/ufs/bobs_disk. > > This approach may be better for removable disks; it'll play better with > other OSs, for example. I simply put ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote: > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > > > >> It is possible, but not as daX. Use the glabel(8) utility to label your > >> disks. They will show up as /dev/label/ > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC > kernel, so it shouldn't be necessary there. Note that you can use UFS (and other filesystems labeling) too: for example. 'newfs -L bobs_disk' will cause the device containing it to appear as /dev/ufs/bobs_disk. This approach may be better for removable disks; it'll play better with other OSs, for example. -- Shenanigans! Shenanigans!Best of 3! -- Flash ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote: > >>> What I'd like to know is whether there's any way for me to ensure that the >>> da0 disk always appears as da0. I don't want it that tomm I plug in another >>> disk (or change the order of disks, though I'll be more careful with that) >>> and suddenly da0 is no longer at da0! That would hamper the boot process >>> ... not nice. >> >> It is possible, but not as daX. Use the glabel(8) utility to label your >> disks. They will show up as /dev/label/ >> >> The daX devices are created as the device is plugged in, so AFAIK it's >> impossible to permanently assign them a certain daX device. > > Just mentioning this for archival purposes. > > If you are mounting a device as /dev/label/ at boot time, it > will fail unless you add a ''geom_label_load="YES"'' to your > /boot/loader.conf file. Had me stumped for a while. This loads the geom > label module at boot time and so labels are recognized. On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC kernel, so it shouldn't be necessary there. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpLQR4Mu6Xk5.pgp Description: PGP signature
Re: Fixing a USB disk to a specific device name
On Mon, Jan 21, 2008 at 08:59:30AM +0400, Rakhesh Sasidharan wrote: > > Colin Brace wrote: > >> I use udev rules to do this. See: >> >> < >> http://www.linuxquestions.org/questions/linux-general-1/make-removable-usb-hdd-mount-at-fixed-mount-point-511917/ >>> > > That doesn't work on FreeBSD, does it? Udev's a Linux thing last I heard of > ... You might be able to do that with devd(8). I don't know if you'll get attach events on disk devices, you'll have to try. Keep in mind that you cannot use devd to unmount! You'll have to unmount _before_ the device is detached/destroyed, or you might get a panic. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgp3nKhvXcW1O.pgp Description: PGP signature
Re: Fixing a USB disk to a specific device name
Colin Brace wrote: I use udev rules to do this. See: < http://www.linuxquestions.org/questions/linux-general-1/make-removable-usb-hdd-mount-at-fixed-mount-point-511917/ That doesn't work on FreeBSD, does it? Udev's a Linux thing last I heard of ... Regards, - Rakhesh http://rakhesh.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
What I'd like to know is whether there's any way for me to ensure that the da0 disk always appears as da0. I don't want it that tomm I plug in another disk (or change the order of disks, though I'll be more careful with that) and suddenly da0 is no longer at da0! That would hamper the boot process ... not nice. It is possible, but not as daX. Use the glabel(8) utility to label your disks. They will show up as /dev/label/ The daX devices are created as the device is plugged in, so AFAIK it's impossible to permanently assign them a certain daX device. Just mentioning this for archival purposes. If you are mounting a device as /dev/label/ at boot time, it will fail unless you add a ''geom_label_load="YES"'' to your /boot/loader.conf file. Had me stumped for a while. This loads the geom label module at boot time and so labels are recognized. Thanks, Rakhesh - Rakhesh http://rakhesh.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
I use udev rules to do this. See: < http://www.linuxquestions.org/questions/linux-general-1/make-removable-usb-hdd-mount-at-fixed-mount-point-511917/ > -- Colin Brace Amsterdam http://lim.nl ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
What I'd like to know is whether there's any way for me to ensure that the da0 disk always appears as da0. I don't want it that tomm I plug in another disk (or change the order of disks, though I'll be more careful with that) and suddenly da0 is no longer at da0! That would hamper the boot process ... not nice. It is possible, but not as daX. Use the glabel(8) utility to label your disks. They will show up as /dev/label/ The daX devices are created as the device is plugged in, so AFAIK it's impossible to permanently assign them a certain daX device. Awesome! That should do. :) I spent the better half of my day here searching the net for a possible solution! If only I had asked this list first ... Thanks, - Rakhesh http://rakhesh.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fixing a USB disk to a specific device name
On Sun, Jan 20, 2008 at 04:23:58PM +0400, Rakhesh Sasidharan wrote: > > Hi, > > Is it possible to assign a specific device name to a USB disk? As in, say I > have 2 USB disks -- currently they appear as da0 and da1. One of these > (da0) contains the key for a GELI encrypted partition, and so I mount it > from fstab while booting (to get the key). Yes, more or less. > What I'd like to know is whether there's any way for me to ensure that the > da0 disk always appears as da0. I don't want it that tomm I plug in another > disk (or change the order of disks, though I'll be more careful with that) > and suddenly da0 is no longer at da0! That would hamper the boot process > ... not nice. It is possible, but not as daX. Use the glabel(8) utility to label your disks. They will show up as /dev/label/ The daX devices are created as the device is plugged in, so AFAIK it's impossible to permanently assign them a certain daX device. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgpb8CFeoUixQ.pgp Description: PGP signature
Fixing a USB disk to a specific device name
Hi, Is it possible to assign a specific device name to a USB disk? As in, say I have 2 USB disks -- currently they appear as da0 and da1. One of these (da0) contains the key for a GELI encrypted partition, and so I mount it from fstab while booting (to get the key). What I'd like to know is whether there's any way for me to ensure that the da0 disk always appears as da0. I don't want it that tomm I plug in another disk (or change the order of disks, though I'll be more careful with that) and suddenly da0 is no longer at da0! That would hamper the boot process ... not nice. Possible? Thanks, - Rakhesh http://rakhesh.net/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"