On 06/09/2011 10:31 AM, Polytropon wrote:
On Thu, 09 Jun 2011 10:21:27 +0200, Frank Bonnet<[email protected]> wrote:
Hello
I have a raid 5 array ( HP hardware managed ) that contains the
following partitions
-- Filesystem Size Used Avail Capacity Mounted on
/dev/aacd0s1a 1.9G 306M 1.5G 17% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/aacd0s1g 10G 7.2M 9.3G 0% /tmp
/dev/aacd0s1e 609G 559G 1.5G 100% /mnt
/dev/aacd0s1d 97G 12G 77G 14% /usr
/dev/aacd0s1f 610G 5.3G 556G 1% /var
What I would like to do is
1 - delete the /mnt partition
2 - extend the /var partition with the free space left by /mnt
Is it faisable without destroying the /var data ?
Shpuld be possible in few steps.
1. Unmount /var and dump its content, e. g.
# umount /var
# dump -0a -f /usr/var.dump /dev/aacd0s1f
If you can't unmount /var, see "man dump" for the -L option.
2. Delete the /dev/aacd0s1e and /dev/aacd0s1f partition, e. g.
using sysinsall.
3. Create a new partition /dev/aacd0s1e with the size of the
former /dev/aacd0s1e + /dev/aacd0s1f, e. g. using sysinstall
or bsdlabel.
4. Initialize the new partition /dev/aacd0s1e, e. g.
# newfs -U /dev/aacd0s1e
Use further tunefs commands if required.
5. Mount it and restore from dump.
# mount /dev/aacd0s1e /var
# cd /var
# restore -r -f /usr/var.dump
Finally you can remove /usr/var.dump. And make a change to
/etc/fstab for the new setting.
The whole work is best done in single user mode so there
won't be requests for writing things to /var.
Thanks a lot !
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"