Re: [CentOS] mkswap, lvm and bootbits sectors
Le mer. 14 mars 2012 18:14:31 CET, Peter Kjellström a écrit: On Wednesday 14 March 2012 11.50.37 Philippe Naudin wrote: Thanks all for your answers. Actually, my problem concern lvm, not mkswap. No, afaict there's nothing wrong with your lvm. The only problem I see is that mkswap prints our an incorrect or at least pointless warning. I can confirm that mkswap on an lv on one of my test machines also says warning: don't erase bootbits It also says this when running against a file full of zeroes... Regarding fdisks complaints about doesn't contain a valid partition table..., this is normal (and may be considered a bug in the -l option, it could have excluded lvm-devices from its list...). If you want to get to the bottom of this I suspect the easiest way is to look at the mkswap source code (under which circumstances it prints that message). Ahh, perfect, thanks a lot. These bugs^W features of fdisk and mkswap were absent of CentOS-5 : I was lost, wondering what can be my mistakes. Thanks again, -- Philippe Naudin ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] mkswap, lvm and bootbits sectors
On Tuesday 13 March 2012 13.20.01 m.r...@5-cent.us wrote: Peter Kjellström wrote: On Tuesday 13 March 2012 13.41.53 Philippe Naudin wrote: Hello, I am confused by a warning from mkswap : When making a swap on a LVM volume, I see the following warning : mkswap: /dev/vg_SDB1/swap_test6_64: warning: don't erase bootbits ... snip Are you making swap from a logical partition, or a swapfile? If the former, perhaps recreating the partition might help. Don't confuse the poor guy. 1) yes he's doing mkswap on an lv which was obvious had you read the post 2) an lv does not have a partition table so your statement about recreating it makes no sense. /Peter signature.asc Description: This is a digitally signed message part. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] mkswap, lvm and bootbits sectors
Le mer. 14 mars 2012 09:08:46 CET, Peter Kjellström a écrit: On Tuesday 13 March 2012 13.20.01 m.r...@5-cent.us wrote: Peter Kjellström wrote: On Tuesday 13 March 2012 13.41.53 Philippe Naudin wrote: Hello, I am confused by a warning from mkswap : When making a swap on a LVM volume, I see the following warning : mkswap: /dev/vg_SDB1/swap_test6_64: warning: don't erase bootbits ... snip Are you making swap from a logical partition, or a swapfile? If the former, perhaps recreating the partition might help. Don't confuse the poor guy. 1) yes he's doing mkswap on an lv which was obvious had you read the post 2) an lv does not have a partition table so your statement about recreating it makes no sense. Thanks all for your answers. Actually, my problem concern lvm, not mkswap. I don't know yet if I have completely messed with vgcreate/lvcreate or if what I get is due to some difference between CentOS-5 and CentOS-6, but all my logical volumes seem to appear as distinct disks. On a CentOS-6 machine : $ lvcreate -L 10M --name try_lvcreate --zero=y VolGroup Rounding up size to full physical extent 12.00 MiB Logical volume try_lvcreate created $ fdisk -l snip the normal partitions table for /dev/sda Disk /dev/mapper/VolGroup-try_lvcreate: 12 MB, 12582912 bytes 255 heads, 63 sectors/track, 1 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x Disk /dev/mapper/VolGroup-try_lvcreate doesn't contain a valid partition table $ mkswap /dev/mapper/VolGroup-try_lvcreate mkswap: /dev/mapper/VolGroup-try_lvcreate: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 12284 KiB no label, UUID=be229ca5-bcb9-4116-87fc-8878abb44742 The same commands on a CentOS-5 machine give me a completely different output. Can you guess where I have messed, or is this behavior correct on CentOS-6 ? Thanks, -- Philippe Naudin ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] mkswap, lvm and bootbits sectors
On Wednesday 14 March 2012 11.50.37 Philippe Naudin wrote: Thanks all for your answers. Actually, my problem concern lvm, not mkswap. No, afaict there's nothing wrong with your lvm. The only problem I see is that mkswap prints our an incorrect or at least pointless warning. I can confirm that mkswap on an lv on one of my test machines also says warning: don't erase bootbits It also says this when running against a file full of zeroes... Regarding fdisks complaints about doesn't contain a valid partition table..., this is normal (and may be considered a bug in the -l option, it could have excluded lvm-devices from its list...). If you want to get to the bottom of this I suspect the easiest way is to look at the mkswap source code (under which circumstances it prints that message). /Peter signature.asc Description: This is a digitally signed message part. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] mkswap, lvm and bootbits sectors
On Tuesday 13 March 2012 13.41.53 Philippe Naudin wrote: Hello, I am confused by a warning from mkswap : When making a swap on a LVM volume, I see the following warning : mkswap: /dev/vg_SDB1/swap_test6_64: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 1048572 KiB Is it safe to use mkswap -f in this case ? I'd say it's safe but why do it? What likely happened is that the lv you ran mkswap on contained a valid partition table (or at least boot signature). Out of paranoia mkswap left the first block alone. So what you could gain is maybe another 512 byte in swapspace by adding -f. You could write a meg of zeroes to the device first and see if the mkswap warning goes away. /Peter (If that matters, the swap is intended for a virtual machine, and the host where I am using mkswap is a CentOS-6 server.) Thanks, signature.asc Description: This is a digitally signed message part. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] mkswap, lvm and bootbits sectors
Peter Kjellström wrote: On Tuesday 13 March 2012 13.41.53 Philippe Naudin wrote: Hello, I am confused by a warning from mkswap : When making a swap on a LVM volume, I see the following warning : mkswap: /dev/vg_SDB1/swap_test6_64: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 1048572 KiB Is it safe to use mkswap -f in this case ? I'd say it's safe but why do it? What likely happened is that the lv you ran mkswap on contained a valid partition table (or at least boot signature). Out of paranoia mkswap left the first block alone. So what you could gain is maybe another 512 byte in swapspace by adding -f. snip Are you making swap from a logical partition, or a swapfile? If the former, perhaps recreating the partition might help. mark ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos