Re: disk labels (was: Re: fixating USB Storage)
On Wed, 29 Feb 2012, ill...@gmail.com wrote: On 29 February 2012 10:33, Robert Huff wrote: Warren Block writes: > I have a disk - ad1 - with a partition - p2 - that was > (obviously) created by gpart ... but no label was attached. > Can I add a label to that partition later? "man gpart" only > shows a label being added when the partition is created, (untested) # gpart modify -i 2 -l mylabel ada0 I did this, and nothing exploded. :-) When (and where) should I expect to see these appear under /dev? Immediately? After rebooting? I want to edit fstab, but want to be clear on how. The label(s) should be accessible immediately, HOWEVER: if the filesystem is mounted rw they'll be lost on reboot. So you probably want to do the labelling from single-user mode. With filesystem labels, yes. Should not be a problem with gpart labels on a partition. (Just tried it.)___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: disk labels (was: Re: fixating USB Storage)
On Wed, 29 Feb 2012, Robert Huff wrote: Warren Block writes: >I have a disk - ad1 - with a partition - p2 - that was > (obviously) created by gpart ... but no label was attached. >Can I add a label to that partition later? "man gpart" only > shows a label being added when the partition is created, (untested) # gpart modify -i 2 -l mylabel ada0 I did this, and nothing exploded. :-) When (and where) should I expect to see these appear under /dev? Immediately? After rebooting? I want to edit fstab, but want to be clear on how. They will be in /dev/gpt/. Labels created with glabel are in /dev/label/, and filesystem labels go in directories named for the filesystem like /dev/ufs/. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: disk labels (was: Re: fixating USB Storage)
On 29 February 2012 10:33, Robert Huff wrote: > > Warren Block writes: >> > I have a disk - ad1 - with a partition - p2 - that was >> > (obviously) created by gpart ... but no label was attached. >> > Can I add a label to that partition later? "man gpart" only >> > shows a label being added when the partition is created, >> >> (untested) >> # gpart modify -i 2 -l mylabel ada0 > > I did this, and nothing exploded. :-) > When (and where) should I expect to see these appear under > /dev? Immediately? After rebooting? I want to edit fstab, but > want to be clear on how. > The label(s) should be accessible immediately, HOWEVER: if the filesystem is mounted rw they'll be lost on reboot. So you probably want to do the labelling from single-user mode. -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Wed, 29 Feb 2012 07:55:35 -0700 (MST), Warren Block wrote: > I really need to do a combined article that covers all the > different types of labels. It's on the list. Please be so kind and also mention ufsid "labels" (unique file system id) in that article. Why? "Any partitions with ufsid labels can be mounted in this way, eliminating the need to create permanent labels for them manually, while still enjoying the benefits of device-name independent mounting." ... even though they are "not normal words" in a typical reader's mind. :-) They can be found explained in The FreeBSD Handbook at 20.7.1: http://www.freebsd.org/doc/handbook/geom-glabel.html (bottom of the page) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
disk labels (was: Re: fixating USB Storage)
Warren Block writes: > >I have a disk - ad1 - with a partition - p2 - that was > > (obviously) created by gpart ... but no label was attached. > >Can I add a label to that partition later? "man gpart" only > > shows a label being added when the partition is created, > > (untested) > # gpart modify -i 2 -l mylabel ada0 I did this, and nothing exploded. :-) When (and where) should I expect to see these appear under /dev? Immediately? After rebooting? I want to edit fstab, but want to be clear on how. Respectfully, Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Wed, 29 Feb 2012, Robert Huff wrote: Polytropon writes: Label the drives and use labels instead of device names. Get some inspiration from Warren's excellent article here: http://www.wonkity.com/~wblock/docs/html/disksetup.html Good piece, but it doesn't explicitly cover one case and "man" provides no example. I have a disk - ad1 - with a partition - p2 - that was (obviously) created by gpart ... but no label was attached. Can I add a label to that partition later? "man gpart" only shows a label being added when the partition is created, (untested) # gpart modify -i 2 -l mylabel ada0 There's also http://www.wonkity.com/~wblock/docs/html/labels.html , which talks about filesystem labels. UFS labels can be added later with tunefs(8). I really need to do a combined article that covers all the different types of labels. It's on the list. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Polytropon writes: > Label the drives and use labels instead of device names. > > Get some inspiration from Warren's excellent article here: > http://www.wonkity.com/~wblock/docs/html/disksetup.html Good piece, but it doesn't explicitly cover one case and "man" provides no example. I have a disk - ad1 - with a partition - p2 - that was (obviously) created by gpart ... but no label was attached. Can I add a label to that partition later? "man gpart" only shows a label being added when the partition is created, Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Dnia wtorek, 28 lutego 2012 15:32:18 bsali...@gmail.com pisze: > Maciej > > I didn't know if the label would work in loader.conf. > > This solution suggested by Adam worked and seems much simpler than > labeling the filesystem. Depends on your needs. For me it was essential to have the same name of the disk no matter to what server I connect it. Label is working fine for me. Anyway I'm glad that you resolved your problem. Have a nice day, Maciej ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Maciej I didn't know if the label would work in loader.conf. This solution suggested by Adam worked and seems much simpler than labeling the filesystem. hint.da.0.at="scbus6" Thanks. On Tue, Feb 28, 2012 at 2:21 PM, Maciej Milewski wrote: > vfs.root.mountfrom=ufs:/dev/label/bigdisk in loader.conf doesn't work? > > I think that worked with stock FreeBSD loader. > > > > Maciej ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Dnia wtorek, 28 lutego 2012 13:08:04 bsali...@gmail.com pisze: > Thanks, > > I got the part where you can label the partitions but the loader > doesn't look at labels. Loader looks at ufs:/dev/da0 > > So how can this be resolved at "boot" time (not mount time). > > Thanks. vfs.root.mountfrom=ufs:/dev/label/bigdisk in loader.conf doesn't work? I think that worked with stock FreeBSD loader. Maciej ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Adam, This worked like a charm :-) I found that my umass-sim0 is at scbus6 and added following lines in loader.conf hint.scbus.6.bus="umass-sim0" hint.da.0.at="scbus6" hint.da.0.target="0" hint.da.0.unit="0" Thanks a lot. On Tue, Feb 28, 2012 at 1:23 PM, Adam Vande More wrote: > > Add to /boot/loader.conf and adjust to your needs: > > hint.scbus.0.at="da0" > hint.scbus.0.bus="0" > hint.da.0.at="scbus0" > hint.da.0.target="0" > hint.da.0.unit="0" > hint.scbus.1.bus="umass-sim0" > hint.da.1.at="scbus1" > hint.da.1.target="0" > hint.da.1.unit="0" > > > -- > Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Tue, Feb 28, 2012 at 9:41 AM, bsali...@gmail.com wrote: > The real issue is that the USB boot device sits at da16 and if any of > the da members below da16 drops, the usb boot device becomes da15 at > next boot. The loader.conf still looks at da6 for root device and that > is not present. > > How to solve this issue? > Add to /boot/loader.conf and adjust to your needs: hint.scbus.0.at="da0" hint.scbus.0.bus="0" hint.da.0.at="scbus0" hint.da.0.target="0" hint.da.0.unit="0" hint.scbus.1.bus="umass-sim0" hint.da.1.at="scbus1" hint.da.1.target="0" hint.da.1.unit="0" -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Thanks, I got the part where you can label the partitions but the loader doesn't look at labels. Loader looks at ufs:/dev/da0 So how can this be resolved at "boot" time (not mount time). Thanks. On Tue, Feb 28, 2012 at 8:30 AM, Polytropon wrote: > > Label the drives and use labels instead of device names. > > Get some inspiration from Warren's excellent article here: > http://www.wonkity.com/~wblock/docs/html/disksetup.html > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Tue, 28 Feb 2012 07:41:29 -0800, bsali...@gmail.com wrote: > The real issue is that the USB boot device sits at da16 and if any of > the da members below da16 drops, the usb boot device becomes da15 at > next boot. The loader.conf still looks at da6 for root device and that > is not present. > > How to solve this issue? Label the drives and use labels instead of device names. Get some inspiration from Warren's excellent article here: http://www.wonkity.com/~wblock/docs/html/disksetup.html -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
The real issue is that the USB boot device sits at da16 and if any of the da members below da16 drops, the usb boot device becomes da15 at next boot. The loader.conf still looks at da6 for root device and that is not present. How to solve this issue? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Saturday 04 February 2012, Jonathan Vomacka wrote: > On Feb 4, 2012 4:54 AM, "Mike Clarke" > wrote: ? > > Sounds similar to my experience. Normally my internal 4 slot memory > > card reader is assigned devices da[0-3] and when the USB memory > > stick is inserted it comes up as da4. If the USB stick is present > > on booting then it appears as da0 and the card reader is da[1-4]. > > So it looks like occupied slots are given priority when numbers are > > assigned at boot time. > > > > Do you know if it is different with zfs system? That was with a UFS basedFreeBSD 8.1-RELEASE system but I've just tested it 9.0-RELEASE booting from ZFS and it does just the same. -- Mike Clarke ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Feb 4, 2012 4:54 AM, "Mike Clarke" wrote: > > On Saturday 04 February 2012, Conrad J. Sabatier wrote: > > > I don't know if anyone else has already mentioned it to you in > > response to this question, but I just very recently switched over to > > using volume labels to mount my partitions instead of device names. > > I was having an ongoing issue where this external USB drive's device > > number assignment would change from one boot to the next, toggling > > back and forth between da0 and da4 (strange!). > > Sounds similar to my experience. Normally my internal 4 slot memory card > reader is assigned devices da[0-3] and when the USB memory stick is > inserted it comes up as da4. If the USB stick is present on booting > then it appears as da0 and the card reader is da[1-4]. So it looks like > occupied slots are given priority when numbers are assigned at boot > time. > > -- > Mike Clarke > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " freebsd-questions-unsubscr...@freebsd.org" Do you know if it is different with zfs system? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Saturday 04 February 2012, Conrad J. Sabatier wrote: > I don't know if anyone else has already mentioned it to you in > response to this question, but I just very recently switched over to > using volume labels to mount my partitions instead of device names. > I was having an ongoing issue where this external USB drive's device > number assignment would change from one boot to the next, toggling > back and forth between da0 and da4 (strange!). Sounds similar to my experience. Normally my internal 4 slot memory card reader is assigned devices da[0-3] and when the USB memory stick is inserted it comes up as da4. If the USB stick is present on booting then it appears as da0 and the card reader is da[1-4]. So it looks like occupied slots are given priority when numbers are assigned at boot time. -- Mike Clarke ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
On Thu, 2 Feb 2012 16:41:39 -0800 "bsali...@gmail.com" wrote: > Please ignore, I forgot that I asked this before. Thanks. > > On Thu, Feb 2, 2012 at 4:38 PM, bsali...@gmail.com > wrote: > > Hi, > > > > How can I fix a USB storage device to always have the same device > > name such as da9 irrespective of other da? devices present. > > > > Here is the device > > # usbconfig -u 4 -a 2 dump_info > > ugen4.2: at usbus4, cfg=0 md=HOST spd=HIGH > > (480Mbps) pwr=ON > > > > Thanks I don't know if anyone else has already mentioned it to you in response to this question, but I just very recently switched over to using volume labels to mount my partitions instead of device names. I was having an ongoing issue where this external USB drive's device number assignment would change from one boot to the next, toggling back and forth between da0 and da4 (strange!). Then just the other night, something led me to one of Warren Block's web pages describing how to easily label a volume and use that instead in /etc/fstab, so shifting device assignments no longer matter. How lovely! :-) Here it is, "FreeBSD Labeled Filesystems", by Warren Block http://www.wonkity.com/~wblock/docs/html/labels.html A regular little gem of knowledge that was to discover. :-) -- Conrad J. Sabatier conr...@cox.net ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: fixating USB Storage
Please ignore, I forgot that I asked this before. Thanks. On Thu, Feb 2, 2012 at 4:38 PM, bsali...@gmail.com wrote: > Hi, > > How can I fix a USB storage device to always have the same device name > such as da9 irrespective of other da? devices present. > > Here is the device > # usbconfig -u 4 -a 2 dump_info > ugen4.2: at usbus4, cfg=0 md=HOST spd=HIGH > (480Mbps) pwr=ON > > Thanks -- NOTICE: This email is a one to one communication and not for receiving any offers or a mass relay of emails. Please refrain from subscribing this email address to any of the mailing lists. All / any mass emails to this address will be considered as SPAM and will be reported to FTC and other authorities. Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
fixating USB Storage
Hi, How can I fix a USB storage device to always have the same device name such as da9 irrespective of other da? devices present. Here is the device # usbconfig -u 4 -a 2 dump_info ugen4.2: at usbus4, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON Thanks ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"