On Wed, Jul 14, 2004 at 09:57:21AM +0100, Declan Grady wrote:
> How can I restructure this, without losing any data.
> i.e. I want to :
> 1. Shutdown box
> 2. insert new drive (probably as hdb, as I currently have one hda drive
> and one hdc cdrom.)
> 3. power up box
> 4. somehow partition extra drive, and move data form existing structure
> to new mountpoints
>> I dont know how to do this.... If i create a new /var/spool partition,
> how do I get at the data in the current /var/spool directory ?
Insert Disk
Boot in single user mode
(in lilo 'linux single' will probably do it. YMMV)
Partition the new drive
Format the new partition(s) (mkfs.<filesystem type>)
Mount the new partition on /mnt
copy data: cp -aR /var/spool/ /mnt
umount /mnt (optional)
umount /var/spool (also optional)
mount /dev/hdb1 /var/spool
init 3 #or whatever runlevel you normally use
You might want to use LVM. You can still access the original
/var/spool by mounting it somewhere else (e.g. /mnt)
Brian
--
Website: http://netsoc.tcd.ie/~bbrazil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20040714/e9ce3578/attachment.pgp
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!