Apparently no swap configured
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 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 Also 'ls' confirms that logical volume exists: [root@mail ~]# ls -l /dev/VolGroup00/swap lrwxrwxrwx 1 root root 27 Sep 30 11:30 /dev/VolGroup00/swap -> /dev/mapper/VolGroup00-swap 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 |
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: mkswap /dev/VolGroup00/swap swapon /dev/VolGroup00/swap 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 |
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 Well it doesn't show up when I do 'df': [root@mail ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 4.8G 446M 4.1G 10% / /dev/mapper/VolGroup00-LogVol02 1.9G 316M 1.5G 18% /var /dev/mapper/VolGroup00-LogVol03 9.5G 2.3G 6.7G 26% /usr /dev/sda1 99M 32M 63M 34% /boot tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/mapper/VolGroup00-LogVol04 9.9G 172M 9.2G 2% /home /dev/mapper/VolGroup00-LogVol05 1.9G 35M 1.8G 2% /tmp 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 |
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 UUID : 9dcfc53d:d1f69e6b:d91b109f:9e659e4c Events : 0.4 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 |
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 |
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 |
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 |
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 |
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 |
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 |
| All times are GMT. The time now is 02:35 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.