OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Storage => Topic started by: Doug Bissett on March 13, 2014, 09:01:31 pm

Title: Merge two JFS volumes
Post by: Doug Bissett on March 13, 2014, 09:01:31 pm
I am using the JFS that comes with eCS 2.1. I have two volumes: V: which is roughly 50 GB, and W: which is roughly 200 GB. Both are type 35 (not bootable). There is enough room on W: for everything that is on V:. I wish to move everything to W: (do I have to do that?), then merge V: with W: (which I think can be done), eliminating V:. V: is ahead of W:, physically.

Has anybody done it? How? Are there any tips?

Thanks...
Title: Re: Merge two JFS volumes
Post by: Pete on March 14, 2014, 12:27:04 am
Hi Doug

Why not xcopy everything off both V: and W: to a backup device eg large-ish USB drive, delete the V: and W: drives and then create 1 volume with whatever drive letter from the free space.


Regards

Pete
Title: Re: Merge two JFS volumes
Post by: Doug Bissett on March 14, 2014, 06:11:24 am
Hi Doug

Why not xcopy everything off both V: and W: to a backup device eg large-ish USB drive, delete the V: and W: drives and then create 1 volume with whatever drive letter from the free space.

Well. it is about 150 GB of data. I have it backed up to a USB drive already (except for a quick RSYNC to get the latest updates). I am just curious if anybody has actually merged two JFS drives, which was supposed to be one of the "greatest features" about JFS, when it first appeared.

If anybody has done it, I would like some tips. If not, I may give it a try (when I find the time). If it doesn't work, I can put the disk out of the USB drive into the machine (it is SATA), to cut down on the restore time. I suppose I had better test that too, before committing myself.   :)
Title: Re: Merge two JFS volumes
Post by: Greggory Shaw on March 14, 2014, 09:53:15 am

... Has anybody done it? How? Are there any tips?
....

Thanks...

I was just looking at this the other day and couldn't find anything either. Then, I saw a reference to WSEB.  I booted one up and sure enough the LVM program has the option => Expand !

Greggory

Title: Re: Merge two JFS volumes
Post by: Eugene Gorbunoff on March 14, 2014, 11:51:44 am
Don't Expand.

In this case it's impossible recover data from broken JFS volume.

Title: Re: Merge two JFS volumes
Post by: Andi B. on March 14, 2014, 12:29:53 pm
Depending if files with same names but different content are on each drive I would -
- simply copy with proper 4os2 options (update or not....)
- xcopy
- copy with LarsenCommander (asks for overwrite, read-only... files)

But I fear I don't fully understand what you're want to do as the answer is too simple.

If I ever need to 'expand' a volume I simply create another one big enough from a spare place on one of my disks, assign a temporary drive letter, copy over all, remove drive letter from old volume and assign it to the newly created one. Old volume can be delete then.
Title: Re: Merge two JFS volumes
Post by: Doug Bissett on March 14, 2014, 05:10:41 pm
Quote
I booted one up and sure enough the LVM program has the option => Expand !

Yes, that is where it is done. ECS has the same menu item.

Don't Expand.

In this case it's impossible recover data from broken JFS volume.

Two comments on that: 1) It is almost impossible to recover data from a normal volume, broken or not. That is what backups are for. 2) It has been a number of years since I saw a broken volume.

I will agree that merging them might cause new problems, but that is one of the reasons why I want to give it a try. There is also one line in CONFIG.SYS, that doesn't need to be there, if it is not going to work.

Quote
But I fear I don't fully understand what you're want to do as the answer is too simple.

I am in a position where I want to merge a couple of volumes, and the LVM Expand option would seem to be an obvious answer to how to do it. I have done the method where both volumes are deleted, then create a single volume in the freed area. In fact I have two machines, with pretty much the same requirement (all on one disk), with a third that has the two volumes on separate physical disks. The third one is an old test machine, so I may try that first. I should have enough room to put all of the data on the one volume, then expand it into the freed area where the other volume is now (after freeing it). I don't think I can just paste the two volumes, and their contents, together, but I may see if there is a way to do that. In the third case, it is not possible to simply delete the two volumes, and create one in the freed area.

Since it seems that nobody has actually done it, I will need to do a bit more research, and see what happens. Somebody may find the information useful.

Thanks for the comments...
Title: Re: Merge two JFS volumes
Post by: Andreas Schnellbacher on March 14, 2014, 05:52:47 pm
As Andi wrote: Simply copy the files over to the larger volume at first.

Use DFSee to delete the smaller volume and advance the larger volume's size.

Use LVM or DFSee to adjust the drive letter.

Andreas
Title: Re: Merge two JFS volumes
Post by: ivan on March 14, 2014, 07:59:27 pm
Doug, you might be lucky with your setup but we tried it a couple of years ago (using WSeB) and it DID NOT work.  In fact the tech that was trying it ended up wiping the machine and doing a full restore from the backup.  Since then we have kept clear of doing anything like that again.
Title: Re: Merge two JFS volumes
Post by: Boris on March 14, 2014, 10:59:42 pm
DFSee cannot neither merge, nor move, nor resize JFS volumes.

I had a positive experience with expanding JFS volumes.

You can even try it without moving data from one volume to another.
Title: Re: Merge two JFS volumes
Post by: Andreas Schnellbacher on March 15, 2014, 01:01:34 pm
DFSee cannot neither merge, nor move, nor resize JFS volumes.

That's bad news - I thought Jan has implemented that in a newer version. Thanks for the info.
Title: Re: Merge two JFS volumes
Post by: Boris on March 15, 2014, 05:35:06 pm
DFSee cannot neither merge, nor move, nor resize JFS volumes.

That's bad news - I thought Jan has implemented that in a newer version. Thanks for the info.

I agree to you -- that's a big limitation. I had to zip my whole OS/2 installation on my Thinkpad, transfer it by FTP on a local server, then use valerius' boot CD and DFSee, then recreate the JFS volume on a different offset and then unzip the whole OS/2 installation back on it.

Well, I indeed had to install Windoze first...
Title: Re: Merge two JFS volumes
Post by: Neil Waldhauer on March 15, 2014, 11:28:24 pm
I have also expanded a JFS drive in just the way that Doug has proposed. Other than having a good backup, I didn't do anything special. I deleted a volume that used to contain Windows XP, and added the space to an existing 300 GB JFS volume.
Title: Re: Merge two JFS volumes
Post by: Doug Bissett on March 16, 2014, 04:04:20 am
Well, I deleted the volume (V:) on my old test machine. It happened to be the whole physical disk. I then used LVM to extend W: (which is also a whole physical disk) into that space. I decided to reboot, before trying anything else. For some reason, that didn't go too well. I ended up having to force power off. At power on all was well, and my W: drive is that much bigger. Step 1 successful.

Then, I tried my Lenovo ThinkPad T510. That is all on one physical disk. I deleted the "extra" volume, and expanded the W: drive into the free space. Reboot went better this time, and it seems to have worked. Step 2 successful.

It will take a bit of preparation for the last one, so I will report later.
Title: Re: Merge two JFS volumes
Post by: Boris on March 16, 2014, 05:34:19 pm
Doug, I'm just interested what will happen if you remove the second hard disk drive, to where your JFS volume was expanded, from your old test machine?

I believe IBM did everything right, and the data that is stored physically on the second HDD will just disappear from the volume, but I've never tested that. As you say, this is an old test machine, so why not test this?
Title: Re: Merge two JFS volumes
Post by: Doug Bissett on March 16, 2014, 06:23:17 pm
Quote
It will take a bit of preparation for the last one, so I will report later.

Okay, I did the main machine. The expansion seems to have worked properly, but there is an anomaly that I need to sort out.

As you may know, I am using the QSINIT Ramdisk, which I reformat to JFS. The format works fine, but it needs to be LVM hidden, and add the drive letter again, after a couple of seconds, or long file name support does not work properly. After extending the W: drive, LVM is no longer doing the rename. I see:
Code: [Select]
[C:\DESKTOP]lvm /driveletter:[ Vol.00 ],R:
LVM0648:
 Reboot system before attempting additional LVM commands.

[C:\DESKTOP]help lvm0648

SYS0317: The system cannot find message  0648
in message file LVMH.MSG.

[C:\DESKTOP]
The drive disappears after the hide, but never reappears after the drive letter is added. It appears that the message file is also deficient. I am using the LVM that comes with eCS 2.1.

The odd thing is, that I don't have that problem on the T510, which is almost the same setup. The only difference is that the volume that I merged was only about 5 GB, while the one on the main machine was about 50 GB.

More investigating to do, later.

Doug, I'm just interested what will happen if you remove the second hard disk drive, to where your JFS volume was expanded, from your old test machine?

I believe IBM did everything right, and the data that is stored physically on the second HDD will just disappear from the volume, but I've never tested that. As you say, this is an old test machine, so why not test this?

Interesting idea. I was always under the impression that if one, or the other, physical drives died, that the whole thing would be lost. I think you are wrong, because it is likely that the directory structure will be on the first part, and the data on the second. It is also possible that part of a file will be on one disk, while the rest is on the second disk. At best, it would be an UGLY recovery. Proving again, that backups are a good idea.
Title: Re: Merge two JFS volumes
Post by: Doug Bissett on March 16, 2014, 07:14:09 pm
Quote
Doug, I'm just interested what will happen if you remove the second hard disk drive, to where your JFS volume was expanded, from your old test machine?

I did a quick test: Since it is difficult to get to the individual drives, I simply pulled the IDE cable from the motherboard, which took out the expansion disk, plus the CDROM drive. The expanded drive (W:) never showed up when booting. I turned the machine off, and plugged it back in, and now the machine is back to "normal". I am pretty sure that there was nothing on the expanded part, other than what LVM would have put there.
Title: Re: Merge two JFS volumes
Post by: Doug Bissett on March 16, 2014, 11:33:33 pm
Quote
More investigating to do, later.

It appears that LVM didn't finish the job of expanding the drive. It showed both volumes as being "Available". The expanded volume worked okay (but I doubt if anything ever got put into the expanded part). LVM also complained about a bad partition table, and refused to do anything with it.

Anyway, it was obvious that LVM wasn't going to fix it, so I used DFSEE to delete both volumes, and create a single volume, and repair the partition table. The system didn't like that (the drive never appeared), so I tried LVM again. This time, it was happy with the partition table, and I was able to remove the two volumes (that DFSEE said it already did), and create a new, single, volume in that area. The system still didn't like it, so I went back to DFSEE, and tried again. This time, DFSEE insisted that I needed to use the real LVM to create a new volume, using an existing partition. Okay, it took a couple of tries, but it finally took, and I was able to boot with an unformatted drive W:. A quick format fixed that problem. Now, I am doing the restore (I am posting this from the T510).

It seems that LVM Expand works sometimes, but not always, so it is a good idea to have a recovery plan (and a good backup), if you try it. I will rework the T510 to make a single volume. The old test machine will stay as it is.

Thanks for the tips, and comments..