Author Topic: How to move data to the beginning of the JFS partition  (Read 1116 times)

Mathias

  • Full Member
  • ***
  • Thank You
  • -Given: 25
  • -Receive: 6
  • Posts: 104
  • using ArcaOS
    • View Profile
    • IRC
How to move data to the beginning of the JFS partition
« on: January 21, 2019, 03:20:35 pm »
With the current smartmontools available for ArcaOS, I found out my hard drive is dying slowly:
sectors moved: 35
sectors pending: 15

Even though there are quite a few reserve sectors left, I find it's time to move to another HDD, as the current device is untrusted now and keeps getting worse slowly. (Yesterday there were only 8 pending sectors!)

So, I've tried to move over to another HDD. Current HDD is 1 TB, but only 4 GB in use.
Source drive capacity is 1 TB, destination drive capacity is 320 GB. (The only free HDD found which is still fine and as new)

In theory this CAN work, since the ammount of data to copy is only 4 GB, destination drive capacity is 320 GB.
Now I've tried to shrink the ArcaOS partition on the source disk (JFS formatted), but this can only free up 13 MB, as it appears that there is data near the end of the partition.

So now the question is on: How to move all the stuff away from the end of the JFS partition? Ideally everything to the beginning and then ongoing?

Thank you in advance!! : ))

Mathias

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 21
  • Posts: 434
    • View Profile
Re: How to move data to the beginning of the JFS partition
« Reply #1 on: January 21, 2019, 03:27:44 pm »
No clue how you tried to shrink the JFS Partition but why don't you simply copy over all files? Maybe booted from ArcaOS stick while both disks are attached.. Or rar the files and unrar on the target afterwards?

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 149
  • Posts: 2116
    • View Profile
Re: How to move data to the beginning of the JFS partition
« Reply #2 on: January 21, 2019, 04:18:32 pm »
Andi's right. Install the second hard drive, doesn't even have to be screwed into your computer, just plugged in. Boot to the ArcaOS maintenance. Partition and format and give a drive letter then use xcopy.
xcopy x:\* y: /h /o /t /s /e /r /v

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 35
  • Posts: 1000
    • View Profile
Re: How to move data to the beginning of the JFS partition
« Reply #3 on: January 21, 2019, 04:19:15 pm »
Simple answer.
Method 1. Just zip it up (Archive Tool), replace the disk, reinstall ArcaOS (use a 2GB boot partition) and then unzip your stored data to the second partition on the new disk

Method 2.  Pull old disk and replace with new one, Install ArcsOS (in a 2GB boot* partition - remaining disk space can be one or more partitions**).  Obtain a SATA/USB adapter with external power supply*** - assuming the old disk is a SATA disk, attach the disk to the adapter and plug in to a USB port.  Copy over all the data you want - when finished keep old disk as a backup.

*    A separate boot partition means you can reinstall the os without losing your data.
**   Partitions for programs and home make updating easy.
***  Example of USB/SATA adapters available on Amazon (maybe other places as well)
     1)  Atolla USB 3.0 to SATA External Hard Drive Docking Station for 2.5 Inch and 3.5 Inch HDD SSD with USB Data and Charging ports with 12V/2A Power Adapter Support UASP and Drives 4TB - Black
     2) Inateck USB 3.0 to SATA Converter Adapter for 2.5 3.5 inch Hard Drive Disk HDD and SSD, 12V/2A Power Adapter Included UA1001

I use both of them without problems, the first one with a 3TB disk (jfs format) for backups, the second when I need to try and recover data from friends computers before reinstalling windows (shudder).


I would also recommend method 2 because it potentially causes least wear on the failing disk.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 21
  • Posts: 434
    • View Profile
Re: How to move data to the beginning of the JFS partition
« Reply #4 on: January 21, 2019, 04:27:56 pm »
Or copy the data to a JFS formated USB stick. I've an additional JFS partition on my ArcaOS boot stick which would be fine for that.

Mathias

  • Full Member
  • ***
  • Thank You
  • -Given: 25
  • -Receive: 6
  • Posts: 104
  • using ArcaOS
    • View Profile
    • IRC
Re: How to move data to the beginning of the JFS partition
« Reply #5 on: January 22, 2019, 02:23:14 pm »
Woah, THAT easy!! : )) I'll give this a shot later on today. - BIG thanks to you guys! : ))

I've tried to resize the partition with qparted, as it also supports jfs.
Thing is though, my ArcaOS USB stick appears to behave weirdly.. it's rather new, but when I try to boot from the stick, it shows the ArcaOS logo for half an hour, before it continues sloooooowly. - Regardless if I set it up or boot the default values for the ArcaOS stick. - Going to make a new ArcaOS stick as well for this, this evening.

Mathias

  • Full Member
  • ***
  • Thank You
  • -Given: 25
  • -Receive: 6
  • Posts: 104
  • using ArcaOS
    • View Profile
    • IRC
Re: How to move data to the beginning of the JFS partition
« Reply #6 on: January 26, 2019, 04:37:43 pm »
Turned out not to be that easy as it sounded...

Situation has worsened: As soon as the new HDD is attached to any controller, ArcaOS shows the ArcaOS logo at boot, remains there for 20 minutes... regardless if booted from this very HDD, or another HDD or a maintenance stick.
In case of the install/maintenace stick, after the logo goes away, every step tages atleast 10 minutes until the graphics build up, windows shop up, etcetc takes forever to complete... until I am able to do a thing with it.

As soon as I remove the faulty HDD it's as "fast" as usual.

So.. I took out the faulty HDD, installed a new fresh ArcaOS on the new drive.. but now ... how to copy the data over, when I cannot use the maintenance boot thing of ArcaOS? - I could of course boot into Linux via stick, which has no problems with the faulty drive, and simply copy over the data... but won't that result in weird rights for all the files? Or might that work out?
If so, I'll do that... the maintenance thing does not work for me.

ivan

  • Hero Member
  • *****
  • Thank You
  • -Given: 2
  • -Receive: 35
  • Posts: 1000
    • View Profile
Re: How to move data to the beginning of the JFS partition
« Reply #7 on: January 26, 2019, 05:06:31 pm »
As I said use a SATA/USB adapter.  It is much safer and you wouldn't have had the problems you did.  Yes I know it dies cost some money but after using the things at work it was a no brain choice for when I retired.

Mathias

  • Full Member
  • ***
  • Thank You
  • -Given: 25
  • -Receive: 6
  • Posts: 104
  • using ArcaOS
    • View Profile
    • IRC
Re: How to move data to the beginning of the JFS partition
« Reply #8 on: January 26, 2019, 05:30:42 pm »
*g* Ivan, thanks for the quick reply! I've got such an USB adapter, indeed. But I followed method #1.

Trying #2 now.

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 11
  • -Receive: 149
  • Posts: 2116
    • View Profile
Re: How to move data to the beginning of the JFS partition
« Reply #9 on: January 26, 2019, 06:39:00 pm »
While Ivan's advice to use a USB/SATA adapter is good. If you had to you could copy the files under Linux, OS/2 ignores the Linux permissions.
You'd have to do your partitioning under OS/2, including using LVM to give the new drive's (stick's) partition(s) drive letters. Then using a Linux distribution that comes with JFS support (most Debian based ones I believe. Mint and Ubuntu for sure), mount both partitions as root using sudo and the right cp command (need to look it up), copy the files over, either to the new disk or a large stick
Or use DFSee to make an image of the bad disks partitions and write/copy them to a stick/new drive.

Mathias

  • Full Member
  • ***
  • Thank You
  • -Given: 25
  • -Receive: 6
  • Posts: 104
  • using ArcaOS
    • View Profile
    • IRC
Re: How to move data to the beginning of the JFS partition
« Reply #10 on: February 17, 2019, 09:17:42 pm »
Hrhr solved! Works like a charm again. : ))
Learned a lot whilst saving the machine!

Thanks to you all!! - Saaaaafe : D