[ale] backing up /var -POSTGRES & LABEL
Michael B. Trausch
fd0man at gmail.com
Thu Feb 22 11:16:38 EST 2007
On Thu, 2007-02-22 at 08:21 -0500, Paul Cartwright wrote:
> ok,
> I was successful in adding a new drive & moving /var to it! /var went
> from 96% full, to %3 full. I had 2 issues that I still would like some
> info on ( for future use & reference:)
>
> 1. Even in single user mode ( init 1) /var would not unmount, said it
> was busy ( postgres active??) I didn't know what to do. so I could not
> rename it, to move it to the new drive. Question, how would I know
> why /var was busy, and how would I stop postgres?
As everyone else has said, lsof is your best shot when it comes to
discovering what is open.
As far as stopping PostgreSQL, there are two ways that you can kill the
server: Using kill, or using its init script. I prefer using the init
script, so in my case it would be "/etc/init.d/postgresql-8.1 stop" to
kill the server (this is on a Debian server; some systems prefer using
the S??postgres and K??postgres symlink structure, so you would have to
adjust accordingly).
> 2. in /etc/fstab /var was a LABEL... LABEL=/var /var......
>
> I commented it out and added the new drive as : /dev/sdb1 /var...
Labels and UUIDs are becoming more and more common as identifiers used
in /etc/fstab. There are some advantages to this layout, though you
have to do a little more work when it comes to finding out what
drive/partition the filesystem is actually on. The good thing is that
you can have the system use FS labels or (even better) UUIDs to mount
filesystems, which guards them against you adding and removing devices,
and even in some cases, massive kernel upgrades.
For example, if you upgrade to a kernel that searches for disks in a
slightly different order (or searches for them in a different order as a
result of how it is compiled), then the UUIDs or labels in /etc/fstab
can help to keep things mounted where you expect them to be. The best
way to deal with that, though, would be to have a script at system
startup create a file (say, /etc/disk-maps), which maps labels and UUIDs
to partition names. That way, you could still have a reference as to
what is what.
-- Mike
--
Michael B. Trausch
fd0man at gmail.com
Phone: (404) 592-5746
Jabber IM:
fd0man at gmail.com
fd0man at livejournal.com
Demand Freedom! Use open and free protocols, standards, and software!
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the Ale
mailing list