[ale] Realigning a partition with data

Charles Shapiro hooterpincher at gmail.com
Mon Apr 24 11:02:52 EDT 2017


Atlanta Vintage Computer Festival is this weekend. ( https://atlhcs.org/ ).

-- CHS


On Sun, Apr 23, 2017 at 4:45 PM, Alex Carver <agcarver+ale at acarver.net>
wrote:

> In this case the old drive was MSDOS partition with 512b blocks so it's
> not 4k aligned.  The file system itself is ext2.  When I imaged the old
> drive with ddrescue, I pulled the entire drive in so I'd have the boot
> sector and the primary partition (there was only two partitions on the
> original drive and one was swap).  I killed off the swap partition then
> stretched out the main partition a bit to accommodate the contents of a
> second drive that was installed (single partition as well).  I was more
> concerned about the block erasing during TRIM in the SSD with unaligned
> sectors.
>
> It's mainly used as the network syslog server to record all the logs
> from various network devices (cameras, phones, etc.), some data logging
> from remote sensors (database), plus I do some internal web applications
> with it.  Not really heavy usage.
>
> I've got plenty of old machines floating around with 5.25 floppies or
> other storage media.  :)  In rough order of age of all my functional
> machines:
>
> Timex Sinclair (tape drive from a TRS-80 is floating around though the
> TRS-80 is no longer here)
> [Used to have a NorthStar branded CP/M machine with hard-sector 5.25
> floppies and integrated green screen -- I taught myself dBase III on it
> and cataloged all my electronic parts with it.  It's long gone but it
> was functional]
> Emerson branded 80286 (this became a modem server though it needs fixing
> up)
> NeXT slab
> 2x Sun IPXes with external enclosures (one of them is my network GPS clock)
> Unbranded (from parts) 386DX with 387 coproc
> Packard Bell branded 486SX (now with a 486DX2/66 chip)
> Unbranded Pentium II 266 (for experiments)
> 4x Sun Enterprise 220Rs with dual UltraSPARC II processors (lots of
> experiments)
> 1x Sun SparcStation 20 (RAID server using 2 Sun A1000 arrays)
> Unbranded AMD K6 (the topic of conversation)
> Toshiba Satellite 1900 series laptop
> Averatec laptop
> Unbranded Pentium 4 (previous desktop)
> 3x Raspberry Pi B+
> Unbranded Core i7-3770 Ivy Bridge (current desktop)
>
> On 2017-04-23 13:10, DJ-Pfulio wrote:
> > I don't think alignment matters on SSDs. They are so fast.
> >
> > I've done this with gparted, but always made a full partition backup
> > using fsarchiver first.  Didn't need the backup, but ... I'm pretty
> > experienced with the tools.
> >
> > Also, the underlying file system matters.  XFS/btrfs seem to have the
> > most issues.  EXT3/4 seem to be well supported for things like this.
> IMHO.
> >
> > gparted and parted have always handled alignment issues. I heard that
> > fdisk started sometime after they added GPT support (whenever that was).
> > I've never used gdisks after seeing all the problems people had with it.
> >  Heard that fdisk is safe on GPT again, for the latest distros.
> >
> > I have a K2/200 around here somewhere. Keep it for the 5.25in floppy.
> > Never know when that will be needed again.  That machine also has an
> > Adaptec 2940u SCSI card. ;)
> >
> > On 04/23/2017 02:56 PM, Alex Carver wrote:
> >> True, I just wondered if there was a way given that parted/resize2fs
> >> both worked pretty well with data on a partition (I ddrescue'd the old
> >> drive to the SSD then grew the partition).
> >>
> >> However, after running a couple I/O tests on the drive I'm not going to
> >> bother with the realignment.  I'm getting read speeds of about 160
> >> MB/sec and write speeds of 116 MB/sec.  Given the age of the machine
> >> that's pretty good (AMD K6 with a PCI SATA card and SATA SSD to replace
> >> the on-board IDE and old Maxtor drives)
> >>
> >> On 2017-04-23 05:04, Jim Kinney wrote:
> >>> I would not consider realignment safe with data on the sectors that
> are soon to
> >>> be outside the partition.
> >>>
> >>> On Apr 23, 2017 2:00 AM, "Alex Carver" <agcarver+ale at acarver.net
> >>> <mailto:agcarver%2Bale at acarver.net>> wrote:
> >>>
> >>>     Just swapped out a spinning drive for an SSD but I probably need to
> >>>     realign the partitions.  Currently everything is in one partition
> at the
> >>>     start of the disk but it's on sector 63.  I can pop the disk out
> and
> >>>     plug it into another machine to do this but I'd like to slide the
> >>>     partition over to the right spot (assuming this doesn't affect the
> boot
> >>>     process).  I haven't found a way to do this as nearly every page I
> find
> >>>     talks about having parted align new partitions but not those that
> have data.
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://mail.ale.org/mailman/listinfo/ale
> > See JOBS, ANNOUNCE and SCHOOLS lists at
> > http://mail.ale.org/mailman/listinfo
> >
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20170424/fef763e5/attachment.html>


More information about the Ale mailing list