Re: UMSDOS under i386 and PPC

2000-01-12 Thread Matija Nalis

On 8 Jan 2000 11:44:28 +0100, Yair Itzhaki [EMAIL PROTECTED] wrote:
I've found a cross-platform incompatibility when passing UMSDOS formatted
media (a FLASH disk) between i386 and PowerPC. Media created under i386
cannot be read using a PPC platform, and vice-versa.

I've traced it to the fact the some kernel elements (__kernel_dev_t,
__kernel_uid_t, __kernel_gid_t ...) are defined as 'unsigned short' under
i386, and 'unsigned int' under ppc (see /include/asm-XXX/posix_types.h). 

Hmmm, does anybody on the list have idea about handling this?

As current maintainer, I could:

1) change __kernel_uid_t, __kernel_gid_t and others to be __u16 (big/little
   endian handling was already in place for eons, it is just that neither I
   nor probably original author have multiple platforms to test it)
   This would break all current UMSDOS big-endian users.
   Also, what happens if uid_t or gid_t is  16bits ?
   
2) same as 1), but to __u32, and break all current UMSDOS IA32 users.
   This also would also require bumping up compatibility level, so new
   tools etc. would be required.

3) make optional #define to do 1) (undef by default), so users who need it can
   have IA32 compatibile UMSDOS filesystems (with all problems of spilling
   uid_t and gid_t if they are too big)
   
4) just leave it as it is, and wait for big VFS changes which will enable
   making of clean stackable fs so UMSDOS can be reinvented over any fs ?


This is causing the 'umsdos_dirent' structure to be sized differently, and
functions that read this directly from the EMD file get wrong data by
accessing wrong offsets in the structure ("umsdos_emd_dir_read" for
example).

To me, 4 or 3 look most realistic.

Any opinions on how it should be done correctly (if it can be) ?

-- 
Opinions above are GNU-copylefted.



Re: [FAQ-answer] Re: soft RAID5 + journalled FS + power failure = problems ?

2000-01-12 Thread mauelsha

"Stephen C. Tweedie" wrote:
 
 Hi,
 
 On Tue, 11 Jan 2000 15:03:03 +0100, mauelsha
 [EMAIL PROTECTED] said:
 
  THIS IS EXPECTED.  RAID-5 isn't proof against multiple failures, and the
  only way you can get bitten by this failure mode is to have a system
  failure and a disk failure at the same time.
 
  To try to avoid this kind of problem some brands do have additional
  logging (to disk which is slow for sure or to NVRAM) in place, which
  enables them to at least recognize the fault to avoid the
  reconstruction of invalid data or even enables them to recover the
  data by using redundant copies of it in NVRAM + logging information
  what could be written to the disks and what not.
 
 Absolutely: the only way to avoid it is to make the data+parity updates
 atomic, either in NVRAM or via transactions.  I'm not aware of any
 software RAID solutions which do such logging at the moment: do you know
 of any?
 

AFAIK Veritas only does the first part of what i mentioned above
(invalid
on disk data recognition).

They do logging by default for RAID5 volumes and optionaly also for
RAID1 volumes.

In the RAID5 (with logging) case they can figure out if an n-1 disk
write took place and can
rebuild the data. In case an n-m (1  m  n) took place they can
therefore at least
recognize the desaster ;-)

In the RAID1 (with logging) scenario they are able to recognize, which
of the n mirrors have actual
data and which ones don't to deliver the actual data to the user and to
try to make
the other mirrors consistent.

But because it's a software solution without any NVRAM support they
can't
handle the data redundancy case.

Heinz



Re: [FAQ-answer] Re: soft RAID5 + journalled FS + power failure = problems ?

2000-01-12 Thread Mark Ferrell

  Perhaps I am confused.  How is it that a power outage while attached
to the UPS becomes "unpredictable"?  

  We run a Dell PowerEdge 2300/400 using Linux software raid and the
system monitors it's own UPS.  When power failure occures the system
will bring itself down to a minimal state (runlevel 1) after the
batteries are below 50% .. and once below 15% it will shutdown which
turns off the UPS.  When power comes back on the UPS fires up and the
system resumes as normal.

  Addmitedly this wont prevent issues like god reaching out and slapping
my system via lightning or something, nor will it resolve issues where
someone decides to grab the power cable and swing around on it severing
the connection from the UPS to the system .. but for the most part it
has thus far prooven to be a fairly decent configuration.

Benno Senoner wrote:
 
 "Stephen C. Tweedie" wrote:
 
 (...)
 
 
  3) The soft-raid backround rebuild code reads and writes through the
 buffer cache with no synchronisation at all with other fs activity.
 After a crash, this background rebuild code will kill the
 write-ordering attempts of any journalling filesystem.
 
 This affects both ext3 and reiserfs, under both RAID-1 and RAID-5.
 
  Interaction 3) needs a bit more work from the raid core to fix, but it's
  still not that hard to do.
 
  So, can any of these problems affect other, non-journaled filesystems
  too?  Yes, 1) can: throughout the kernel there are places where buffers
  are modified before the dirty bits are set.  In such places we will
  always mark the buffers dirty soon, so the window in which an incorrect
  parity can be calculated is _very_ narrow (almost non-existant on
  non-SMP machines), and the window in which it will persist on disk is
  also very small.
 
  This is not a problem.  It is just another example of a race window
  which exists already with _all_ non-battery-backed RAID-5 systems (both
  software and hardware): even with perfect parity calculations, it is
  simply impossible to guarantee that an entire stipe update on RAID-5
  completes in a single, atomic operation.  If you write a single data
  block and its parity block to the RAID array, then on an unexpected
  reboot you will always have some risk that the parity will have been
  written, but not the data.  On a reboot, if you lose a disk then you can
  reconstruct it incorrectly due to the bogus parity.
 
  THIS IS EXPECTED.  RAID-5 isn't proof against multiple failures, and the
  only way you can get bitten by this failure mode is to have a system
  failure and a disk failure at the same time.
 
 
 
  --Stephen
 
 thank you very much for these clear explanations,
 
 Last doubt: :-)
 Assume all RAID code - FS interaction problems get fixed,
 since a linux soft-RAID5 box has no battery backup,
 does this mean that we will loose data
 ONLY if there is a power failure AND successive disk failure ?
 If we loose the power and then after reboot all disks remain intact
 can the RAID layer reconstruct all information in a safe way ?
 
 The problem is that power outages are unpredictable even in presence
 of UPSes therefore it is important to have some protection against
 power losses.
 
 regards,
 Benno.



Re: [FAQ-answer] Re: soft RAID5 + journalled FS + power failure = problems ?

2000-01-12 Thread Stephen C. Tweedie

Hi,

On Tue, 11 Jan 2000 16:41:55 -0600, "Mark Ferrell"
[EMAIL PROTECTED] said:

   Perhaps I am confused.  How is it that a power outage while attached
 to the UPS becomes "unpredictable"?  

One of the most common ways to get an outage while on a UPS is somebody
tripping over, or otherwise removing, the cable between the UPS and the
computer.  How exactly is that predictable?

Just because you reduce the risk of unexpected power outage doesn't mean
we can ignore the possibility.

--Stephen