My hard drive currently has (I believe) 2 partition; boot (sda1) and everything else (sda2?). Some of the hard drive is also being used as swap memory, but I don't really understand how that effects things. The server is physical and I have a LiveCD.
How do I add a new partition (1 MB, ext3) to the hard drive, and make sda2 smaller to accommodate the new partition?
Any additional comments on how lvm, /dev/mapper, and dm-0 and dm-1 apply would be appreciated, but not required.
Thank you
[root@desktop ~]# mount
/dev/mapper/vg_desktop-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@desktop ~]# fdisk -l /dev/sda
Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00056f9a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 182402 1464625152 8e Linux LVM
[root@desktop ~]# lvdisplay
--- Logical volume ---
LV Path /dev/vg_desktop/lv_root
LV Name lv_root
VG Name vg_desktop
LV UUID DhBjdq-0UJR-dJjx-bgH6-adGJ-TL43-8DrZR7
LV Write Access read/write
LV Creation host, time desktop.xxx.com, 2013-07-01 04:10:19 -0700
LV Status available
# open 1
LV Size 1.36 TiB
Current LE 356082
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 253:0
--- Logical volume ---
LV Path /dev/vg_desktop/lv_swap
LV Name lv_swap
VG Name vg_desktop
LV UUID mNpyae-UtdA-MzJR-bbEc-D9OA-VPn8-ECMpbq
LV Write Access read/write
LV Creation host, time desktop.xxx.com, 2013-07-01 04:13:25 -0700
LV Status available
# open 1
LV Size 5.83 GiB
Current LE 1492
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 1024
Block device 253:1
[root@desktop mapper]# ls -l /dev/mapper
total 0
crw-rw----. 1 root root 10, 58 Jul 4 00:37 control
lrwxrwxrwx. 1 root root 7 Jul 4 00:37 vg_desktop-lv_root -> ../dm-0
lrwxrwxrwx. 1 root root 7 Jul 4 00:37 vg_desktop-lv_swap -> ../dm-1
[root@desktop mapper]#