On Sat, 31 Mar 2012 10:46:10 -0400 (EDT), Stephen Powell wrote:
>
> Note that, in theory, fdasd could be used, rather than parted, to
> create, delete, then re-create the partition at a larger size,
> provided that fdasd doesn't write anything to the partition when
> it deletes it.  I don't know enough about fdasd to know if that is
> the case.  The old MSDOS fdisk program was known to write out a
> few blocks of binary zeros to the beginning of a partition when
> it deleted it.  This, of course, destroys the usability of the data
> in the partition.  I know that parted does not do this.

Oops!  I was wrong.  The old MSDOS fdisk program did not write out
a few blocks of binary zeros to the beginning of a partition when
it deleted it.  It did so when it allocated a new partition, to make
it appear unformatted, even if that space was formerly occupied by
another partition.  But the result is the same.  If you delete a
partition and then re-create it at the same location, at the same
size or with a different size, you lose access to the data which
was formerly stored there.  My main point remains intact.  It is
important to use a partitioning tool which does not write
ANYTHING to the partition, either when deleting it or when creating
it.  I do not know enough about fdasd to know if it meets those
qualifications.  I do that that parted does meet those qualifications.

By the way, I tend to use CMS RESERVED minidisks, rather than
CDL-formatted minidisks; so that I can use the DIAG driver.
Therefore, I don't have the option of resizing a partition in place.
I have always used "cp" to copy the data between partitions,
and I have never had any problems with symbolic links.
Assume that the old extent is /dev/dasde1 and the new extent
is /dev/dasdh1.  I use a procedure something like this to copy
the data:

   mount -r /dev/dasde1 /media
   mount /dev/dasdh1 /mnt
   cp -a /media/. /mnt
   umount /mnt
   umount /media

I do this from another Linux virtual machine, of course, with
the target machine down and logged off.  Symbolic links
come through as symbolic links, not as files.  Of course, there
are "gotchas" that you need to watch out for.  If the new extent
has a different UUID, you will need to adjust some files, such
as /etc/fstab, etc.  And the boot partition requires special
processing (i.e. run zipl in a chroot environment).  But the
point is that I've never had any trouble with symbolic links.

--
  .''`.     Stephen Powell
 : :'  :
 `. `'`
   `-

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to