Re: [SLUG] repartitioning

From: Eben King (eben1@tampabay.rr.com)
Date: Sat Aug 13 2005 - 19:24:14 EDT


On Sat, 13 Aug 2005, Kwan Lowe wrote:

> > What I plan to do is replace /dev/hda5 with a smaller partition, and use the
> > newly-freed space to hold /export/media/mp3 (5.3GB). /export currently has
> > about 900MB free space; moving the MP3s to their own partition will increase
> > /export's free space to over 6 gigs.
> >
> > My plan of attack is this:
> >
> > *DISABLE NIGHTLY BACKUP*
> > delete hda5 (renumbers hda6-hda12 to hda5-hda11)
> > create new partition hda12 cylinders 8000-12000 for /mnt/old (>= 30G)
> > create new partition hda13 cylinders 12001-15017 for /export/music/mp3
> > write & exit
> > modify /etc/fstab, /etc/auto.misc & decr any partition # > 5 (hda5 -> hda12
> > but comment it out)
> > reboot into runlevel 1
> > mkfs -t reiserfs /dev/hda12
> > mkfs -t reiserfs /dev/hda13
> > uncomment hda5 in /etc/fstab
> > add hda13 (/export/music/mp3) to /etc/auto.misc
> > copy /dev/hdb5 (/mnt/temp) -> /dev/hda12 (/mnt/old)
> > copy /export/media/mp3 -> /dev/hda13 (/mnt/temp)
> > rm -r /export/media/mp3
> > mkdir /export/media/mp3
> > reboot
> > *RE-ENABLE BACKUP*
> > enjoy!
> >
> > Is there a tool that'll resize a partition without changing its numbering?
> > That would make things simpler. If not, have I missed any steps?
>
> A couple things that might be problematic:
>
> Check if your bootloader is using disklabels rather than hard partitions
> for the filesystems.

I tried. As I back up hda -> hdb nightly, they are bit-for-bit identical,
and the OS balks at having two partitions with the same label. It would be
easier if it worked. :-(

> Re-writing a partition map where you have modified partition sizes can zap
> everything on the disk. (!!!)

What do you mean? Simply adding or deleting a partition? I've done that
many times.

> BTW, have you considered using LVM instead? It's very easy to configure
> and helps avoid this problem in the future. I put up some notes at
> http://www.digitalhermit.com/linux/lvm .

Thanks.

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
              
           This message was created using recycled electrons.

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:01:09 EDT