Author Topic: Extended Attributes - OS/2 only thing?  (Read 1273 times)

Dariusz Piatkowski

  • Sr. Member
  • ****
  • Thank You
  • -Given: 13
  • -Receive: 8
  • Posts: 453
    • View Profile
Extended Attributes - OS/2 only thing?
« on: January 07, 2018, 06:28:41 pm »
The Q may seem really trivial, I always thought that most of the filesystems out there supported some kind of EAs, see https://en.wikipedia.org/wiki/Extended_file_attributes and https://msdn.microsoft.com/en-us/library/windows/desktop/ee681827%28v=vs.85%29.aspx. However, as I near my attempted migration to a 4TB NAS box I struggle with the concept of retaining my EAs (mostly image thumbnails).

Specifically, my NAS box (ZyXel NSA325 v2) does not appear to handle EAs. OK, but my NetDrive links me up with both my Win7 and XP boxes, yet there as well a simple copy of an image file with thumbnail present fails. On the other hand, the minute I strip out the thumbnail all is good.

So is the problem here a missing setup on the "other" side, meaning Win7/XP/NAS? Or am I looking at some NetDrive plug-in issue here?

Before you ask, the NetDrive shares are setup to support EAs, meaning, the link is defined as if the remote box (Win7/XP/NAS) supported EAs. Therefore, I believe that the OS/2 side would attempt to share the EAs and the failures I'm seeing stem from the fact that the remote boxes do not support EAs.

Why do I care so much about retaining the thumbnails? Well, our whole photo album is going to go to a NAS box. I use PMView to browse, or mobile apps otherwise. PMView is much faster to display human digestable directory contents (images) if thumbnails exist, and given that Samba clients appear to have to read the full directory contents before displaying anything locally I am hoping I will be able to avoid this lack.

Unfortunately due to my "EAs on remote side" issue I have not been able to test out this theory.

I am also considering using a NFS or even a FTP NetDrive plugin...but absolutely no idea if/how EAs would be impacted in that case....more testing needed...LOL!

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 28
  • Posts: 651
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #1 on: January 07, 2018, 07:50:52 pm »
Hi Dariusz

I bumped into this EA problem with a NAS - Linksys NSLU2 with attached USB drive - some time back. It seems that while the filesystems available in the NAS (ext3 IIRC) supported EAs that support had to be turned on by recompiling either/both the kernel and filesystem - which was beyond me.

I tried but failed to get the nslu2-linux people - http://www.nslu2-linux.org/ - to make the necessary changes in their alternative firmware for the NAS.

In the end I gave up on the idea of a neat little NAS for use with OS/2 based systems and now use an old pc with eCS installed as a fileserver - no problems with EAs  :-)


Regards

Pete

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 39
  • Posts: 1039
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #2 on: January 07, 2018, 08:14:25 pm »
I don't know about your specific NAS box, but a few years ago, when i was researching this, I found out that most (if not all) NAS boxes run some form of Linux internally. EA support depends on exactly how the Linux has been set up, but most (if not all) only support 4K of EA data, while OS/2 supports 64K of EA data. As you can probably imagine, that can be a bit of a problem, sometimes.

My final solution was to use an old computer (P4 with 1 GB of memory), add a SATA controller, a 2 TB drive, and a gigabit network adapter. Then install eCS (now ArcaOS), and configure the services that I needed, which include PMVNC server (for remote control), Peter Moylan's weasel mail server (including IMAP), Peter Moylan's FTP server, Peter Moylan's Major Major. Web/2, SAMBA server, RSync (server mode), and a few other things. Of course, it supports 64K EAs, and it works with OS/2, windows, and Linux (specifically Mint). It just sits under the stairs, and does it's job. I usually update it about once per month, so I don't really know how long it would run, if I let it.

FWIW, windows 7, and up, seems to support EAs, but I am not sure how big they can be. I am pretty sure that they are less than 64K, and, AFAICT windows never uses EAs. I also don't know much about NETDRIVE. That always seemed to be an unnecessary option. Since the 2 TB disk contains my most recent backups, I could also use the OS/2 based NAS box as my main computer, with minor tweaking, if I ever lost my main computer, for some reason.

The 2 TB drive was the most expensive part of the whole thing (other than ArcaOS), and it has worked better than I had hoped. You do want to make sure that you have a good machine (no bulging capacitors), for reliability. Another advantage is that you have full control over what it runs internally.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 106
  • Posts: 1477
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #3 on: January 07, 2018, 08:47:59 pm »
There are Linux filesystems that support 64KBs of EAs or more, the obvious example being JFS, which is what I usually use on Linux (except /boot where I stick with ext3 as grub has had problems reading JFS) as it is considered one of the best all around file systems. https://en.wikipedia.org/wiki/JFS_%28file_system%29#JFS_in_Linux
EAs do have to be enabled in the kernel and mounted correctly to support them.
On Win NT, EAs have always been supported by some file systems, first HPFS and then NTFS, which has one stream purposely to support EAs (uses codepages rather then unicode IIRC). I'd assume the support is still there in the latest versions but don't really know.

Andy Willis

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 10
  • Posts: 187
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #4 on: January 08, 2018, 02:34:38 pm »
There are Linux filesystems that support 64KBs of EAs or more, the obvious example being JFS, which is what I usually use on Linux (except /boot where I stick with ext3 as grub has had problems reading JFS) as it is considered one of the best all around file systems. https://en.wikipedia.org/wiki/JFS_%28file_system%29#JFS_in_Linux
EAs do have to be enabled in the kernel and mounted correctly to support them.
On Win NT, EAs have always been supported by some file systems, first HPFS and then NTFS, which has one stream purposely to support EAs (uses codepages rather then unicode IIRC). I'd assume the support is still there in the latest versions but don't really know.

I don't know that EA support is still in Windows but there is a good chance as Windows used EAs in one way that was the same as OS/2, in the printer subsystem and there is a reasonable chance they have not changed that.

Doug Clark

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 73
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #5 on: February 03, 2018, 08:39:31 pm »
Extended attributes are supported in NTFS. Some years ago I was working on a program for storing and searching information in extended attributes on NTFS. However extended attributes appear to be rarely used on Windows. If you search for extended attributes they seem to be used most by malware writers.

I am not sure of the max size of EAs on NTFS, but one article I read said 64k - which is probably a good limit to use.

PMview runs on Windows as well as OS/2 and it uses thumbnails; I assume it is storing those thumbnails in EAs - on Windows as well as OS/2

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 106
  • Posts: 1477
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #6 on: February 03, 2018, 09:06:26 pm »
It's a bit more complicated on NTFS. It supports streams, https://en.wikipedia.org/wiki/NTFS#Alternate_data_streams_%28ADS%29 which can be whatever length. EA support is enabled by having one special stream, probably limited in size as you say and also limited to using codepages rather then being UTF, dedicated for EA support. Malware usually uses regular streams to hide.

Herwig Bauernfeind

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 3
  • Posts: 37
    • View Profile
Re: Extended Attributes - OS/2 only thing?
« Reply #7 on: February 04, 2018, 08:05:58 am »
Not forget one thing: Most NAS boxes run Samba as their network server. Samba has to be configured to support EAs. This is done by adding

[global]
    ....
    ea support = Yes


to smb.conf