home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 134,653 of 135,536   
   Lars Poulsen to sc@fiat-linux.fr   
   Re: Case-dependent file systems   
   11 Jan 26 16:14:08   
   
   From: lars@beagle-ears.com   
      
   > Le 11-01-2026, Lawrence D’Oliveiro  a écrit :   
   >> Perhaps it’s worth a reminder of what Lars is trying to do: he has   
   >> discovered that the ext4 filesystem has the option for   
   >> case-insensitive operation. But this option has to be enabled at the   
   >> time a new volume is initialized, it cannot be added to an existing   
   >> volume. So he has to find some way of temporarily moving two terabytes   
   >> of data to somewhere else while he reinitializes his storage with this   
   >> new option.   
      
   On 2026-01-11, Stéphane CARPENTIER  wrote:   
   > Because he doesn't has any backup. Which s not a good idea when you have   
   > two tera of important data.   
      
   As I explained in another post,, I do have backups. But not necessarily   
   in the form that fits the "recommended" notion of making a backup every   
   time you do a major change, so that you can go back to an earlier state.   
      
   The plan is to   
   1) Do an image backup of the (terabyte-sized) hard drive containing the   
      "original "pre-conversion" file systems.   
   2) Get a new drive to be installed "post-conversion"   
   3) Build a new set of empty file systems with the "casefold"   
      feature on the new drive.   
   4) Copy the file structure of each "original" file system to   
      the new filesystems on the new drive, wile setting the "casefold"   
      attribute on each directory.   
   5) transfer the *files* into the new structure.   
   6) Verify that the file contents have landed correctly   
   7) Swap the drives and redo /etc/fstab   
      
   It is probably OK to skip step 1, assuming that the backups   
   already in production are good. (The existing "production   
   "backups are at the file level, not disk image level and are   
   incremental rsync using hard links for de-duplication.   
      
   Step 2 is long complete. :-)   
      
   Step 3 is fairly trivial.   
      
   Step 4 is a bitch. Since you apparently can only set the   
   casefold attribute on a directory WHEN IT IS EMPTY, this is a   
   slow and scary procedure, where for each for the 4000 or so   
   directories, you must "mkdir", then "chattr +F", "chown"   
   and "chmod".   
      
   Step 5 is then a simple rsync.   
      
   Step 6 also needs to accommodate the changes that have happened   
   in the live filesystem since we started.   
      
   The problem I still have not resolved (because my AI-assisted   
   internet searches are unclear about which OS and FS-types the   
   examples cited apply to), are   
   a) Is there a way to make the "casefold" attribute inheritable   
      in the tree underneath where you first set it?   
      You can do that  with file ownership (set-guidi and set-uid   
      bits in the directory's mode bits.)   
      Some of the articles imply that you MIGHT be able to do   
      that with an ACL on the root directory when the file system   
      is new and empty.   
      If that works, step 4 essentially falls away.   
   b) Is it possible that the rules have been relaxed enough that   
      chattr +F might work even if the directory is not empty,   
      so long as there is no conflict?   
      
   If (b), the problem is much diminished, but that is probably   
   not likely. But it would probably not be a lot of code to   
   implement.   
      
   Anyway, (a) is the real solution, but the necessary changes   
   are probably in many more places.   
      
   If neither of these are available, the problem really won't   
   stay solved even after all the effort, so it may not be worth   
   doing.   
      
   Anyone who knows or have other thoughts?   
   --   
   Lars Poulsen - an old geek in Santa Barbara, California   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca