I'm in a slightly unusual situation and I'd really appreciate some advice.
I installed CentOS 5.2 on a server about a month ago.
Today I happened to check the 'free' command and noticed that the Swap
line reads as follows:
Swap: 0 0 0
I'm pretty certain that when I installed the OS and created a custom
partition table, that I defined a swap partition, but there is no swap
line in
/etc/fstab either.
However the output of 'lvm> lvdisplay' contains the following information
(amongst others):
--- Logical volume ---
LV Name /dev/VolGroup00/swap
VG Name VolGroup00
LV UUID 7uOBcj-tN16-uAbO-3nyy-3scZ-SAEA-7HKWPW
LV Write Access read/write
LV Status available
# open 0
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5
I'd like to know:
1. How can I check how this logical volume is formatted (and if it is
formatted)?
2. Is it possible to use this logical volume? If I add a line to
/etc/fstab, what are the chances of rendering my system unbootable?
The server is in use and presently doesn't have any memory problems, and
while it's not mission critical server I'd rather not mess it up with
any ill-thought out tinkering.
If anyone can give me some advice on this I'd be very grateful.
Thanks
Ian Masters
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 03:46 AM
"nate"
Apparently no swap configured
Ian Masters wrote:
> Hello,
>
> I'm in a slightly unusual situation and I'd really appreciate some advice.
>
> I installed CentOS 5.2 on a server about a month ago.
>
> Today I happened to check the 'free' command and noticed that the Swap
> line reads as follows:
>
> Swap: 0 0 0
>
> I'm pretty certain that when I installed the OS and created a custom
> partition table, that I defined a swap partition, but there is no swap
> line in
> /etc/fstab either.
>
> However the output of 'lvm> lvdisplay' contains the following information
> (amongst others):
>
> --- Logical volume ---
> LV Name /dev/VolGroup00/swap
If that volume is not in use by anything else you should
be perfectly able to do:
then add something like this to fstab:
/dev/VolGroup00 swap swap defaults 0 0
nate
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 05:34 AM
Ian Masters
Apparently no swap configured
Nate
Thanks very much for the reply.
> If that volume is not in use by anything else you should
> be perfectly able to do:
>
> mkswap /dev/VolGroup00/swap
> swapon /dev/VolGroup00/swap
>
> then add something like this to fstab:
> /dev/VolGroup00 swap swap defaults 0 0
Also, as I said /dev/VolGroup00/swap is not listed in /etc/fstab, but it
is listed in /dev/mapper/. Is that good enough confirmation that it is
not in use?
I'm very curious how I managed to get into this situation, using the GUI
install method. Any ideas on that? I'd prefer not to be in this
situation again.
Thanks
Ian Masters
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 05:41 AM
John R Pierce
Apparently no swap configured
Ian Masters wrote:
> Also, as I said /dev/VolGroup00/swap is not listed in /etc/fstab, but it
> is listed in /dev/mapper/. Is that good enough confirmation that it is
> not in use?
>
what does
# swapon -s
show?
for example, one of my systems shows...
# swapon -s
Filename Type Size Used Priority
/dev/md0 partition 2096376 294864 -1
and in turn, md0 is...
# mdadm -D /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Wed Jun 25 12:44:15 2008
Raid Level : raid1
Array Size : 2096384 (2047.59 MiB 2146.70 MB)
Used Dev Size : 2096384 (2047.59 MiB 2146.70 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Mon Oct 27 23:29:04 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 05:55 AM
Ian Masters
Apparently no swap configured
John R Pierce wrote:
> what does
>
> # swapon -s
>
> show?
According to 'man swapon', swapon -s means:
Display swap usage summary by device. Equivalent to "cat
/proc/swaps". Not available before Linux 2.1.25.
> for example, one of my systems shows...
>
> # swapon -s
> Filename Type Size Used Priority
> /dev/md0 partition 2096376 294864 -1
which show your swap partition, whereas on my problem system, 'swapon
-s' produces no output at all.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 06:14 AM
Christopher Chan
Apparently no swap configured
> which show your swap partition, whereas on my problem system, 'swapon
> -s' produces no output at all.
>
Maybe you configured the swap lv but forgot to tell the installer to use
it as swap.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 06:21 AM
John R Pierce
Apparently no swap configured
Ian Masters wrote:
which show your swap partition, whereas on my problem system, 'swapon
-s' produces no output at all.
ok, that confirms your supposition, you have no swap configured.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 06:26 AM
Ian Masters
Apparently no swap configured
Christopher Chan wrote:
> Maybe you configured the swap lv but forgot to tell the installer to use
> it as swap.
Well that's entirely possible. The logical volume manager had me fairly
confused.
I would have thought the installer might have told me that I had not set
its file system type ...
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 06:36 AM
Christopher Chan
Apparently no swap configured
Ian Masters wrote:
> Christopher Chan wrote:
>> Maybe you configured the swap lv but forgot to tell the installer to use
>> it as swap.
>
> Well that's entirely possible. The logical volume manager had me fairly
> confused.
>
> I would have thought the installer might have told me that I had not set
> its file system type ...
>
Well...it won't do that...but it should raise a flag on no swap being
configured after you were done partitioning and assigning/setting
filesystems.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
10-28-2008, 06:42 AM
Ian Masters
Apparently no swap configured
Christopher Chan wrote:
> Well...it won't do that...but it should raise a flag on no swap being
> configured after you were done partitioning and assigning/setting
> filesystems.
As far as I can remember there was no such 'flag'. That's precisely the
kind of thing that would have made me jittery at the install stage.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos