For those having troubles due to XFS Inode64…
crazylinuxnerd last edited by
Hey, So if like me you have a primary HDD which is formatted using XFS which is larger than 1TB chances are you are using inode64 in your filesystem. While this is very much a good thing and will improve performance of your system, you may run into a few issues as I did. [b]Issues involve:[/b] - Various 32-bit applications may not be able to read critical system configuration files. Now, your first train of thought might be to disable inode64, now while this most certainly would fix the issues, it is not the best way to fix the issues. I will use an issue where PlayOnLinux/Wine is not able to detect Alsa devices. The goal is simple, we want these applications to work as if they were on a inode32 filesystem. Here's how we do it: [size=2][b]Note: Don't just copy and paste, some commands will need editing to suit your file locations.[/b][/size] [b]Method 1: Using another physical device or harddrive already formatted to ext3/ext4 (Easiest)[/b] This is the easiest method, and it goes like this: Create a directory on your second device called "alsa", so it should from the devices point of view, look something like "/alsa/". Now, as root run the following command: [code]$ cp -Prv /usr/share/alsa/* /media/YOURDEVICE/alsa/[/code] [size=2][i]Do note the flags on cp as they do the following: -P - Preserve permissions, -r recursively copy, -v be verbose[/i][/size] You should now have a mirror of your /etc/alsa on your devices /alsa/ directory. Although, do be aware that your devices /media/ location may vary to mine. Now for the magic, there is a feature of mount many people tend to forget that is very useful! You want to do the following: [code]$ mount --bind "/media/YOURDEVICE/alsa" /usr/share/alsa[/code] [size=2][i]We just mounted your devices alsa directory, in the location of /usr/share/alsa without modifying or altering the original location contents.[/i][/size] Now boot your PlayOnLinux prefixes winecfg, you should now see your audio devices listed! When you're finished, simply run: [code]$ umount /usr/share/alsa[/code] [i][size=2]Your wine prefix will no longer have audio after running this command, and your /usr/share/alsa will revert to how it was prior to mounting your second device.[/size][/i] [b]Method 2: Using a Virtual Device formatted to ext3 or ext4 (Easy)[/b] [b][i]Caution! Can cause damage if not performed correctly! I am not responsible for any loss of data.[/i][/b] This method is a little trickier, but will have the same effect. So this one, we need to create a virtual device, typically these are called "Containers" and are often encrypted. We are going to make one which is not encrypted. So, let's get started: [code]$ dd if=/dev/urandom of=/home/USER/NAMEOFCONTAINER bs=1M count=1024[/code] [size=2][i]Be careful with this![/i][/size] Let's breakdown what the above command is doing: Create file at location of using contents from interface /dev/urandom, at the size of 1024MB (1GB), for the alsa directory this file system size is more than enough. Now, you should have a file in your home directory of the name which you chose for your container. Okay, moving on, now we want to set this new container to be a loop device: [code]$ losetup /dev/loop6 /home/USER/NAMEOFCONTAINER[/code] [size=2][i]/dev/loop6 can be changed to any other /dev/loop if loop6 is already in use.[/i][/size] Now, we need a filesystem in our container... [code]$ mkfs.ext4 /dev/loop6[/code] [size=2][i]You can change mkfs.ext4 to mkfs.ex3 if you prefer ext3.[/i][/size] Okay! We are ready to mount for the first time :ohmy: [code]$ mkdir /mnt/tempdevice $ mount /dev/loop6 /mnt/tempdevice[/code] [size=2][i]If all went well, you have an empty ext4/ext3 filesystem inside /mnt/tempdevice![/i][/size] Now we need to prepare for mounting at /usr/share/alsa.. [code]$ cp -Prv /usr/share/alsa/* /mnt/tempdevice/[/code] [size=2][i]Do note the flags on cp as they do the following: -P - Preserve permissions, -r recursively copy, -v be verbose[/i][/size] Okay! Now, we need our loop6 to instead be at /usr/share/alsa! So let's put it there! [code]$ umount /mnt/tempdevice $ mount /dev/loop6 /usr/share/alsa[/code] [size=2][i]Your /usr/share/alsa is now a ext3/ext4 filesystem![/i][/size] Now boot your PlayOnLinux prefixes winecfg, you should now see your audio devices listed! When you're finished, simply run: [code]$ umount /usr/share/alsa[/code] [i][size=2]Your wine prefix will no longer have audio after running this command, and your /usr/share/alsa will revert to how it was prior to mounting your container.[/size][/i] And that is it! You can perform this trick on any directory for any application and should help mitigate inode64 issues, although I do suggest trying to get various applications to update themselves to support inode64 natively so these tricks are no longer needed, but until that is done, you can use this method to fix applications! Enjoy!