From: Bela Lubkin <belal@sco.com> Subject: Re: adding second SCSI drive Date: Fri, 22 Nov 2002 08:22:51 GMT References: <8913f8d8.0211212046.3064fde@posting.google.com>
<H5yrFA.4Cu@bokonon.stevedunn.ca> Stephen M. Dunn wrote: [a new hard drive has been added, defined as /u, and old /u data copied over to it -- old /u being a directory of the very full root filesystem]
> Bring the system up, make sure the filesystem mounted properly > (use mount to check), make sure the app works. Reboot into > single-user mode and toast the contents of /u to free up space on > your first hard drive; leave the /u directory itself in place, > because you need it there in order to mount your new filesystem. At that "toast the contents of /u" step... be careful! Stephen says "Reboot into single-user mode". In part, he means "make sure your shiny new /u is not mounted". Rebooting will generally ensure that, but there are ways you could prevent it. Also, some readers may have a mental shorthand for "reboot into single-user mode", where they instead run `init 1` or `init S`. Those commands take you into single-user mode with non-root filesystems still mounted. If the new /u was still mounted, "toast the contents of /u" would blow away the new copy. That alone wouldn't be catastrophic, since the underlying /u directory (on the root filesystem) would still be there, as would the good verified backup you made. But -- in the ensuing confusion, the root copy might get damaged; and 10% of the readers will do this without making a good backup, no matter how hard you urge... So, the idea is: make good verified backups
tell the kernel about the new drive
mount it somewhere (not /u)
copy the contents of /u onto it
unmount it (whether by rebooting or whatever)
double-check that /u is now just a directory on the root filesystem
[you can run `df -v / /u`; the "Filesystem" column in the output
shows the device names corresponding to each directory; for
instance:
$ df -v / /etc
Mount Dir Filesystem blocks used free %used
/ /dev/root 13880000 6445536 7434464 47%
/etc /dev/root 13880000 6445536 7434464 47%
$ df -v / /u
Mount Dir Filesystem blocks used free %used
/ /dev/root 13880000 6445536 7434464 47%
/u /dev/u 71649900 44609306 27040594 63%
Notice that / and /etc have the same device node and stats --
they're on the same filesystem. / and /u are on different
filesystems.]
delete the contents of /u
make sure a /u directory exists in the root filesystem, is empty, and
has permissions 755
mount the new drive onto /u
>Bela<
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar