I am actually working again on a problem i had already on opensus 11.3 (never resolved), and now also after the upgrade to 11.4 .
I do have an external HDD (Samsung STORY Station) usually connected to the linux server. I also have udev rules setup to automount the device on /media/xxx by label.
I used to have my own rules, now have some more coplete from the internet.
When I now reboot the server, the “sd*” device for story station is not created, and obviously not mounted.
If however I do switch of th estory station after reboot, and turn power on again, the device is configured and properly automounted as by udev rules.
Also during the boot the device is seen as from boot.msg:
<6> 1.444939] usb 2-2: New USB device found, idVendor=04e8, idProduct=5f06
<6> 1.448686] usb 2-2: New USB device strings: Mfr=1, Product=11, SerialNum\
ber=3
<6> 1.452462] usb 2-2: Product: Samsung STORY Station
<6> 1.456217] usb 2-2: Manufacturer: JMicron
Any help woul dbe appreciated.
P.S.: I used th esearch function and google, but did find many similar articles but nothing matching my scenario. So I hope I did not miss something obvious.
If this USB drive is not USB3, then it should be mountable on-the-fly or by use of your fstab file. I can speak more about USB3 drives if this is the case. Otherwise, I normally do not suggest using the /media folder as it is there for auto mounting tasks. Why not plug in the drive and umount it if need be then start YaST / System / Partitioner, elect to edit the partition and enter a new folder name for it to be automounted like /Software, /Data, or /Multimedia for instance. This will create the appropriate fstab entry and create the folder name. If the partition type is NTFS, I normally edit the fstab partition entry and change the parameters to just say **default, **due to the lack of support for all of the Linux security flags, so most users can write to it. This is at least what I might suggest to you. You might tell us more about the hard drive within this external drive enclosure and the partition types that it contains to be more helpful to you.
Thank you for your reply, and sorry for forgetting to mention that it is a USB 2.0 device using ext3 but the latter does not matter.
Sorry, to say that, but you are missing the topic. I have no primary problem with the mount of the USB drives but to have the kernel device generate at first. All what you are saying won’t work without the device neither. There are reasons why I don’t use fstab, but that is another story, and as said of topic.
This does not only matter for the STORY Station btw , but also trying with a USB-Stick. If they get connected during the runtime (on-the-fly as you say), all works fine, the sd* devices are created and the udev rules for automounting using th elabel name do work correctly.
The only problem is that if the USB storage device is connected before the boot it won’t apear in /dev after the boot until it is disconnected and reconnected again.
My first guess was that the device is recognized before udev deamon is running, but this should be setteled by the udevadm trigger commands during the udev startup script. Reissuing he trigger commands manually from the prompt does not help either.
So there may be an issue with devices you do not mount in your fstab file and leave plugged into your PC when you reboot. My point is that it works fine when added to your fstab file and if it is your intent on hot plugging the device in on-the-fly, you should not keep it plugged in all of the time, particularly not on a reboot. Pick one or the other, fstab or don’t leave in plugged in and it works just fine. You can always report this as a bug, but I do wonder if it might be different between KDE, GNOME, XFCE or not loading any desktop at all? So far, it has not been an issue to using openSUSE for me and the topic is not new with openSUSE 11.4.
And I happily repeat, there is primarly no problem with mounting at all
My point is that it works fine when added to your fstab file
And my point is that thsi is not the case. For fstab to work a block device need to be created in the first place, and THAT is the issue. I get no block device created when I reboot, but only when I replug.
and if it is your intent on hot plugging the device in on-the-fly, you should not keep it plugged in all of the time, particularly not on a reboot.
Sorry to say this, but this is non-sense. If it would work with fstab after a reboot my problem would be gone (even without fstab) and thus this would not matter at all
Pick one or the other, fstab or don’t leave in plugged in and it works just fine.
But what magic line can be put into fstab to mount an non-existent block device ?
You can always report this as a bug, but I do wonder if it might be different between KDE, GNOME, XFCE or not loading any desktop at all?
No desktop is involved.
So as summary:
My Problem: No block special device is created during but, but only after replug of the USB storage
Your solution: Please tell me which entry to write into fstab to mount an non-existent block device and how fstab
So now, I believe it should be clear one of us is wrong, appologies if it’s me
My Problem: No block special device is created during but, but only after replug of the USB storage
Your solution: Please tell me which entry to write into fstab to mount an non-existent block device and how fstab
So now, I believe it should be clear one of us is wrong, apologies if it’s me
Gaston
Let me get back with you tonight when I have more time. But I do have USB 2/3 drives mounted in my fstab using openSUSE 11.4. Yesterday, I took my Dell E6400 Laptop, loaded openSUSE 11.4 and ALL files on to an External USB 2 hard drive, which added it to my fstab file and it boots up just fine. So any issue with lack of Block devices is either hard ware related problem or a setting in your kernel when it was compiled for a certain hard ware device. The specific USB hardware that does not work, with model number would be great for looking up issues.
On 03/21/2011 12:36 PM, jdmcdaniel3 wrote:
>
> So any issue with lack of Block devices is either hard
> ware related problem or a setting in your kernel when it was compiled
> for a certain hard ware device.
OR maybe it is a software problem: (from OP’s #1 post) “udev rules
setup to automount the device on /media/xxx by label. I used to have
my own rules, now have some more coplete from the internet.”
those udev rules were required for some previous version of openSUSE
(before it progressed to the level it is today…which is as you
described it)…and, i think if those udev rules are removed, and
those built in to openSUSE 11.4 are allow to operate, it will be as
you said, either:
plug in the usb after boot (and it will auto-mount–but where might
vary depending on what else is plugged in)
-or-
leave it plugged in and adjust fstab to allow mounting with boot
–
DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11
First of all I have to say that having to either have it plugin all th etime, or only to be plugged in after boot is not a viable situation for me. Not only is it way away from state of the art, also is it not what I need as both situations can occur, which basically is the reasoin th edrive is an external one.
Also having for example an USB-Stick connected to a server, requiring it to be replugged each time on ereboot sis not a viable situation.
Well that about th “ethics”. I will now remove my rules files and reboot, but I bet it wont change as my own rules used to be at “99”, so I guess any native rule should have dropped in before.
Also if th erules are th eproblem, it won’t work at replug.
Well as expected: After the reboot the devices have not been created
And that is exactely where we should concentrate on. Any “mounting” discussion is of no help as this is not the point, the only problem is that the /dev/sd* (/dev/sdc & /dev/sdd in my case) devices are not created at boot time.
After I unplugged and replugged the storage devices both devices have been created, but of course not mounted as I removed my rules to do so. My mounting rules are very decent and would mount the device like a marvel undependently on which order they are connected but they depend like fstab on the sd* devices to be created first.
Also it seems no problem of a particular hardware as I can simulate the problem with an USB stick as well. Other USB devices (non storage) are properly detected at boot.
While I don’t need any USB storage during boot I ask myself if th eproblem is maybe because usb_storage is not included in my initrd. Will chack that path…
As the usb-storage module is not included in th einitrd and this in ist init script it is not automatically loaded at boot, and the load only triggered by the USB driver when a storage device is plugged in as the recognition at USB level at boot time is done before the module is available.
Loading the module manually after boot via insmod does th etrick, so I have added “/sbin/modprobe usb-storage” to boot.local and put my udev rules into place again.
As result everything works perfectly and both the hardrive (story station) and the USB stick are properly mounted into /media.
As I said, the whole mounting discussion was not worth it
Anyway, in some way, nobody having an obvious solution pointed me into the correct direction.
On 03/21/2011 04:36 PM, gaston67 wrote:
>
> Anyway, in some way, nobody having an obvious solution pointed me into
> the correct direction.
>
i’m happy you got sorted, even if those who tried to help didn’t have
the answer you needed…at least now those who google in will be able
to follow your solution…thanks!!!
–
DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11
As the usb-storage module is not included in th einitrd and this in ist init script it is not automatically loaded at boot, and the load only triggered by the USB driver when a storage device is plugged in as the recognition at USB level at boot time is done before the module is available.
Loading the module manually after boot via insmod does th etrick, so I have added “/sbin/modprobe usb-storage” to boot.local and put my udev rules into place again.
As result everything works perfectly and both the hardrive (story station) and the USB stick are properly mounted into /media.
As I said, the whole mounting discussion was not worth it
Anyway, in some way, nobody having an obvious solution pointed me into the correct direction.
So thanks for that,
Gaston
Back in the SuSE Linux 10.0 days, you had to manually add the usb hard drive driver, but I was almost certain that since version 11.0, you no longer needed to explicitly add it in. I almost always have an external Hard drive already connected when I do my install, but not always and so far I have not run into a problem. Alls well that ends well I guess.
This is an excellent question with no easy answer I guess.
I should have made clear that I am not using standard kernel on servers but always build my own. I did not mention it since it is my philosophy since I started with linux some 20 years ago (linux 0.9x on a bunch of floppy disks lol! where the next version did introduce nfs installation which was a leap step…but that’s history ), so obviously it was too clear for myself and forgot to mention.
What concerns the default desktop kernel it comes with usb-storage built into the kernel (no module) so the device recognition is done at boot time and later injected into udev by the udev startup trigger commands.
In my own kernel usb-storage is a module which is not required at boot and thus not loaded into initrd so it needs to be triggered later during the startup.
Now I come to your question…yes already lol!
In my mind there was no doubt that the startup would have to do that for me if the module was present, so I even never investigated in that direction (my fault :shame: ) and concentrated to much on udev.
So what concerns my opinion, I would expect the module to beloaded at boot time, yes. The proper place for customizing it would be the kernel sysconfig entry MODULES_LOADED_ON_BOOT by appending (or entering) the usb-storage entry so that boot.loadmodules could take care.
As said, personally I would think this should be there by default, but there are probably other candidates as well. But I can also find arguments for not putting it in by default, so that in sum I would not file a feature request for this to happen.
P.S.: I have finally decided to build the kernel with built-in usb-storage as it will be required in most cases anyway. For any future readers wondering why they only can select usb mass storage as module, it requires the SCSI module to be build-in as well
On 03/22/2011 12:06 PM, gaston67 wrote:
>
> so that in sum I would not
> file a feature request for this to happen.
makes sense to me…and, therefore i’d guess you need to go ahead and
make a note to yourself that you CAN find when you next upgrade…
or, maybe your memory is better than mine…
i do keep a list of what i have to do during next upgrade [its a real
bitch to (for example) have to rebuild all the aliases from memory]…
but, sometimes i forget to update my /home/[me]/archive/upgrade.txt <sigh>
–
DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11
I stepped back from building the usb-storage driver into the kernel for two reasons:
Device recognition order
My Highpoint raid controller driver being loaded as module did detect the main disks after the USB storage drive, which resulted in the USB storage being sda… followed by the system disks.
This did not cause any problem as I mount by label but its not a clean situation.
A possible solution would have been to built-in the hptiop driver as well but thats not my preference. Also I would have to check that this one is really scanning before the USB driver.
USB storage hang
With th eusb-storage built-in the device did mount well, but when I tried to access the data my session hung until I switched of the storage.
I did not investigate this further as removing it from the kernel was my preference anyway, as by 1.
New solution:
usb-storage is a module again, not in initrd, but loaded via the sysconfig variable MODULES_LOADED_ON_BOOT
On 03/22/2011 05:06 PM, gaston67 wrote:
>
> which resulted in the USB storage being sda
the purpose of some of my earlier in this thread was because the
designation of the USB (as sda or sdz) is likely to change unless it
is in fstab and therefore treated just like any other drive…
i’m not sure if its place can be dependably fixed in any other way…
–
DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11
So gaston67, as an obvious master kernel compiler, have you ever looked at or heard of my bash script file called sakc? Of course those who have all of the commands down by heart may not be in need of a script file, but this one even allows modification of the kernel setup and being a script file, even customizable perhaps. Any way, it never hurts to look at what some else has done with the subject. You can find out more here about sakc:
Message #17 has the most recent version of sakc to use and #22 shows a companion bash script file I call klist to manage multiple kernel source files. The most recent stable kernel source file can be found here:
For anyone that jumps in and does not understand compiling a kernel and decides to download and use sakc, you have a few more things you must do for this to work; normally you should consider doing the following:
Open YaST / Software / Software Management - Select the View Button on the top left and pick Patterns. Now, you will see several Patterns listed and you want to select:
Development
[X] Base Development
[X] Linux Kernel Development
[X] C/C++ Development
Then Press the Accept button on the bottom right and allow these applications to install. Now gaston67, if this script holds any interest whats so ever, I would love any critique you might want to offer on how well it works for you.