[Nottingham] Mount and Filesystem
NLUG
nlug at domainarena.net
Tue Sep 25 18:49:31 BST 2007
Graeme Fowler wrote:
> On Tue, 2007-09-25 at 18:25 +0100, NLUG wrote:
>> I have a couple of questions for you.
>> Let's say you have a 30GB partition /var on disk 1 (/dev/sda1).
>> We also have a 100GB disk 2 which is one big /dev/sdb1 partition.
>> The 30GB /var is nearly full...if i mount /dev/sdb1 to /var, what happens?
>
> /var will appear to be empty, and your machine will die a horrid death.
This is what i feared :-) ...
>
> More accurately, you'll probably get an error stating that the mount
> point is in use, but still.
>
... and this is what i expected!
>> Do i get a 130GB partition?
>
> No.
>
>> if an application keeps adding stuff to /var, where is the data written
>> to ? does it fill up /dev/sda1 first and then carries on to /dev/sdb1?
>> Or more simply, can you not mount a partition onto an already mounted
>> partition ?
>
> You can mount one *over* a partition, providing nothing is holding open
> any files on that partition first.
>
> What you need to do to move /var to a bigger disk, probably in
> single-user mode, is:
>
Can i ask: why in single user mode ?
> 1. mkdir /mnt/newvar
> 2. mount /dev/sdb1 /mnt/newvar
> 3. rsync -Pav /var/ /mnt/newvar/
>
> [ that bit might take some fiddling to get the new path right, otherwise
> you'll end up with /mnt/newvar/var - which is *not* what you want ]
>
> 4. umount /mnt/newvar
> 5. umount /var
> 6. mount /dev/sdb1 /var
>
> And then edit /etc/fstab to ensure that /var is mounted from /dev/sdb1
> rather than /dev/sda1
>
> 7. to ensure all is well, reboot.
>
> You'll then have a 30GB disk to with as you want.
>
Thanks for the instructions. Might get usefull soon.
> If you want to get clever, you need to start using Logical Volumes. This
> is a not inconsiderable departure from "normal" partition and disk
> management, in that you can span volumes across disks...
>
Never considered that. Sounds interesting though...i'll have a browse on
google ;-).
> Graeme
>
>
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham
>
>
More information about the Nottingham
mailing list