Author Topic: Sharing drive between OS/2 and linux  (Read 21250 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #15 on: Today at 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.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #16 on: Today at 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

Andi B.

  • Hero Member
  • *****
  • Posts: 934
  • Karma: +17/-2
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #17 on: Today at 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.

Lars

  • Hero Member
  • *****
  • Posts: 1474
  • Karma: +74/-0
    • View Profile
Re: Sharing drive between OS/2 and linux -JFS
« Reply #18 on: Today at 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.


Andi B.

  • Hero Member
  • *****
  • Posts: 934
  • Karma: +17/-2
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #19 on: Today at 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?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5604
  • Karma: +141/-1
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #20 on: Today at 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 which suggests using a loopback device to force 512 sectors, might be save enough if you only use it as read only.

Andi B.

  • Hero Member
  • *****
  • Posts: 934
  • Karma: +17/-2
    • View Profile
Re: Sharing drive between OS/2 and linux
« Reply #21 on: Today at 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.