LVM + add another new disk in order to extend current sdb disk size

Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
we have linux OS with OS - sda and another disk for data
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg55-lvm_root 41932800 19731580 22201220 48% /
devtmpfs 16372376 0 16372376 0% /dev
tmpfs 16387592 108 16387484 1% /dev/shm
tmpfs 16387592 1741416 14646176 11% /run
tmpfs 16387592 0 16387592 0% /sys/fs/cgroup
/dev/mapper/vg55-lvm_var 105756672 54652856 51103816 52% /var
/dev/sdb 72117368 72100984 0 100% /data
/dev/sda1 508588 160024 348564 32% /boot
PV VG Fmt Attr PSize PFree
/dev/sda2 vg55 lvm2 a-- 149.51g 92.00m
#
the problem is that /data is full , and we want to add another new disk from the VMcenter in order to extend the sdb disk to 200G
please advice how to perfrom the steps
centos rhel lvm vmware disk
add a comment |Â
up vote
0
down vote
favorite
we have linux OS with OS - sda and another disk for data
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg55-lvm_root 41932800 19731580 22201220 48% /
devtmpfs 16372376 0 16372376 0% /dev
tmpfs 16387592 108 16387484 1% /dev/shm
tmpfs 16387592 1741416 14646176 11% /run
tmpfs 16387592 0 16387592 0% /sys/fs/cgroup
/dev/mapper/vg55-lvm_var 105756672 54652856 51103816 52% /var
/dev/sdb 72117368 72100984 0 100% /data
/dev/sda1 508588 160024 348564 32% /boot
PV VG Fmt Attr PSize PFree
/dev/sda2 vg55 lvm2 a-- 149.51g 92.00m
#
the problem is that /data is full , and we want to add another new disk from the VMcenter in order to extend the sdb disk to 200G
please advice how to perfrom the steps
centos rhel lvm vmware disk
Well, you can't extend the size of sdb by adding another disk because that other disk would become sdX. But if sdb is really a virtual disk, you can increase its size with your virtualization tools and then within the OS extend the partition and filesystem, adding the additional space to /data. I'm not sure how this is related to LVM given that /data is not an LVM logical volume, but rather a disk. Clarification would be appreciated.
â Emmanuel Rosa
Jul 30 at 10:01
what are the LVM commands for increase sdb ?
â yael
Jul 30 at 10:03
Yael, sdb is not an LVM logical volume, so the LVM commands do not apply. If sdb is actually a virtual disk (I can't tell from your post) you can increase its size with VMware. See pubs.vmware.com/fusion-5/â¦
â Emmanuel Rosa
Jul 30 at 10:07
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
we have linux OS with OS - sda and another disk for data
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg55-lvm_root 41932800 19731580 22201220 48% /
devtmpfs 16372376 0 16372376 0% /dev
tmpfs 16387592 108 16387484 1% /dev/shm
tmpfs 16387592 1741416 14646176 11% /run
tmpfs 16387592 0 16387592 0% /sys/fs/cgroup
/dev/mapper/vg55-lvm_var 105756672 54652856 51103816 52% /var
/dev/sdb 72117368 72100984 0 100% /data
/dev/sda1 508588 160024 348564 32% /boot
PV VG Fmt Attr PSize PFree
/dev/sda2 vg55 lvm2 a-- 149.51g 92.00m
#
the problem is that /data is full , and we want to add another new disk from the VMcenter in order to extend the sdb disk to 200G
please advice how to perfrom the steps
centos rhel lvm vmware disk
we have linux OS with OS - sda and another disk for data
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg55-lvm_root 41932800 19731580 22201220 48% /
devtmpfs 16372376 0 16372376 0% /dev
tmpfs 16387592 108 16387484 1% /dev/shm
tmpfs 16387592 1741416 14646176 11% /run
tmpfs 16387592 0 16387592 0% /sys/fs/cgroup
/dev/mapper/vg55-lvm_var 105756672 54652856 51103816 52% /var
/dev/sdb 72117368 72100984 0 100% /data
/dev/sda1 508588 160024 348564 32% /boot
PV VG Fmt Attr PSize PFree
/dev/sda2 vg55 lvm2 a-- 149.51g 92.00m
#
the problem is that /data is full , and we want to add another new disk from the VMcenter in order to extend the sdb disk to 200G
please advice how to perfrom the steps
centos rhel lvm vmware disk
asked Jul 30 at 8:54
yael
1,794940
1,794940
Well, you can't extend the size of sdb by adding another disk because that other disk would become sdX. But if sdb is really a virtual disk, you can increase its size with your virtualization tools and then within the OS extend the partition and filesystem, adding the additional space to /data. I'm not sure how this is related to LVM given that /data is not an LVM logical volume, but rather a disk. Clarification would be appreciated.
â Emmanuel Rosa
Jul 30 at 10:01
what are the LVM commands for increase sdb ?
â yael
Jul 30 at 10:03
Yael, sdb is not an LVM logical volume, so the LVM commands do not apply. If sdb is actually a virtual disk (I can't tell from your post) you can increase its size with VMware. See pubs.vmware.com/fusion-5/â¦
â Emmanuel Rosa
Jul 30 at 10:07
add a comment |Â
Well, you can't extend the size of sdb by adding another disk because that other disk would become sdX. But if sdb is really a virtual disk, you can increase its size with your virtualization tools and then within the OS extend the partition and filesystem, adding the additional space to /data. I'm not sure how this is related to LVM given that /data is not an LVM logical volume, but rather a disk. Clarification would be appreciated.
â Emmanuel Rosa
Jul 30 at 10:01
what are the LVM commands for increase sdb ?
â yael
Jul 30 at 10:03
Yael, sdb is not an LVM logical volume, so the LVM commands do not apply. If sdb is actually a virtual disk (I can't tell from your post) you can increase its size with VMware. See pubs.vmware.com/fusion-5/â¦
â Emmanuel Rosa
Jul 30 at 10:07
Well, you can't extend the size of sdb by adding another disk because that other disk would become sdX. But if sdb is really a virtual disk, you can increase its size with your virtualization tools and then within the OS extend the partition and filesystem, adding the additional space to /data. I'm not sure how this is related to LVM given that /data is not an LVM logical volume, but rather a disk. Clarification would be appreciated.
â Emmanuel Rosa
Jul 30 at 10:01
Well, you can't extend the size of sdb by adding another disk because that other disk would become sdX. But if sdb is really a virtual disk, you can increase its size with your virtualization tools and then within the OS extend the partition and filesystem, adding the additional space to /data. I'm not sure how this is related to LVM given that /data is not an LVM logical volume, but rather a disk. Clarification would be appreciated.
â Emmanuel Rosa
Jul 30 at 10:01
what are the LVM commands for increase sdb ?
â yael
Jul 30 at 10:03
what are the LVM commands for increase sdb ?
â yael
Jul 30 at 10:03
Yael, sdb is not an LVM logical volume, so the LVM commands do not apply. If sdb is actually a virtual disk (I can't tell from your post) you can increase its size with VMware. See pubs.vmware.com/fusion-5/â¦
â Emmanuel Rosa
Jul 30 at 10:07
Yael, sdb is not an LVM logical volume, so the LVM commands do not apply. If sdb is actually a virtual disk (I can't tell from your post) you can increase its size with VMware. See pubs.vmware.com/fusion-5/â¦
â Emmanuel Rosa
Jul 30 at 10:07
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
It seems that /data is not managed with LVM so you might add space so /dev/sdb via vCenter and then grow the file system in CentOs
xfs_growfs /dev/sdb
LVM
If you want to have LVM for /data, that will be a bit longer.
Add the disk to VMware, make it show in CentOS :
List host bus numbers :
ls /sys/class/scsi_host/
For each host bus, scan the bus (where [hostX] is the name you get from the previous command):
echo "- - -" > /sys/class/scsi_host/[hostX]/scan
Check the names of your SCSI devices
ls /sys/class/scsi_device/
Rescan the SCSI buses (name are in form X:X:X:X)
echo 1 > /sys/class/scsi_device/X:X:X:X/device/rescan
Then you can fdisk -l to see your disk
First, you need to create a new Physical Volume with the new disk.
I assume that the disk will be sdc.
pvcreate /dev/sdc
Then you can create a new VG or use the existing one :
I assume you'll use the existing one :
vgextend vg55 /dev/sdc
You need to create a Logical Volume to use now
lvcreate -L200G -n lvm_data vg55
You now need to create a filesystem on this volume
mkfs.xfs /dev/mapper/vg55-lvm_data
You now have a 200GB disk that can be mounted. You might mount lvm_data somewhere, copy /data to the new volume, unmount /data and the lvm_data, and mount /dev/mapper/vg55-lvm_data /data.
To add /dev/sdb to the LVM (if needed).
Once you have your date moved elsewhere :
pvcreate /dev/sdb
Confirm you want to wipe the filesystem on /dev/sdb with y
Add /dev/sdb to the existing VG
vgextend vg55 /dev/sdb
Then you can allocate that space to the lv you want with
lvextend -L68G /dev/vg55/data
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It seems that /data is not managed with LVM so you might add space so /dev/sdb via vCenter and then grow the file system in CentOs
xfs_growfs /dev/sdb
LVM
If you want to have LVM for /data, that will be a bit longer.
Add the disk to VMware, make it show in CentOS :
List host bus numbers :
ls /sys/class/scsi_host/
For each host bus, scan the bus (where [hostX] is the name you get from the previous command):
echo "- - -" > /sys/class/scsi_host/[hostX]/scan
Check the names of your SCSI devices
ls /sys/class/scsi_device/
Rescan the SCSI buses (name are in form X:X:X:X)
echo 1 > /sys/class/scsi_device/X:X:X:X/device/rescan
Then you can fdisk -l to see your disk
First, you need to create a new Physical Volume with the new disk.
I assume that the disk will be sdc.
pvcreate /dev/sdc
Then you can create a new VG or use the existing one :
I assume you'll use the existing one :
vgextend vg55 /dev/sdc
You need to create a Logical Volume to use now
lvcreate -L200G -n lvm_data vg55
You now need to create a filesystem on this volume
mkfs.xfs /dev/mapper/vg55-lvm_data
You now have a 200GB disk that can be mounted. You might mount lvm_data somewhere, copy /data to the new volume, unmount /data and the lvm_data, and mount /dev/mapper/vg55-lvm_data /data.
To add /dev/sdb to the LVM (if needed).
Once you have your date moved elsewhere :
pvcreate /dev/sdb
Confirm you want to wipe the filesystem on /dev/sdb with y
Add /dev/sdb to the existing VG
vgextend vg55 /dev/sdb
Then you can allocate that space to the lv you want with
lvextend -L68G /dev/vg55/data
add a comment |Â
up vote
1
down vote
accepted
It seems that /data is not managed with LVM so you might add space so /dev/sdb via vCenter and then grow the file system in CentOs
xfs_growfs /dev/sdb
LVM
If you want to have LVM for /data, that will be a bit longer.
Add the disk to VMware, make it show in CentOS :
List host bus numbers :
ls /sys/class/scsi_host/
For each host bus, scan the bus (where [hostX] is the name you get from the previous command):
echo "- - -" > /sys/class/scsi_host/[hostX]/scan
Check the names of your SCSI devices
ls /sys/class/scsi_device/
Rescan the SCSI buses (name are in form X:X:X:X)
echo 1 > /sys/class/scsi_device/X:X:X:X/device/rescan
Then you can fdisk -l to see your disk
First, you need to create a new Physical Volume with the new disk.
I assume that the disk will be sdc.
pvcreate /dev/sdc
Then you can create a new VG or use the existing one :
I assume you'll use the existing one :
vgextend vg55 /dev/sdc
You need to create a Logical Volume to use now
lvcreate -L200G -n lvm_data vg55
You now need to create a filesystem on this volume
mkfs.xfs /dev/mapper/vg55-lvm_data
You now have a 200GB disk that can be mounted. You might mount lvm_data somewhere, copy /data to the new volume, unmount /data and the lvm_data, and mount /dev/mapper/vg55-lvm_data /data.
To add /dev/sdb to the LVM (if needed).
Once you have your date moved elsewhere :
pvcreate /dev/sdb
Confirm you want to wipe the filesystem on /dev/sdb with y
Add /dev/sdb to the existing VG
vgextend vg55 /dev/sdb
Then you can allocate that space to the lv you want with
lvextend -L68G /dev/vg55/data
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It seems that /data is not managed with LVM so you might add space so /dev/sdb via vCenter and then grow the file system in CentOs
xfs_growfs /dev/sdb
LVM
If you want to have LVM for /data, that will be a bit longer.
Add the disk to VMware, make it show in CentOS :
List host bus numbers :
ls /sys/class/scsi_host/
For each host bus, scan the bus (where [hostX] is the name you get from the previous command):
echo "- - -" > /sys/class/scsi_host/[hostX]/scan
Check the names of your SCSI devices
ls /sys/class/scsi_device/
Rescan the SCSI buses (name are in form X:X:X:X)
echo 1 > /sys/class/scsi_device/X:X:X:X/device/rescan
Then you can fdisk -l to see your disk
First, you need to create a new Physical Volume with the new disk.
I assume that the disk will be sdc.
pvcreate /dev/sdc
Then you can create a new VG or use the existing one :
I assume you'll use the existing one :
vgextend vg55 /dev/sdc
You need to create a Logical Volume to use now
lvcreate -L200G -n lvm_data vg55
You now need to create a filesystem on this volume
mkfs.xfs /dev/mapper/vg55-lvm_data
You now have a 200GB disk that can be mounted. You might mount lvm_data somewhere, copy /data to the new volume, unmount /data and the lvm_data, and mount /dev/mapper/vg55-lvm_data /data.
To add /dev/sdb to the LVM (if needed).
Once you have your date moved elsewhere :
pvcreate /dev/sdb
Confirm you want to wipe the filesystem on /dev/sdb with y
Add /dev/sdb to the existing VG
vgextend vg55 /dev/sdb
Then you can allocate that space to the lv you want with
lvextend -L68G /dev/vg55/data
It seems that /data is not managed with LVM so you might add space so /dev/sdb via vCenter and then grow the file system in CentOs
xfs_growfs /dev/sdb
LVM
If you want to have LVM for /data, that will be a bit longer.
Add the disk to VMware, make it show in CentOS :
List host bus numbers :
ls /sys/class/scsi_host/
For each host bus, scan the bus (where [hostX] is the name you get from the previous command):
echo "- - -" > /sys/class/scsi_host/[hostX]/scan
Check the names of your SCSI devices
ls /sys/class/scsi_device/
Rescan the SCSI buses (name are in form X:X:X:X)
echo 1 > /sys/class/scsi_device/X:X:X:X/device/rescan
Then you can fdisk -l to see your disk
First, you need to create a new Physical Volume with the new disk.
I assume that the disk will be sdc.
pvcreate /dev/sdc
Then you can create a new VG or use the existing one :
I assume you'll use the existing one :
vgextend vg55 /dev/sdc
You need to create a Logical Volume to use now
lvcreate -L200G -n lvm_data vg55
You now need to create a filesystem on this volume
mkfs.xfs /dev/mapper/vg55-lvm_data
You now have a 200GB disk that can be mounted. You might mount lvm_data somewhere, copy /data to the new volume, unmount /data and the lvm_data, and mount /dev/mapper/vg55-lvm_data /data.
To add /dev/sdb to the LVM (if needed).
Once you have your date moved elsewhere :
pvcreate /dev/sdb
Confirm you want to wipe the filesystem on /dev/sdb with y
Add /dev/sdb to the existing VG
vgextend vg55 /dev/sdb
Then you can allocate that space to the lv you want with
lvextend -L68G /dev/vg55/data
edited Jul 30 at 17:31
answered Jul 30 at 10:26
Romain
367
367
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459289%2flvm-add-another-new-disk-in-order-to-extend-current-sdb-disk-size%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Well, you can't extend the size of sdb by adding another disk because that other disk would become sdX. But if sdb is really a virtual disk, you can increase its size with your virtualization tools and then within the OS extend the partition and filesystem, adding the additional space to /data. I'm not sure how this is related to LVM given that /data is not an LVM logical volume, but rather a disk. Clarification would be appreciated.
â Emmanuel Rosa
Jul 30 at 10:01
what are the LVM commands for increase sdb ?
â yael
Jul 30 at 10:03
Yael, sdb is not an LVM logical volume, so the LVM commands do not apply. If sdb is actually a virtual disk (I can't tell from your post) you can increase its size with VMware. See pubs.vmware.com/fusion-5/â¦
â Emmanuel Rosa
Jul 30 at 10:07