OK, hda looks like this:
# partition start end blocks type mount point
/dev/hda1 1 250 2008093+ 83 Linux /home
/dev/hda2 251 300 401625 82 Linux swap
/dev/hda3 301 500 1606500 83 Linux /
.-- hda4 (extended)
| /dev/hda6 501 1700 9638968+ 83 Linux /usr
| /dev/hda7 1701 1850 1204843+ 83 Linux /nfs
| /dev/hda8 1851 1900 401593+ 83 Linux /var/spool/news
| /dev/hda9 1901 2100 1606468+ 83 Linux /usr/src
| /dev/hda10 2101 4000 15261718+ 83 Linux /export
| /dev/hda11 4001 5500 12048718+ 83 Linux /dvd2b
| /dev/hda12 5501 7999 20073186 83 Linux /scratch
| /dev/hda5 8000 15017 56372085 83 Linux /mnt/old
'--
/dev/hda5 is a 53 GB partition, of which only using 28GB are used. I have a
second, identical hard drive onto which I make a block-for-block copy of
/dev/hda every night (it takes somewhat over an hour, and I have cron kick
it off when I'm asleep). I used to have it as hdc, but I had to rearrange
the case and now the IDE cable won't reach, so it's hdb. :-( It has saved
my bacon several times. Naturally, it won't protect me against fire, flood,
theft, lightning, etc.
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?
-- -eben ebQenW1@EtaRmpTabYayU.rIr.OcoPm home.tampabay.rr.com/hactarHanlon's Razor: "Never attribute to malice that which can be adequately explained by stupidity." Derived from Robert Heinlein
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:10:53 EDT