ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Adding a PV Second Disk to CentOS 7 on a Scale HC3 with LVM and XFS

    Scheduled Pinned Locked Moved IT Discussion
    linuxcentoscentos 7rhelrhel 7scalescale hc3lvmxfslinux serverkvmvirtio
    12 Posts 3 Posters 3.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      If you wish to use the parted command, you can learn more about Parted on Tecmint for interactive usages.

      scottalanmillerS 1 Reply Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller @scottalanmiller
        last edited by

        Some additional resultant LVM info for those that may be interested:

        pvs
          PV         VG                    Fmt  Attr PSize   PFree 
          /dev/vda2  centos_lab-lnx-centos lvm2 a--   14.41g 40.00m
          /dev/vdb   vol_data1             lvm2 a--  186.26g     0 
        
         vgs
          VG                    #PV #LV #SN Attr   VSize   VFree 
          centos_lab-lnx-centos   1   2   0 wz--n-  14.41g 40.00m
          vol_data1               1   1   0 wz--n- 186.26g     0 
        
        lvs
          LV       VG                    Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
          root     centos_lab-lnx-centos -wi-ao----  12.88g                                                    
          swap     centos_lab-lnx-centos -wi-ao----   1.49g                                                    
          lv_data1 vol_data1             -wi-ao---- 186.26g
        
        1 Reply Last reply Reply Quote 1
        • scottalanmillerS
          scottalanmiller
          last edited by

          Here is what df looks like...

          df -h
          Filesystem                                Size  Used Avail Use% Mounted on
          /dev/mapper/centos_lab--lnx--centos-root   13G  1.6G   12G  12% /
          devtmpfs                                  2.0G     0  2.0G   0% /dev
          tmpfs                                     2.0G     0  2.0G   0% /dev/shm
          tmpfs                                     2.0G  8.4M  2.0G   1% /run
          tmpfs                                     2.0G     0  2.0G   0% /sys/fs/cgroup
          /dev/vda1                                 497M  184M  313M  38% /boot
          tmpfs                                     396M     0  396M   0% /run/user/0
          tmpfs                                     396M     0  396M   0% /run/user/1101
          /dev/mapper/vol_data1-lv_data1            187G   33M  187G   1% /data
          
          1 Reply Last reply Reply Quote 1
          • StrongBadS
            StrongBad
            last edited by

            Not really all that specific to XFS, switching to ext4 or something else would be easy.

            1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller
              last edited by

              Yes, just need to alter the mkfs command and the settings in /etc/fstab.

              1 Reply Last reply Reply Quote 0
              • StrongBadS
                StrongBad
                last edited by

                Is there a good reason to be using the raw device rather than making partitions on it like you normally would with parted?

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • antonitA
                  antonit
                  last edited by

                  Very nice.

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @antonit
                    last edited by

                    @antonit said:

                    Very nice.

                    Thanks

                    1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller @StrongBad
                      last edited by

                      @StrongBad said:

                      Is there a good reason to be using the raw device rather than making partitions on it like you normally would with parted?

                      It makes things more flexible in case you decide to change the size of the underlying block device. LVM will grow more easily and can do the partioning that you need on top using new LVs instead of needing to create hard partitions.

                      1 Reply Last reply Reply Quote 1
                      • scottalanmillerS
                        scottalanmiller
                        last edited by

                        I just used this myself to make a new block device in a single line. Awesome 🙂

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post