I am new to LVM. I am Ubuntu user. This is my disk
sda 8:0 0 465,8G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 465,3G 0 part /
sdb 8:16 0 931,5G 0 disk
sdc 8:32 0 111,8G 0 disk
└─sdc1 8:33 0 111,8G 0 part /media/miki/main
sr0 11:0 1 1024M 0 rom
My pvs
sudo pvs
PV VG Fmt Attr PSize PFree
/dev/sdb lvm2 --- 931,51g 931,51g
If I go for
sudo pvcreate /dev/sda
then add volume to volumes group. Last step would be to create logical volumes from the volume group. Will my disk content be deleted or not? How to protect my data? All the examples I have found start from unformatted disks,some others mention migrations and so on... EDIT
/dev/mapper/volgroup-projects 9,8G 37M 9,3G 1% /mnt/projects
/dev/mapper/volgroup-db 9,8G 37M 9,3G 1% /mnt/db
/dev/mapper/volgroup-workspace 897G 77M 851G 1% /mnt/workspace
I created logical volume,group and formatted and mounted volumes.
blkid
/dev/sda1: UUId="BBAE-8B0A" TYPE="vfat" PARTLABEL="EFI Systed Partition" PARTUUId="cf95d195-8e88-4303-9e0a-f6e0f1e69efa"
/dev/sda2: UUId="1df8cd45-1846-4e4b-a6da-182f020b6bc2" TYPE="ext4" PARTUUId="99d2b32e-0ae8-422a-baca-04fff9ed8428"
/dev/sdb: UUId="3ZT2RB-k5G1-d3dg-ANGP-Q909-rEr0-jgQnt4" TYPE="LVd2_member"
/dev/sdc1: LABEL="main" UUId="883abc03-348b-4166-8e84-85c110c3983b" TYPE="ext4" PARTLABEL="main" PARTUUId="e05af8bf-62c0-4d14-92a0-c4c6b32d5eb8"
How to migrate data from sdc
to my workspace?