|
I've got a couple of CentOS VMs with 10GB ext4 root partitions and I'd like to make those partitions larger. The catch is that they're using LVM and I'm not familiar with LVM at all. Am I really supposed to make a new partition at the end of the disk and assign it to the LVM disk?
|
# ? Jan 19, 2017 01:41 |
|
|
# ? Apr 24, 2024 14:46 |
|
anthonypants posted:I've got a couple of CentOS VMs with 10GB ext4 root partitions and I'd like to make those partitions larger. The catch is that they're using LVM and I'm not familiar with LVM at all. Am I really supposed to make a new partition at the end of the disk and assign it to the LVM disk? You could do that, but you can also expand the partition itself. http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html Pretty sure extending it is the preferred way to do it.
|
# ? Jan 19, 2017 01:43 |
|
You can also get memory stats via SNMP if all you want is like free/used/swap. Cacti can poll that out of the box and doesn't need to log in to your servers and run poo poo.
|
# ? Jan 19, 2017 02:00 |
|
RFC2324 posted:You could do that, but you can also expand the partition itself. Yeah, Extending the underlying PV rather than creating a new partition, pvcreate etc etc is the preferred option however you have to resize the underlying partition first which is hairy and involves (I think! no warranty...) 1: Recommended: Dump the partition layout with sfdisk -d <device name> and saving for future reference if you cock it up 2: List partitions in fdisk 3: Delete Partition, recreate with the same start sector, end sector being the default value (end of disk) 4: Change type to 8e 5: Reboot, then do pvresize, lvextend If you just add more partitions (and your disk is using MBR instead of GPT) you'll hit a limit of 5 (I think) partitions. It's a bit scary at first, once you've done it 100 times without loving up you stress less.
|
# ? Jan 19, 2017 02:03 |
|
RFC2324 posted:You could do that, but you can also expand the partition itself. 1) Use fdisk to delete and recreate the /dev/sda# partition, assuming /dev/sd# is at the end of the disk, and ensuring that the new partition starts on the same cylinder as the original partition 2) Use pvresize to extend the LVM physical volume 3) Use lvextend to extend the LVM logical volume 4) Use resize2fs to extend the filesystem theperminator posted:Yeah, Extending the underlying PV rather than creating a new partition, pvcreate etc etc is the preferred option however you have to resize the underlying partition first which is hairy and involves (I think! no warranty...)
|
# ? Jan 19, 2017 02:03 |
|
I've only done it with XFS, so can't help with the ext4, but I'm p sure ext4 extends ok. This rather lacking guide might help, but I do feel like you should probably do backups before trying any of this. http://www.systutorials.com/5621/extending-a-mounted-ext4-file-system-on-lvm-in-linux/
|
# ? Jan 19, 2017 03:31 |
|
RFC2324 posted:I've only done it with XFS, so can't help with the ext4, but I'm p sure ext4 extends ok.
|
# ? Jan 19, 2017 03:44 |
|
I can't 100% swear that lvm + ext4 works, but I have done plenty of raw ext4 extensions with no issues.
|
# ? Jan 19, 2017 03:46 |
|
Docjowles posted:I can't 100% swear that lvm + ext4 works, but I have done plenty of raw ext4 extensions with no issues.
|
# ? Jan 19, 2017 03:48 |
|
Docjowles posted:I can't 100% swear that lvm + ext4 works, but I have done plenty of raw ext4 extensions with no issues. I've done it, it worked just fine for me.
|
# ? Jan 19, 2017 07:26 |
|
Is there any reason you can't just make a backup, boot into gparted, click your way through it, and call it a day?
|
# ? Jan 19, 2017 20:09 |
|
thebigcow posted:Is there any reason you can't just make a backup, boot into gparted, click your way through it, and call it a day?
|
# ? Jan 19, 2017 20:13 |
|
nevermind
|
# ? Jan 19, 2017 20:19 |
|
anthonypants posted:For starters it's a public-facing SFTP server and I'm absolutely not going to put X on it Great news, Gparted is available as a live cd! Any way you do this shouldn't involve a bunch of voodoo with fdisk. Check the publication date on any howto's that call for it.
|
# ? Jan 19, 2017 20:23 |
|
Isn't gparted just a frontend for parted? Learn the cli version.
|
# ? Jan 19, 2017 20:34 |
|
xzzy posted:Isn't gparted just a frontend for parted?
|
# ? Jan 19, 2017 20:36 |
|
I've been typing fdisk for so many years now it's the first thing I try too. But it just don't cut the mustard anymore given how large disks have grown.
|
# ? Jan 19, 2017 20:38 |
|
xzzy posted:Isn't gparted just a frontend for parted? I've never gotten filesystem resizes to work with the command line version, so there's some sort of special sauce the X11 version has that plain parted lacks. xzzy posted:I've been typing fdisk for so many years now it's the first thing I try too. But it just don't cut the mustard anymore given how large disks have grown. fdisk has supported GPT and large disks for years. I use it for all my partitioning. code:
|
# ? Jan 19, 2017 20:48 |
|
Well so it does.. at least in actually modern distributions. We're still stuck on RHEL6 and the fdisk it provides flips out on gpt disks. Maybe someday when we're allowed to move to RHEL7 I'll get to try it!
|
# ? Jan 19, 2017 20:51 |
|
I was under the impression fdisk didn't support GPT disks and gdisk was a port or fork or whatever of fdisk that did support GPT
|
# ? Jan 19, 2017 21:00 |
|
anthonypants posted:I was under the impression fdisk didn't support GPT disks and gdisk was a port or fork or whatever of fdisk that did support GPT That was the case in 2008(?) or something, but util-linux fdisk and GNU fdisk have both supported GPT since 2012-ish, IIRC.
|
# ? Jan 19, 2017 21:09 |
|
thebigcow posted:Great news, Gparted is available as a live cd! Well unless you install x or waste time booting a production system from a CD, yeah it does need voodo. Parted won't resize LVM partitions either, so I would be surprised if gparted did.
|
# ? Jan 19, 2017 21:21 |
|
I'm locked out of MariaDB on a Synology NAS I administrate (I didn't set it up, for the record). I don't know the root password. MariaDB was installed for OwnCloud which no one uses, but the guy who set it up doesn't remember the db root password. I tried to follow these steps to reset the password but I getcode:
I tried to uninstall MariaDB and reinstall it but Synology doesn't let me without uninstalling OwnCloud first. I tried to uninstall OwnCloud but I get prompted for the MariaDB password and can't continue without it. It's a catch-22. Help?
|
# ? Jan 19, 2017 21:32 |
|
SurgicalOntologist posted:I'm locked out of MariaDB on a Synology NAS I administrate (I didn't set it up, for the record). I don't know the root password. MariaDB was installed for OwnCloud which no one uses, but the guy who set it up doesn't remember the db root password. I tried to follow these steps to reset the password but I get
|
# ? Jan 19, 2017 21:38 |
|
Duh, OK, I can get a password prompt with -p 3306. But I'm still getting a password prompt, which I thought shouldn't happen with --skip-grant-tables. Only one mysqld process running and its mysqld_safe --skip-grant-tables --skip-networking.
|
# ? Jan 19, 2017 21:44 |
|
thebigcow posted:Any way you do this shouldn't involve a bunch of voodoo with fdisk. TIL I'm a witch doctor
|
# ? Jan 19, 2017 21:54 |
|
SurgicalOntologist posted:Duh, OK, I can get a password prompt with -p 3306. But I'm still getting a password prompt, which I thought shouldn't happen with --skip-grant-tables. Only one mysqld process running and its mysqld_safe --skip-grant-tables --skip-networking. I think you need to run it as mysql --skip-grant-tables rather than mysqld_safe
|
# ? Jan 19, 2017 22:49 |
|
SurgicalOntologist posted:I'm locked out of MariaDB on a Synology NAS I administrate (I didn't set it up, for the record). I don't know the root password. MariaDB was installed for OwnCloud which no one uses, but the guy who set it up doesn't remember the db root password. I tried to follow these steps to reset the password but I get Have you tried updating the my.cnf so you have code:
|
# ? Jan 20, 2017 00:26 |
|
Solved it. -p isn't port, so I don't know what happened there. But it seems like the & was the problem, I foregrounded the mysql session and some additional initialization messages appeared and then I could connect (in another terminal tab).
|
# ? Jan 20, 2017 01:14 |
|
I have a Linux-Richard-Stallman-open-source type question, mebbe somebody knows. I dunno jack about Linux. I am attempting to write a CAD/CAM program myself, to make files and cut them on a CNC router/mill. This will be written in Visual Basic, and will use an Arduino as the hardware-to-PC interface using serial-over-USB. Partly I'm doing it just for fun. The reasons for these choices is that I'm most familiar with the arduino boards and Visual Basic, and I prefer Visual Studio to every other IDE I've seen, except maybe the Borland one, which costs a bunch of money that's too expensive to buy just to dick with. Visual Studio is currently free for hobbyists, but of course that wasn't always so. So what I am wondering is, if it would be possible to do this as a totally-open-source project on Linux? (-note that this would not require a real-time type of Linux distro; it should work with any of them,,, and yea, I know the technical reason they say you need that, and you only need that if you use a "dumb" controller board-) I could re-write the PC software in C++ for Linux, that wouldn't be an issue. And I could use any of the cheapo STM32 ARM dev boards from China-land that are so cheap they're practically disposable. What I'm wondering about specifically is the breakout board-to-PC hardware connection issue: is there still any open-source way left to do this? USB all requires proprietary chips and drivers, does it not? I already know that many USB things do work on Linux and Arduino boards are one of them, but that isn't really "open". Or is it?.... I could write the PC software to work over a serial port or a parallel port, but PCs now don't use hardware interrupts nowadays, do they? Or is it just Windows that got rid of that? I don't ever concern myself with PC motherboard low-level stuff. My last three desktop PCs had neither a parallel port or a serial port on the mobo. You can get PCI-e slot cards for that, but there is still a driver involved in getting any PCI-e card to work. Building my own PCI-e interface card (and driver!) is a nice idea but only a dream. Besides, I wanted to keep the hardware complexity and cost down, hence the Arduino use.
|
# ? Jan 20, 2017 13:56 |
|
edmund745 posted:I have a Linux-Richard-Stallman-open-source type question, mebbe somebody knows. I dunno jack about Linux. libusb is a thing you might want to look at. Pretty sure any chips are likely to be proprietary, but I could be wrong(and no one is likely to fab their own chips anyway, are they?) http://libusb.org/
|
# ? Jan 20, 2017 15:40 |
|
ToxicFrog posted:That was the case in 2008(?) or something, but util-linux fdisk and GNU fdisk have both supported GPT since 2012-ish, IIRC. fdisk supports gpt but it's deemed not stable enough. Gdisk is the preferred way of dealing with GPT partitions. Not sure what the issues are, I just use gdisk.
|
# ? Jan 20, 2017 16:24 |
|
edmund745 posted:I have a Linux-Richard-Stallman-open-source type question, Also, RMS doesn't give a poo poo about hardware. He does care about firmware blobs, but the line is drawn between flash ROMs and mask ROMs. As far as I know he doesn't acknowledge that FPGAs exist. edmund745 posted:And I could use any of the cheapo STM32 ARM dev boards from China-land that are so cheap they're practically disposable. edmund745 posted:What I'm wondering about specifically is the breakout board-to-PC hardware connection issue: is there still any open-source way left to do this? I think most USB-serial adapters use proprietary hardware chips and custom drivers, as there's not a generic "USB serial class" device driver. This is sometimes a sticking point for the open-hardware people, but if you're just purchasing an off-the-shelf cable you shouldn't really care about that. The most common ones (FTDI, PL2303, etc.) are supported by the Linux kernel. From a programming perspective they just appear as a serial device (/dev/ttyUSBx) on the host and you can interact with them as if they were hardware UARTs. edmund745 posted:I could write the PC software to work over a serial port or a parallel port, but PCs now don't use hardware interrupts nowadays, do they? edmund745 posted:My last three desktop PCs had neither a parallel port or a serial port on the mobo. edmund745 posted:You can get PCI-e slot cards for that, but there is still a driver involved in getting any PCI-e card to work.
|
# ? Jan 20, 2017 16:29 |
|
So all this talk about fdisk has me confused. I had no idea there was a 2tb size limit on drives with fdisk, but I was able to create a single primary partition on a 3tb drive with no problem the other day? I set it up in a LVM pool along with a 1.5tb drive I had. What was odd was there were some differences in the options I had while creating the single partition on each drive. One was with the partition type, the smaller drive I used 8e, but the larger drive was a different number. The options when creating the primary partitions were also different, but don't remember what they were. Did I possibly screw something up by using fdisk instead of parted or gdisk? The guide I used to create the LVM is below. This was on an Ubuntu 16.04 system. http://www.htpcbeginner.com/setup-lvm-pool-hard-drive-ubuntu
|
# ? Jan 20, 2017 16:53 |
|
fdisk may have defaulted to a GPT label since the disk was large. You can run "sudo sfdisk -d /dev/DISK" to see what's up.
|
# ? Jan 20, 2017 17:19 |
|
LochNessMonster posted:fdisk supports gpt but it's deemed not stable enough. Gdisk is the preferred way of dealing with GPT partitions.
|
# ? Jan 20, 2017 17:20 |
|
I drive a BBW posted:So all this talk about fdisk has me confused. I had no idea there was a 2tb size limit on drives with fdisk, but I was able to create a single primary partition on a 3tb drive with no problem the other day? I set it up in a LVM pool along with a 1.5tb drive I had. What was odd was there were some differences in the options I had while creating the single partition on each drive. One was with the partition type, the smaller drive I used 8e, but the larger drive was a different number. The options when creating the primary partitions were also different, but don't remember what they were. Did I possibly screw something up by using fdisk instead of parted or gdisk? The guide I used to create the LVM is below.
|
# ? Jan 20, 2017 17:34 |
|
You actually can fully partition a 3 TB disk (with 512 byte sectors) with MBR but it requires two partitions. MBR's limitations are that no partition can start on or after 2^32 sectors, and no partition can be larger than 2^32-1 sectors, but two 1.5 TB partitions will work. It's dangerous though as it also requires that operating systems use 64-bit integers for calculating sector offsets otherwise they'll overflow. Just checked, util-linux fdisk 2.27.1, which ships with Ubuntu 16.04 LTS warns on startup if you use it on a disk larger than 2 TB but still defaults to a MBR label if the disk has no label. It won't let you create a partition that crosses the 2 TB boundary, though it's capable of modifying partition tables with one. My guess is that the 3 TB disk came with a GPT label?
|
# ? Jan 20, 2017 17:53 |
|
I just checked and the 3tb drive has a gpt label. I didn't give it that, so it either came with that label or when I used to have Ubuntu installed on that drive it gave it a gpt label.
|
# ? Jan 20, 2017 20:15 |
|
|
# ? Apr 24, 2024 14:46 |
|
ExcessBLarg! posted:Says who? Sander van Vugt did, in the RHCSA/RHCE certification book he wrote. The book is 2 years old or so, so might not be true anymore.
|
# ? Jan 20, 2017 20:48 |