disk-partitioning

How to get a bigger boot disk on Google Compute Engine

你说的曾经没有我的故事 提交于 2019-11-27 20:19:36
Default images have 10GB, but I need more (30GB approx). If I create a disk of 30GB using one of that default images, the usable space it's 10GB, not 30GB. I know I can install the distro using tools like debootstrap, but that seems unnecessarily complicated. is there any other way to do it? You can create a boot disk larger than 10GB but then you'll need to repartition it, because by default, the provided VM images expand to 10GB so you'll need to use these instructions and run fdisk , reboot, and then run resize2fs to expand the usable space to the full size of the disk. You can automate it

List All Partitions On Disk [closed]

烂漫一生 提交于 2019-11-27 15:19:50
I'm making a utility in C# for a filesystem that isn't supported by windows, which means that I can't just access the drive. I need a way to list all partitions on the hard disk and writing/formatting them. To list disk partitions you can use WMI. var searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_DiskPartition"); foreach (var queryObj in searcher.Get()) { Console.WriteLine("-----------------------------------"); Console.WriteLine("Win32_DiskPartition instance"); Console.WriteLine("Name:{0}", (string)queryObj["Name"]); Console.WriteLine("Index:{0}", (uint)queryObj[

How to find out mount/partition a directory or file is on? (Linux Server) [closed]

元气小坏坏 提交于 2019-11-27 04:56:51
问题 Is there a Linux command to easily find out which partition/mount a directory or file is on? (This is probably a RTM question, and I feel guilty for asking it, but somehow, I can't find a good answer on google just yet..) 回答1: df -P file/goes/here | tail -1 | cut -d' ' -f 1 来源: https://stackoverflow.com/questions/3274354/how-to-find-out-mount-partition-a-directory-or-file-is-on-linux-server

How to get a bigger boot disk on Google Compute Engine

随声附和 提交于 2019-11-26 20:04:20
问题 Default images have 10GB, but I need more (30GB approx). If I create a disk of 30GB using one of that default images, the usable space it's 10GB, not 30GB. I know I can install the distro using tools like debootstrap, but that seems unnecessarily complicated. is there any other way to do it? 回答1: You can create a boot disk larger than 10GB but then you'll need to repartition it, because by default, the provided VM images expand to 10GB so you'll need to use these instructions and run fdisk ,

List All Partitions On Disk [closed]

你。 提交于 2019-11-26 17:09:39
问题 I'm making a utility in C# for a filesystem that isn't supported by windows, which means that I can't just access the drive. I need a way to list all partitions on the hard disk and writing/formatting them. 回答1: To list disk partitions you can use WMI. var searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_DiskPartition"); foreach (var queryObj in searcher.Get()) { Console.WriteLine("-----------------------------------"); Console.WriteLine("Win32_DiskPartition