OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Storage => Topic started by: Ben Hjelt on December 14, 2021, 08:39:16 pm

Title: Sharing drive between OS/2 and linux
Post by: Ben Hjelt on December 14, 2021, 08:39:16 pm
Small external drive formatted as JFS on ArcaOS (not with mkfs.jfs -O on linux, did not work) ends up no named in linux and cannot even be mounted manually:
Code: [Select]
wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
A filesystem check shows no errors:
Code: [Select]
fsck.jfs version 1.1.15, 04-Mar-2011
processing started: 12/14/2021 21:25:25
The current device is:  /dev/sdb1
Block size in bytes:  4096
Filesystem size in blocks:  7679996
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 5 - Check Connectivity
**Phase 6 - Perform Approved Corrections
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
 30719984 kilobytes total disk space.
        0 kilobytes in 1 directories.
        0 kilobytes in 0 user files.
        0 kilobytes in extended attributes
    37792 kilobytes reserved for system use.
 30682192 kilobytes are available for use.
File system checked READ ONLY.
Filesystem is clean.

 ??? I would rather not format the drive as FAT32, is network sharing my only real option then?
Title: Re: Sharing drive between OS/2 and linux
Post by: Sean Casey on December 14, 2021, 09:43:16 pm
I mount my OS/2 HPFS file systems read/write on Linux. 
Title: Re: Sharing drive between OS/2 and linux
Post by: Ben Hjelt on December 14, 2021, 09:53:27 pm
HPFS has that 2GB file size limit, no?
Title: Re: Sharing drive between OS/2 and linux
Post by: ivan on December 14, 2021, 11:25:52 pm
A lot depends on how you expect to share that drive.  are OS/2 and Linux running on the same computer or separate computers?  If separate computers are they running at the same time and if so how do you connect the drive to both computers?

Also what type od data are you sharing?  I have 2 OS/2 computers, 2 ArcaOS computers and 4 Linux computers that can all share everything on 2 NAS boxes which allows backup as well as file sharing.

You need to define what you want to do, once you know that how to do it will be obvious.  Give us details of your setup and we should be able to give you advice.
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on December 15, 2021, 12:25:06 am
Small external drive formatted as JFS on ArcaOS (not with mkfs.jfs -O on linux, did not work) ends up no named in linux and cannot even be mounted manually:
Code: [Select]
wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
A filesystem check shows no errors:
Code: [Select]
fsck.jfs version 1.1.15, 04-Mar-2011
processing started: 12/14/2021 21:25:25
The current device is:  /dev/sdb1
Block size in bytes:  4096
Filesystem size in blocks:  7679996
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
**Phase 2 - Count links
**Phase 3 - Duplicate Block Rescan and Directory Connectedness
**Phase 4 - Report Problems
**Phase 5 - Check Connectivity
**Phase 6 - Perform Approved Corrections
**Phase 7 - Verify File/Directory Allocation Maps
**Phase 8 - Verify Disk Allocation Maps
 30719984 kilobytes total disk space.
        0 kilobytes in 1 directories.
        0 kilobytes in 0 user files.
        0 kilobytes in extended attributes
    37792 kilobytes reserved for system use.
 30682192 kilobytes are available for use.
File system checked READ ONLY.
Filesystem is clean.

 ??? I would rather not format the drive as FAT32, is network sharing my only real option then?

You never said which Linux distribution you're using. At least the fact that fsck.jfs succeeded shows that you have the JFS module installed, I believe. A lot of distributions don't include it or the HPFS module. Debian based ones still do it seems and others can install it.
One thing with OS/2 formatted JFS partitions is that they have no permissions, so unless you do a chown and chmod to make you the owner, they will only mount as root.
Here with Mint, depending on which desktop I'm using (need to reboot to remember, have the stock one and a simpler one installed), clicking on my USB drive in Computer will fail with a permission error or brings up 2 sudo popups that allow me to mount it as root.
I'd guess that you are mounting it with the wrong filesystem based on your errors, especially with fsck.jfs working. Unluckily I forget the mount incarnation needed to do it manually.
Mint also correctly mounts OS/2 JFS with the case insensitive flag.
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on December 15, 2021, 05:33:38 am
Here's how things look here when booted to Mint-Cinnamon. Today it didn't open the USB drives AOS formatted JFS 1 TB volume as sudo but the context menu allows it. Some folders have previously been chown by me. I also took the opportunity to trim my SSD's ArcaOS volumes. /dev/sda7 is my AOS HPFS 4GB boot volume.
Title: Re: Sharing drive between OS/2 and linux
Post by: Ben Hjelt on December 15, 2021, 09:32:33 am
Give us details of your setup and we should be able to give you advice.
A couple of linux machines and one ArcaOS 5.0.7 + Windows XP ;D dual boot desktop. The external drive would be a clone of my old thumbdrive that is filled with tools and drivers for many systems. I do have a OpenBSD NAS in use already, maybe carrying a hard drive around is passé.

Mint also correctly mounts OS/2 JFS with the case insensitive flag.
That's why i also use JFS on my Devuan machines (root, home and a case insensitive wine partition).
Title: Re: Sharing drive between OS/2 and linux
Post by: Ben Hjelt on December 15, 2021, 12:00:35 pm
 :-[ Seems to be a bug in the latest Devuan 4/Debian 11!
The ArcaOS formatted disk can be mounted in Devuan 3/Debian 10:

(https://files.catbox.moe/wk7tlt.png)
(https://files.catbox.moe/fl5h8h.png)

The partition name encoding seems to be unknown though.
EDIT: fixed by renaming it to all lowercase in linux, displays as uppercase in OS/2
Title: Re: Sharing drive between OS/2 and linux
Post by: Sean Casey on December 16, 2021, 04:41:46 am
HPFS has that 2GB file size limit, no?

Yes, HPFS has a 2GB file size limitation and a 64GB volume size limitation.  I have a 20GB HPFS 386 partition, used by ArcaOS, I mount R/W under Linux.
Title: Re: Sharing drive between OS/2 and linux -JFS
Post by: Andi B. on November 27, 2025, 03:51:18 pm
I can't manage to mount a OS/2 created JFS partition on my Debian 12. No matter what I tried it does not work.
Code: [Select]
root@zazu:/dev# mount -t jfs /dev/sdc1 /media/500GB/
mount: /media/500GB: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
In dmesg I see nothing what would help -
Code: [Select]
root@zazu:/srv# dmesg | grep -i sdc
[    3.817598] sd 3:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    3.817600] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[    3.817612] sd 3:0:0:0: [sdc] Write Protect is off
[    3.817615] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[    3.817632] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.817650] sd 3:0:0:0: [sdc] Preferred minimum I/O size 4096 bytes
[    3.840623]  sdc: sdc1
[    3.840683] sd 3:0:0:0: [sdc] Attached SCSI disk
[  361.915751]  sdc: sdc1
[  362.183053]  sdc: sdc1
[  686.496790]  sdc: sdc1
[12970.328576]  sdc: sdc1

Superblock seems to be okay -
Code: [Select]
root@zazu:/dev# jfs_tune -l /dev/sdc1
jfs_tune version 1.1.15, 04-Mar-2011

JFS filesystem superblock:

JFS magic number: 'JFS1'
JFS version: 1
JFS state: clean
JFS flags: JFS_OS2  JFS_COMMIT  JFS_GROUPCOMMIT  JFS_INLINELOG 
Aggregate block size: 4096 bytes
Aggregate size: 976672248 blocks
Physical block size: 512 bytes
Allocation group size: 1048576 aggregate blocks
Log device number: 0xb
Filesystem creation: Thu Nov 27 16:56:38 2025
Volume label: 'JFS_BACKUP'

I tried different disks. Numerous attempts to create a JFS partition with MiniLVM and try to mount it in Linux. But can't get it to work.

fdisk complains that it does not start on sector boundary. But how can that be? I think OS/2 - ArcaOS can create partitions on sector boundaries only.
Code: [Select]
root@zazu:/dev# fdisk -l
Disk /dev/sdc: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AZLX-6
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdf5ee166

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1  *       63 976768064 976768002 465,8G  7 HPFS/NTFS/exFAT

Partition 1 does not start on physical sector boundary.

Any attempts to create the partition on Linux an see it on ArcaOS fails also. Help appreciated.
Title: Re: Sharing drive between OS/2 and linux
Post by: Mike Kölling on November 27, 2025, 04:46:17 pm
Hi Andy,
I have same problem with my Bunsenlab system. However if I start the PuppyLinux-System created by DFSee I can see the OS/2-JFS drives and have access. Mabye looking there might give you the hint for a solution. I am an absolute novice to Linux at all and I am just happy that I could get the Bunsenlab running and a working SAMBA4 on it.
Greetings, Mike
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on November 27, 2025, 06:04:29 pm
Hi Andy, it is weird. The only time I've seen a similar message on Mint, it has been due to needing a chkdsk or fsck (after an OS/2 crash). Otherwise I just have permission problems which can be worked around. You could try doing a fsck-jfs /dev/sdc1 (think that is the command) and see what happens.
I usually just use the file manager to mount JFS partitions, double click on the device. You did use fdisk to make sure it is /dev/sdc1 you want? There's another command that I forget the name of to get the GUIID or whatever it is that Linux usually uses now.
BTW, OS/2 can't mount a Linux created JFS volume and Linux can only mount the standard OS/2 JFS volume with 4kb sectors, which your dmesg output says you have.
Later when I boot into Linux again, I'll try to see if I can find the actual mount command that the file manager uses. It does mount it with case insensitivity and I don't think xttrs (EAs) are enabled by default.
Other Linux dists often don't have JFS support and it needs to be installed, Debian and derivatives usually seem to have it.
Title: Re: Sharing drive between OS/2 and linux
Post by: Andi B. on November 27, 2025, 10:28:33 pm
I've just booted with Puppy DFsee16 stick and there I can read from that drive. mount shows rw,relatime options whatever that means. No clue why this does not work on Debian 12.
Title: Re: Sharing drive between OS/2 and linux
Post by: Andi B. on November 27, 2025, 10:53:05 pm
I've OpenSuse installed on this system too. But this can not mount it either :-(
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on November 27, 2025, 11:05:06 pm
I've OpenSuse installed on this system too. But this can not mount it either :-(

Does OpenSuse install JFS support? You might have to install the module.
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on November 28, 2025, 04:32:44 am
On Mint, Cinnamon desktop, I have a USB HD and a GPT partition mounted. The USB drive was automatically mounted and I opened files and clicked on the GPT partition to mount it, it complained I didn't have permission to use it,
From the tail of /etc/mtab,
Code: [Select]
/dev/sdb1 /media/dave/e97cd7fc-0000-0000-0000-000000000013 jfs rw,nosuid,nodev,relatime 0 0
/dev/nvme0n1p4 /media/dave/e97c9ffd-0000-0000-0000-00000000600f jfs rw,nosuid,nodev,relatime 0 0
At some point I need to trace down where these mount settings come from. /etc/fstab just has / /boot/efi /home and swap. /home is Linux JFS and the fstab setting is,
Code: [Select]
/home was on /dev/nvme0n1p7 during installation
UUID=eb46dd56-dd8f-460e-bcf4-0ef796161fe4 /home           jfs     defaults        0       2

BTW, about relatime
Quote
Relatime is a mount option in file systems that updates the access time of a file only when it is earlier than the file's modification time. This helps reduce disk writes and improve performance while still providing some access time information.
Otherwise JFS will update one of the time stamps every time you access the file, even if only reading it.
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on November 28, 2025, 04:48:10 am
I also have a HPFS that I actually use for sharing with Linux. Volume label is SHARE. HPFS in some ways is better with Linux as it simply works, even symlinks from OS/2. In the file manager, under Devices, the JFS volumes appear as, eg, 17 GB Volume while the HPFS partition shows as SHARE.
Really I should add it to fstab and mount it under /home.
The mtab entry,
Code: [Select]
/dev/sda7 /media/dave/SHARE hpfs rw,nosuid,nodev,relatime,uid=0,gid=0,umask=022 0 0
Title: Re: Sharing drive between OS/2 and linux
Post by: Andi B. on November 28, 2025, 10:01:35 am
I need to transfer a few 100GBs so HPFS is not good enough. I try to mount from command line with different options.
Code: [Select]
root@zazu:/etc# mount -t jfs /dev/sda1 /media/500GB/ -o rw,nosuid,nodev,relatimeHope this is the right format. But nothing work. /media/500GB exists and has 777. Mind now this drive is sda1. No clue why my BIOS mixes around the order. fdisk -l says -
Code: [Select]
Disk /dev/sda: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AZLX-6
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdf5ee166

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1  *       63 976768064 976768002 465,8G  7 HPFS/NTFS/exFAT
Funny Disk identifier. I read it as it was created with DFSee16.6 ;-)

OpenSuse gives another hint when it can not mount. Something about blacklisting. But the blacklisting files seem to not exist on my installation. So this shouldn't be the problem. Yes I've install JFS support for Debian and OpenSuse.

Funny thing is when gparted checks it sees the size and the used size correct. But it can't mount it either. Maybe picture helps.
Title: Re: Sharing drive between OS/2 and linux -JFS
Post by: Lars on November 28, 2025, 12:17:32 pm
I can't manage to mount a OS/2 created JFS partition on my Debian 12. No matter what I tried it does not work.
Code: [Select]
root@zazu:/dev# mount -t jfs /dev/sdc1 /media/500GB/
mount: /media/500GB: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
In dmesg I see nothing what would help -
Code: [Select]
root@zazu:/srv# dmesg | grep -i sdc
[    3.817598] sd 3:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    3.817600] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[    3.817612] sd 3:0:0:0: [sdc] Write Protect is off
[    3.817615] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[    3.817632] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.817650] sd 3:0:0:0: [sdc] Preferred minimum I/O size 4096 bytes
[    3.840623]  sdc: sdc1
[    3.840683] sd 3:0:0:0: [sdc] Attached SCSI disk
[  361.915751]  sdc: sdc1
[  362.183053]  sdc: sdc1
[  686.496790]  sdc: sdc1
[12970.328576]  sdc: sdc1

Superblock seems to be okay -
Code: [Select]
root@zazu:/dev# jfs_tune -l /dev/sdc1
jfs_tune version 1.1.15, 04-Mar-2011

JFS filesystem superblock:

JFS magic number: 'JFS1'
JFS version: 1
JFS state: clean
JFS flags: JFS_OS2  JFS_COMMIT  JFS_GROUPCOMMIT  JFS_INLINELOG 
Aggregate block size: 4096 bytes
Aggregate size: 976672248 blocks
Physical block size: 512 bytes
Allocation group size: 1048576 aggregate blocks
Log device number: 0xb
Filesystem creation: Thu Nov 27 16:56:38 2025
Volume label: 'JFS_BACKUP'

I tried different disks. Numerous attempts to create a JFS partition with MiniLVM and try to mount it in Linux. But can't get it to work.

fdisk complains that it does not start on sector boundary. But how can that be? I think OS/2 - ArcaOS can create partitions on sector boundaries only.
Code: [Select]
root@zazu:/dev# fdisk -l
Disk /dev/sdc: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDC WD5000AZLX-6
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xdf5ee166

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdc1  *       63 976768064 976768002 465,8G  7 HPFS/NTFS/exFAT

Partition 1 does not start on physical sector boundary.

Any attempts to create the partition on Linux an see it on ArcaOS fails also. Help appreciated.

Just a guess:
The error message says that the partition does not start on a physical sector boundary. Which is correct as the physical sector is 4096 bytes in size.
Given that the minimum I/O size is also 4096 bytes in size, I would think that your drive does not allow to be accessed by 512 byte sectors. Or you might need to jumper it (if possible) to allow addressing by 512 byte sectors.

Title: Re: Sharing drive between OS/2 and linux
Post by: Andi B. on November 28, 2025, 03:26:18 pm
Hi Lars,
it has jumper positions and I tried it. But it does not help. But the description of WD is a bit vague about the jumpers on newer drives.

OTOH if it would be a 4k drive only I think I couldn't partition and use it on OS/2 anyway, right?

Is there any possibility to force MiniLVM to create partitions on 4k boundaries? Maybe DFSee?
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on November 28, 2025, 05:26:29 pm
Hi Lars,
it has jumper positions and I tried it. But it does not help. But the description of WD is a bit vague about the jumpers on newer drives.

OTOH if it would be a 4k drive only I think I couldn't partition and use it on OS/2 anyway, right?

Is there any possibility to force MiniLVM to create partitions on 4k boundaries? Maybe DFSee?

Some say that it is possible using a dummy partition and the right math. Remy had a similar issue and opened an issue about it. The conclusion from Arca Noae was that it was not possible.
Simplest would be to get a USB drive, perhaps 1TB. Format it under OS/2 as JFS and copy under OS/2 everything to it and then copy it from Linux. This would be the safest but some USB enclosures actually force 4KB sectors. I have a 1TB and a 2TB USB drive that work fine under OS/2 and Linux and this would work with them.
Looking on the Internet, I found https://superuser.com/questions/679725/how-to-correct-512-byte-sector-mbr-on-a-4096-byte-sector-disk (https://superuser.com/questions/679725/how-to-correct-512-byte-sector-mbr-on-a-4096-byte-sector-disk) which suggests using a loopback device to force 512 sectors, might be save enough if you only use it as read only.
Title: Re: Sharing drive between OS/2 and linux
Post by: Andi B. on November 28, 2025, 06:36:37 pm
I never could get USB working fast on OS/2. Maybe on my new system USB3 would work but not on my old one. Would transfer over LAN instead. But our samba is not that stable too IMHO. And FTP is terrible slow with a lot of small files. Seems I've to rar it and then FTP over LAN.
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on November 29, 2025, 04:47:25 pm
Still weird that Puppy Linux could mount the volume. If the problem is sector size, I'd expect all Linux dists to fail.
Title: Re: Sharing drive between OS/2 and linux
Post by: CalYY on February 19, 2026, 07:41:47 am
Had asked the question of using OS/2 JFS partition on Linux in the AntiX forum. AntiX is a lightweight Devuan/Debian based distro. Besides the standard mount commands you use, do this as well after:

sudo chmod 0774 /media/device-name

Had Slackware based distros, Porteus I believe, read JFS partitions without doing anything special. That may have been a specific version as older distro could also read HPFS.
Title: Re: Sharing drive between OS/2 and linux
Post by: mauro on February 19, 2026, 07:11:40 pm
I'm sorry from now if going to write something useless for such scope; is that much away from sharing folders by samba between Linux and OS2 ? That's beacuse it is normally possible  that way between OS2 guest Virtualbox and Linux host. Of course not talking about Virtualbox Shared folder feature
Title: Re: Sharing drive between OS/2 and linux
Post by: Dave Yeo on February 19, 2026, 10:31:44 pm
Hi mauro, it is like giving a partition a drive letter on OS/2. Linux has a JFS (and HPFS) driver so mounting an OS/2 JFS volume gives you direct access to the file system without any overhead like Samba or shared folders.
Can even do fsck (chkdsk) on the file system which can be handy.
Title: Re: Sharing drive between OS/2 and linux
Post by: Andi B. on February 20, 2026, 09:37:32 am
I'm sorry from now if going to write something useless for such scope; is that much away from sharing folders by samba between Linux and OS2 ? That's beacuse it is normally possible  that way between OS2 guest Virtualbox and Linux host. Of course not talking about Virtualbox Shared folder feature
I want to put in different >xTB JFS backup drives full with OS/2 stuff into my Linux box and copy some/all files over. Copying millions of files >1TB is no fun over Samba. Mind our samba isn't the fastest and not the most stable too.

Thanks CaIYY -
Quote
sudo chmod 0774 /media/device-name
Will test this next time.

Btw. I also learned that rsync to samba share on NAS is much faster on Linux than on OS/2. Also much faster than with Win -> USB3.