Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jun 2008 13:15:24 +0000
From:      dhaneshk k <dhaneshkk@hotmail.com>
To:        <questions@freebsd.org>
Cc:        Manolis Kiagias <sonicy@otenet.gr>
Subject:   Adding a second disk to increase the space for /var on first dislk :  but  umount /var   failed
Message-ID:  <BAY127-W3356B28DE13A8800D34469B2B30@phx.gbl>
In-Reply-To: <484E32C9.5060709@otenet.gr>
References:  <20080609205426.N23640@awww.jeah.net> <9145C6E6-4C2F-4DA3-B953-4A91DC4C476B@goldmark.org> <BAY127-W43E749DD9C1EF75842072AB2B30@phx.gbl> <484E32C9.5060709@otenet.gr>

next in thread | previous in thread | raw e-mail | index | archive | help



I followed as per the  directions  up to this=20
=20
> Now, unmount /var and /mnt and mount your new var:
>=20
> umount   /var   /mnt
> mount -o rw /dev/da1s1e  /var
>=20
> Edit /etc/fstab and update it for the new disk:
>=20
>  /dev/da1s1e      /var       ufs      rw     2    2


I am able to   umount  /mnt                       but not   /var=20



[root@storm ~]# umount /var/
umount: unmount of /var failed: Device busy
[root@storm ~]# umount /mnt/
[root@storm ~]# umount /var/
umount: unmount of /var failed: Device busy
[root@storm ~]# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad7s1a    496M    329M    127M    72%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad7s1e    496M    5.4M    451M     1%    /tmp
/dev/ad7s1f     44G     38G    2.9G    93%    /usr
/dev/ad7s1d    1.4G    221M    1.1G    16%    /var
devfs          1.0K    1.0K      0B   100%    /var/named/dev
[root@storm ~]# umount /dev/ad7s1
ad7s1   ad7s1a  ad7s1b  ad7s1c  ad7s1d  ad7s1e  ad7s1f =20
[root@storm ~]# umount /dev/ad7s1d=20
umount: unmount of /var failed: Device busy
[root@storm ~]# umouny /var/=20
bash: umouny: command not found
[root@storm ~]# umouny /var=20
bash: umouny: command not found
[root@storm ~]# umount /var
umount: unmount of /var failed: Device busy
[root@storm ~]# pwd
/root
[root@storm ~]# umount /var
umount: unmount of /var failed: Device busy
[root@storm ~]#=20



getting an error   Error org.freedesktop.Hal.Device.PermissionDeniedByPolic=
y.

Details  hal-storage-fixed -mount    refused uid 0       How to fix this an=
d umount /var



=20

Any hints most welcome :=20


Thanks in advance=20

Dhanesh




> Date: Tue, 10 Jun 2008 10:52:41 +0300
> From: sonicy@otenet.gr
> To: dhaneshkk@hotmail.com
> CC: freebsd-questions@freebsd.org
> Subject: Re: Adding a second disk to increase the space for /var on first=
 dislk    :  4  questions
>=20
>=20
>=20
> dhaneshk k wrote:
> >
> >  people :      I am facing a  issue , in my FreeBSD server box   the   =
/var  (85 %  now)  directory is going to full , no space left in this  disk=
 anymore .
> >
> > But I have another disk in my box  which is of 140 GB fresh disk , this=
 I have to add so I gone through=20
> > the FreeBSD hand book of adding a new disk .
> >
> >
> >   According to docs  I  sliced and partitioned the second disk ,
> >
> >  one doubt  :  here I created  10GB  bsd partition  in the second disk =
 ,
> >
> > I have to assign o assign this  for /var (in my first  disk  /var is go=
ing to full)=20
> >
> >
> > Q1   )      so in /etc/fstab , the mount point what I have to specify  =
? =20
> >
> >  /var itself or  I need to create a directory  (mkdir   /myspace )=20
> >
> >  and add it as the mount point in /etc/fstab  ?    like this=20
> >
> >
> >     /dev/da1s1e    /myspace       ufs      rw      2     2
> >
> >
> > OR=20
> >
> >       /dev/da1s1e      /var       ufs      rw     2    2  =20
> >
> >
> >
> > which one is correct  ?
> >
> >
> >
> > and after this editing of  /etc/fstab   and restarting of the machine .
> >
> >
> > Q 2  )   my  serverbox  how it will continue to use the newly added spa=
ce ? for this I have to do any thing=20
> >
> >
> > some one told me that I have to copy all the contents of the /var  of f=
irst disk to this newly added  space=20
> >
> > is it right ?
> >
> > how to do that=20
> >
> >
> > Q3 )    dd    /dev/da0s1d   /dev/da1s1/e      right ?  (to copy the con=
tent from   /var (/dev/da0s1d)   of  the first disk  to   the newly added s=
pace   for var   on the second disk    (/dev/da1s1e )=20
> >
> >
> >
> > Q4 )  Is it needed to install all the applications which already instal=
led in the /var of the first disk to the  newly=20
> >
> > added space on the second disk?=20
> >
> >
> >
> >
> > please give your tips and advice to  achieve   what I am trying to do. =
 Many of you may have done this=20
> >
> > before please help with your comments=20
> >
> >
> >
> >
> > Thanks in advance for all of you=20
> > Dhanesh
> >
> >
> >
> > _________________________________________________________________
> > No Harvard, No Oxford. We are here. Find out !!
> > http://ss1.richmedia.in/recurl.asp?pid=3D500___________________________=
____________________
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd=
.org"
> >
> >
> >
> >  =20
>=20
> You will have to do something like the following:
>=20
> - Mount the new partition to a temporary mount point (like /mnt) i.e.:
>=20
> mount /dev/da1s1e   /mnt
>=20
> - Copy all the contents from /var to /mnt. Since /var is in use in a=20
> running system, the results maybe less than optimal. I suggest you=20
> switch to single user mode for doing this:
>=20
> shutdown now
>=20
> Use something like the following to transfer the files and permissions:
>=20
> tar cfC - /var . | tar xpfC - /mnt
>=20
> (thank you M.W. Lucas!)
>=20
> Now, unmount /var and /mnt and mount your new var:
>=20
> umount   /var   /mnt
> mount -o rw /dev/da1s1e  /var
>=20
> Edit /etc/fstab and update it for the new disk:
>=20
>  /dev/da1s1e      /var       ufs      rw     2    2
>=20
> either exit to multi user mode or reboot. Of course, check that the=20
> files were actually copied to their right places first!
>=20
>=20
>=20
>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"

_________________________________________________________________
2000 Placements last year. Are You next ? Find out
http://ss1.richmedia.in/recurl.asp?pid=3D499=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY127-W3356B28DE13A8800D34469B2B30>