785 lines
29 KiB
HTML
785 lines
29 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<META NAME="generator" CONTENT="lgazmail v1.4G.e">
|
|
<TITLE>The Answer Gang 89: The Journey to Journaling</TITLE>
|
|
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
<!--endcut ==============================================-->
|
|
<!-- begin 2 -->
|
|
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
|
|
height="50" width="60" alt="(?) " border="0"
|
|
>The Journey to Journaling</H3>
|
|
<H4 ALIGN="center">pack your fs' diary seperately</H4>
|
|
|
|
|
|
<p><strong>From Licht Bülb
|
|
</strong></p>
|
|
<p></strong></p>
|
|
<!-- ::
|
|
The Journey to Journaling
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
pack your fs' diary seperately
|
|
:: -->
|
|
|
|
<p align="right"><strong>Answered By Dolavimus the platypus, Pretzel, Virtual Beer, Konqi, Tuxedo T. Herring,
|
|
Swirl, corncob Pipe, the Scissors, Amanda the Panda
|
|
</strong></p>
|
|
<P><STRONG>
|
|
Hi Gang.
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
I'm fiddling on my laptop again (almost all things are working) trying to
|
|
get s-video out working. In the course of this fiddling I'm raking wildly in
|
|
the bios which sometimes screws up the display (and I am still able to login
|
|
via ssh) or the machine freezes. Then I have to "push the button" and -
|
|
since I was forced to use ext2 (ext3 accesses the hd every 5 secs ->
|
|
spindown and therefore power saving impossible) I have to wait quite some
|
|
time for the fsck to finish with my 10 GB root system (yeah, now I know why
|
|
to have multiple partitions..). So,
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
does any of you know a jounaling fs which plays nice with laptops? I googled
|
|
a bit, read stuff, but didn't find anything about it. I think I remember
|
|
someone here in the TAG saying that reiserfs had some patch to play nice?
|
|
Can someone confirm that?
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
Cheers and TIA
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Dolavimus]
|
|
I've been using rfs on my laptop since new two yrs ago with good results.
|
|
Although I haven't done anything in particular to address hd spin down for
|
|
power economy.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Amanda]
|
|
I have actually used ext3 with a recently installed <A HREF="http://www.debian.org/">Debian</A> "testing"
|
|
distribution. The hdd access can be "reduced" by installing "noflushd".
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
noflushd doesn't work with any j-fs. It says so on the web page.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Amanda]
|
|
However, I confess that I haven't really had a chance to fully examine
|
|
this issue. As regards partitioning the disk the following works well:
|
|
<TT>/</TT>, <TT>/usr</TT>, <TT>/boot</TT> as ext2 mounted read-only. Of <TT>/tmp</TT>, <TT>/var</TT> and <TT>/home</TT> which
|
|
need to be writable only <TT>/home</TT> really is usually large enough to require
|
|
journalling ( and sometimes <TT>/var</TT> ).
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
I have tried several things over time: only one root and a small boot, full
|
|
monty with all dirs on seperate partitions and some things in between. The
|
|
prob with several partition: when you need some large space (naturally) none
|
|
is there on a single partition. Across two or more there would be enough...
|
|
Disadvantage of only one <TT>/:</TT> you can not unmount anything beforehand if you
|
|
know you gonna crash the system now... And a crypto-fs is hard to make then
|
|
too.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pretzel]
|
|
I think the very <EM>idea</EM> of a journaling filesystem makes "play[ing] nice"
|
|
impossible. Journaling filesystems <EM>have</EM> to access the hard drive on every
|
|
write. More accurately, they have to access the journal device each filesystem
|
|
write.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Well, it might be necessary for the j-fs to write to it's journal every fs
|
|
access, but ext3 writes to hdd <EM>every</EM> 5 secs, regardless of fs access or
|
|
not.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pretzel]
|
|
I think most journaling filesystem in Linux have an option for
|
|
journaling device which is normally on-disk but can be on any block device, at
|
|
least with ext3 and reiserfs. Some non-volatile memory would do nicely, but on
|
|
a laptop, I think the chances of being able to do this are almost nil.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
I (as a not-knower) would have two ideas: a compact flash card in the pcmcia
|
|
slot and - RAM! In case of the RAM the journal would then be written to
|
|
hdd when also a normal hdd access takes place. True, this would be bad if a
|
|
system outage would occur without the journal having been rewritten to disk
|
|
but <EM>I</EM> would take these chances...
|
|
In case of CF, dunno if you can plug them in straight away or if you need an
|
|
adapter, but 16MB are really cheap anmd if you can save some power (-> time)
|
|
with it...
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pretzel]
|
|
Doing it in RAM would effectivly make a journaling fs useless. What would be
|
|
the point then? That's the same effect as using a non-journaled filesystem.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Well, the journal would get written to disk with the data. If you use
|
|
noflushd then writes of the system (logging etc.) get postponed or get
|
|
written to RAM and then get written to hdd if a normal write (user
|
|
initiated) occurs. So, I dunno exactly how noflushd does this but when it
|
|
redirects the writes to ram the journal entries (if they need to be made in
|
|
that case) should be written to ram too.
|
|
</STRONG></P>
|
|
|
|
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Scissors] This isn't so much "writtem to RAM" like scribbled in a ramdisk - it's
|
|
more like being hidden in the RAM of a caching controller. That's all
|
|
noflushd does, is allow some buffering at the filesystem-driver level.
|
|
So if something really does have content for the disk - and yes, that
|
|
includes its journals - it's either got to hit the disk eventually, or
|
|
you get to bear the risk that something might fail before it does.
|
|
</blockquote>
|
|
<blockquote>But the whole point of having a journal is to have it still be present
|
|
after a reboot event made something which normally isn't volatile space,
|
|
lose its cookies. Having a journal that isn't allowed to do its job
|
|
just complicates matters. Ergo, it shouldn't be put on volatile RAM.
|
|
</blockquote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pretzel]
|
|
Another possiblily compiling a kernel with magic sysrq support, if the machice
|
|
isn't totally frozen, you could do an emergency Sync/Unmount/Reboot.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
OK, now I have to admit it: HOW THE HECK DOES THIS WORK? I read the stuff in
|
|
<TT>/usr/src/linux/docs/</TT> but as much as I gathered Alt-Print d should do
|
|
something? It doesn't in my case. I compiled this in (if it's only the Magic
|
|
SysRq key in Kernel hacking) some time (not in my current kernel I see now)
|
|
but then (I tested it) it didn't work.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pretzel]
|
|
Worked for me. (I say worked because at the moment I don't have it compiled
|
|
it.) Try Alt-Sysrq-<magic sysrq command> (all three at the same time.) I don't
|
|
remember if it needed all three at once or not. sysrq probably only says
|
|
"print screen" on some keyboards.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Yeah, the prob was all at the same time... Now it works.
|
|
</STRONG></P>
|
|
|
|
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Scissors] At least part of the confusion is with SysRq - on some keyboards the
|
|
SysRq lives as a subfunction on another key. Thus for such keyboards
|
|
you'd also need the extra key that invokes the secondary keycode. Fn
|
|
maybe.
|
|
</blockquote>
|
|
<blockquote>When it works then you should be able to (for instance) press Z and get
|
|
a little help list. In fact any character that doesn't do something is
|
|
supposed to show the little list. What I'm not clear on is "get outta
|
|
sysrq mode"...
|
|
</blockquote>
|
|
<blockquote>I've sometimes seen a console get into a state where it would respond to
|
|
Magic SysRq, but it couldn't get out of that mode anymore. So I hope
|
|
you have some spare virtual consoles, if you are just using it to settle
|
|
something simpler than "telinit 6 doesn't work".
|
|
</blockquote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pretzel]
|
|
So, in summary: No.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=":-)"
|
|
height="24" width="20" align="middle">
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
A No? <shout> I DON'T ACCEPT NO "NO" ! </shout> (yes, I've been in the
|
|
army..)
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=";-)"
|
|
height="24" width="20" align="middle">
|
|
</STRONG></P>
|
|
<HR width="10%" align="left"><blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Beer]
|
|
Why not plug one of these USB memory sticks and keep the journals there? That
|
|
way the immediate access is only required for the USB device and not for the
|
|
actual HD.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Cool idea, hadn't thought of this one, although I recently bought one! <me
|
|
stupid>
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Beer]
|
|
Which one? I've seem that Sony ads -- but they tell a lot about some strange
|
|
cruft with user mangerment and cryptosoftware which suggest custom WinXX
|
|
drivers to my suspicious ears.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
The cheapest one I could find. It was 49 Euro, super slim and works like a
|
|
charm. I think I will use gpg to encrypt files on the thing and simply put a
|
|
win gpg version on the stick too.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Beer]
|
|
If I ask for a drive give me drive and not an encryption device where I can't
|
|
trust the encryption anyway....
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
True, true...
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Beer]
|
|
Might still need patches, but if the journal keeping actually
|
|
needs only access to the journmal file and is not accessing the HD
|
|
where the data are finally going anyway -- It might even work with existing
|
|
journal/kernel code.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
Then on the other hand you want journaling for some testing period -- why is
|
|
power saving durting that time so important? You could always switch back to
|
|
unjournaled if power saving is important. ext2/3 in that case would be
|
|
easiest as a cleanly unmounted ext3 is mountable as ext2 without problems.
|
|
The switching between ext3 and ext2 might be done by boot options I guess.
|
|
(can you ask in a init.d script for boot options ?)
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Well, the case is pressing just now in this testing period. I just rebooted
|
|
and had a full fsck (with Ctrd-d at the end) just now and I really need a
|
|
j-fs NOW. But I like the idea of j-fs's generally so I would like to keep it
|
|
after the fiddling too. You are right that ext2|3 would work now but I am a
|
|
little bit burnt with that since I had ext3 in the very beginning, installed
|
|
the system (a lot) and then wanted to switch to ext2 (with removing the
|
|
journal) according to manual. But the ext-tools weren't current at that time
|
|
in testing|sid so this broke (!) the fs with FULL reinstall (some bad things
|
|
occured at the same time leading to this). But ext2|3 would be an option.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Beer]
|
|
I never tried to completely switch back to ext2 and delete the journals, but
|
|
I <EM>did</EM> mount ext3 as ext2 and nothing bad happened. I made sure they are
|
|
clean so.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
On Laptop power save is only a real issue on battery -- then the sudden
|
|
crashes should not be that frequent unless you insist of fiddling around in
|
|
kernel space on the train.... So for some normal usage running on battery and
|
|
ext2 might be sufficient, but when you are on mains power you can switch back
|
|
to ext3. There must be a way to make this decission in lilo by some option
|
|
which is evaluated in init.d/boot*
|
|
</blockQuote>
|
|
<blockQuote>
|
|
Or check if you are on battery and make the decision based on that. Frequent
|
|
sleep/resume inbetween are then not that practical so.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Konqi]
|
|
For those living in Germany: Aldi has an 128 MB USB memory stick for 49.99
|
|
Euro next week, I read in an Heise announcement.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
And for those who want to know something about mine:
|
|
<A HREF="http://www.computer-cash-carry.de/ccc/index-ns.html"
|
|
>http://www.computer-cash-carry.de/ccc/index-ns.html</A>
|
|
see Festplatten IDE, there at the bottom (all german, just for the curious)
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Tux]
|
|
Any of you guys want to write up an article on what it takes to get one
|
|
working, or is it simple enough to describe in a 2-cent tip? I'd be very
|
|
curious.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
</STRONG></P>
|
|
|
|
<pre><strong>modprobe sd_mod
|
|
modprobe usb-storage
|
|
mount /dev/sda1 /mnt/usbstick
|
|
</strong></pre>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
|
|
height="24" width="20" align="middle">
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Tux]
|
|
Wow. Mondo cool. I love Linux.
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
|
|
height="24" width="20" align="middle">
|
|
</blockQuote>
|
|
<blockQuote>
|
|
I think that there's a USB memory stick in my near future...
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I wonder if what I have
|
|
<A HREF="http://linuxmafia.com/~rick/linux-info/easydisk-memorystick"
|
|
>on my website</a>
|
|
is sufficient for a 2-cent tip? I can re-write it, if it's considered too
|
|
half-assed. Here's the relevant excerpt:
|
|
</blockQuote>
|
|
<blockQuote>
|
|
USB on Linux seems a bit... different, especially since I'm not really
|
|
used to devfs-type things.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Beer]
|
|
The only thing I ever tried was a digital camera (Olympus C100 zoom) and it
|
|
needed a kernel patch (usb-driver) to be properly recognised. Apart from that
|
|
the camera works as a disk as expected.
|
|
I mount <TT>/dev/sda1</TT>, it will be rw right on the first mount, no need for
|
|
remounting.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
So if you really <EM>have</EM> to go through all this remounting, you can't fdisk
|
|
the thing into partitions, etc. It really seems strange.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
I do remember that zip-drive "problem" -- the win programs to access it
|
|
partition it to use sda4 instead of sda1. So this might all be very specific
|
|
to the hardware and drivers used (or used the first time the disk was
|
|
partitioned).
|
|
</blockQuote>
|
|
<blockQuote>
|
|
But basically these memory sticks seem to work, then I'll keep my eyes open
|
|
for one.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I've been figuring out how best to deal with
|
|
it on my laptop, since my wife gave me a 32 MB Easy Disk "memory stick",
|
|
a cute little plastic thing on a keychain fob.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
I'm still working it out, but it looks like I need the usb-uhci and
|
|
usb-storage drivers (impliedly also usbcore), at which point I can do:
|
|
</blockQuote>
|
|
|
|
<blockquote><code><font color="#000033"><br> # mount -o rw,uid=1000,gid=1000 -t vfat /dev/sda /mnt/fob/
|
|
</font></code></blockquote>
|
|
<blockQuote>
|
|
(where 1000 is my own login account's UID and GID).[1]
|
|
</blockQuote>
|
|
<blockQuote>
|
|
The bizarre thing is: That command (or anything like it) always
|
|
returns:
|
|
</blockQuote>
|
|
|
|
<blockquote><code><font color="#000033"><br> mount: block device /dev/sda is write-protected, mounting read-only
|
|
</font></code></blockquote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [corncob Pipe]
|
|
I believe that this error is more of a "fail-safe"
|
|
than it is an annoyance...
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I banged my head up against that problem for a couple of days, and
|
|
"fdisk <TT>/dev/sda</TT>" kept insisting...
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Um, my usb stick has a small switch on it's side to make it write-protected.
|
|
You don't have by chance missed that one?
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
That was part of what I spent some part of a couple of days, looking for.
|
|
No, there's no hardware switch. Moreover, doing a remount entirely via
|
|
software <em> _does</em> succeed in making it writeable, following the initial
|
|
mount. If the obstacle were a hardware switch, that would not have
|
|
happened.
|
|
</blockQuote>
|
|
|
|
<blockquote><code><font color="#000033"><br> # fdisk /dev/sda
|
|
<br> You will not be able to write the partition table.
|
|
</font></code></blockquote>
|
|
<blockQuote>
|
|
...until it finally occurred to me to do...
|
|
</blockQuote>
|
|
|
|
<blockquote><code><font color="#000033"><br> # mount -o rw,remount /mnt/fob
|
|
</font></code></blockquote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
Does it? To me, the mount command references
|
|
"<TT>/mnt/fob</TT>" (unless of course, "<TT>/mnt/fob</TT>" points to
|
|
"<TT>/dev/sda</TT>"???)
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
The point is that the <em> _original</em> mount command, which gets re-mounted
|
|
here, uses <TT>/dev/sda</TT>, <em> _not</em> <TT>/dev/sda1.</TT> I'm trying to stress that at
|
|
least <em> _some</em> memory sticks must be addressed as if they were SCSI-based
|
|
<em>floppy</em> drives. No partition numbers, you see? This was non-obvious
|
|
point #1.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
What you have done here it to re-mount in in "rw"
|
|
mode, yay!
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
Um, yes. That's exactly my point. The necessity to do so was
|
|
non-obvious point #2.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
Notice that the mount command references <TT>/dev/sda</TT>, instead of <TT>/dev/sda1.</TT>
|
|
That's the other odd thing: I kept had no luck until I happened to try
|
|
/dev/sda.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
I think this is as a result of the way in which device
|
|
files are referenced under Linux
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
Well, where were you when I was trying to mount the device, the first
|
|
time?
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=";->"
|
|
height="24" width="20" align="middle">
|
|
</blockQuote>
|
|
<blockQuote>
|
|
I'm saying _the point is non-obvious_ because many other instructions
|
|
one finds for mounting similar devices tell you otherwise, because
|
|
intuition suggests that a memory stick ought to be addressed like a hard
|
|
drive, such that it can have multiple partitions, and because it's the
|
|
first time in a decade of addressing SCSI devices on Linux that I've
|
|
<em>not</em> put a number after <TT>/dev/sda.</TT>
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
Oh, <EM>now</EM> I see what you meant. I mis-interpreted you
|
|
the first time.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
My guess is that the Easy Disk is being addressed as if it were a floppy
|
|
disk instead of a hard drive partition, which is why it's sda instead of
|
|
sda1.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
Hmm, I don't quite follow you here. Why would a HD
|
|
partition not utilise "sda1" if told to do so?
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I'm not sure what's the nature of your confusion: Are you willing to
|
|
simply take my word for it that addressing <TT>/dev/sda1</TT> on the memory stick
|
|
absolutely does not work, and that addressing <TT>/dev/sda</TT> does? That would
|
|
make this conversation a great deal easier.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
Oh, I'm not doubting you one bit, I just mis-read your
|
|
sentence, I'm sorry, Rick.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
And I believe you're missing my point: Because the Easy Disk is (it
|
|
seems) classed as functionally the same as a floppy disk, there is no
|
|
concept of partitioning, and thus no partition numbers.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
And if
|
|
Easy Disk were being addressed as a floppy then it
|
|
ought to use "<TT>/dev/fdx</TT>" in this case, surely?
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I beg your pardon, but no. That wouldn't be SCSI then, would it?
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
It would, it would.
|
|
</blockQuote>
|
|
|
|
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Scissors] I seem to recall that normal floppy disks used in an IDE-chain LS-120
|
|
bay are still accessed by the fdx mechanism. However the one around
|
|
here lost a pin so I can't check.
|
|
</blockquote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I hope you're not under the impression that there aren't all Linux
|
|
floppy disks must be addressed as <TT>/dev/fdx?</TT> SCSI ones are <TT>/dev/sdX</TT>,
|
|
and parallel-port ones are <TT>/dev/pfN</TT> . Neither supports partitioning.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
!
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I have no idea why Linux always mounts it read-only, though.
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
Me neither.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
I have no clue what it is recognised or attached like, but in my case I have
|
|
to use <TT>/dev/sda1</TT>, else it will make trouble.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
Yes, I've heard such reports. That is why I have concluded that some
|
|
USB memory sticks are recognised as quasi-floppies, and some as
|
|
quasi-hard disks.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
I guess there are two (or more) controller producers and there comes this
|
|
trouble.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
If by "controller" you mean the USB chipset on the motherboard, I very
|
|
much doubt that, because the difference seems specific to the add-on USB
|
|
storage device, not the USB host.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
No, I didn't mean the host, I meant the usb controller in the sticky. These
|
|
need some controller too, don't they?
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
They need some sort of USB circuitry, and, to be sure, differences in
|
|
such circuitry seem to have caused these differences in mode of
|
|
operation between memory sticks. Whether it's common to call that
|
|
circuitry a "USB controller", I am unsure, but such was not my
|
|
impression.
|
|
</blockQuote>
|
|
<P><STRONG>
|
|
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
>
|
|
Maybe there are even patents involved so that the other producer
|
|
had to take a different approach (and maybe this also helped in case of
|
|
"booting off floppy -> off usbstick).
|
|
Anybody anything about the subject?
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
|
|
height="24" width="20" align="middle">
|
|
</STRONG></P>
|
|
<P><STRONG>
|
|
But there is a strange thing:
|
|
sometimes there comes a error message saying that there is (can't rememeber
|
|
what) wrong, then I try to mount <TT>/dev/sda</TT>, this will fail, and then I can
|
|
mount <TT>/dev/sda1</TT> - So much for deterministics.
|
|
</STRONG></P>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Pipe]
|
|
Unless of course this is as a result of
|
|
the Kernel's divine intervention??? Va savoir??
|
|
</blockQuote>
|
|
<blockQuote>
|
|
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
|
|
HEIGHT="28" WIDTH="50" BORDER="0"
|
|
> [Swirl]
|
|
I'm ultimately less interested in kernel psychoanalysis than in making
|
|
it do what I want, thanks.
|
|
<IMG SRC="../../gx/dennis/smily.gif" ALT=";-)"
|
|
height="24" width="20" align="middle">
|
|
</blockQuote>
|
|
|
|
<!-- end 1 -->
|
|
<!-- *** BEGIN copyright *** -->
|
|
<hr>
|
|
<CENTER><SMALL><STRONG>
|
|
<h5>
|
|
<br>Copyright © 2003
|
|
<br>Copying license <A HREF="">http://www.linuxgazette.com/copying.html</A>
|
|
<BR>Published in Issue 89 of <i>Linux Gazette</i>, April 2003</H5>
|
|
</STRONG></SMALL></CENTER>
|
|
<!-- *** END copyright *** -->
|
|
|
|
<SMALL><CENTER><H6 ALIGN="center">HTML script maintained by
|
|
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
|
|
Starshine Technical Services,
|
|
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
|
|
</H6></SMALL></CENTER>
|
|
<HR>
|
|
<!--startcut ======================================================= -->
|
|
<P> <hr>
|
|
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<p align="center">
|
|
<table width="100%" border="0"><tr>
|
|
<td align="right" valign="center"
|
|
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
|
|
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
|
|
><A HREF="../index.html"
|
|
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
|
|
ALT="[ Table Of Contents ]" border="0"></A
|
|
><A HREF="../lg_answer.html"
|
|
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
|
|
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
|
|
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
|
|
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A>
|
|
<A HREF="../../tag/bios.html">Meet the Gang</A>
|
|
<A HREF="1.html">1</A>
|
|
<A HREF="2.html">2</A>
|
|
<A HREF="3.html">3</A>
|
|
</td>
|
|
<td align="left" valign="center"><A HREF="../../tag/kb.html"
|
|
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
|
|
ALT="[ Index of Past Answers ]" border="0"></A
|
|
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
|
|
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
|
|
</p>
|
|
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
|
<!--endcut ========================================================= -->
|
|
<P> <hr>
|
|
<!--startcut ======================================================= -->
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</p>
|
|
<!--endcut ========================================================= -->
|
|
<!--startcut ======================================================= -->
|
|
</BODY></HTML>
|
|
<!--endcut ========================================================= -->
|