Re: Adding more disk-space
Viggo <viggovap@mail.worldonline.dk> writes:
> Why does Linux only report 515 Mb, when the drive is supposedly 540 Mb?
> (linux using 524/32/63, drive physically 1048/16/63)
All hard drive manufacturers artificially and incorrectly define
1 Mb = 1,000,000 bytes
524*32*63*512 bytes/sector = 540,868,608 bytes , which is 514.984
real Mb.
> Wanting to move /usr to the new hd, how would I go about it?
> I suppose I have to format(initialize?) and mount the drive, and then
> copy /usr with everything "beneath" it to the new hd? (Which is
> basically what I would have done back in the DOS-days...)
Make a file system on the new drive (Format) using mke2fs or
mkfs.ext2 (they are the same file). `mke2fs /dev/hdd1'
Then mount /dev/hdd1 temporarily on /mnt (or any other mount
point), and cp -ax /usr /mnt/. Then mount /dev/hdd1 on /usr. Put a
line in /etc/fstab mounting /dev/hdd1 on /usr. After using it enough
to make sure evrything works OK, `umount /dev/hdd1' and `rm -fr
/usr/'. (That last command commits you unequivocally, so make sure
everything is OK first. Until then your old /usr is OK - mounting
another file system on a directory hides that directory's contents,
but doesn't destroy them.) You will then have to `mkdir /usr' to get
a mount point for /dev/hdd1. All of the commands I have suggested
require root privileges.
You will probably get a number of replies suggesting commands
using find and tar instead of cp. It is a kind of religious matter.
I don't feel strongly about it one way or the other. I have always
had good results using cp -ax, and I can remember it, while the
alternates are harder to remember. Whatever method you use, make sure
you use options that preserve permissions and ownership.
Bob
--
_
|_) _ |_ Robert D. Hilliard <hilliard@flinet.com>
|_) (_) |_) Palm City, FL USA PGP Key ID: A8E40EB9
Reply to: