Earlier quoted context omitted.
He is not talking about the article but the stack overflow question and answer of parent; and the point of that is to resize the root partition without booting into another OS, not to wipe or migrate to memory (ergo the question being asked: "How to shrink root filesystem without booting a livecd"). You can do that just fine on Windows, hell you can even do it with a nice GUI using computer management.
Yeah, but the Linux method is so much more generic; so can be used for more than just downsizing the partition.
Wipe and reinstall a running Linux system via SSH (2017)
11–20 of 81 posts
Re: Wipe and reinstall a running Linux system via SSH (2017)
#12Earlier quoted context omitted.
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
This is mostly filesystem-dependent. If you have a LVM or ZFS volume for instance resizing is (usually) trivial. When you think about it resizing and in particular shrinking a filesystem is very much a non-trivial operation behind the curtains, it's not surprising that some filesystems don't support it out of the box especially since it's not a super common operation in the wild in my experience.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#13The Stack Overflow answer linked is horrifyingly delightful: https://unix.stackexchange.com/questions/226872/how-to-shrin...
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#14Earlier quoted context omitted.
Yeah, but the Linux method is so much more generic; so can be used for more than just downsizing the partition.
It's far more generic but also practically useless for an end-user. Really, its only use seems to be for someone who is a remote sysadmin of some sort. You have to stop pretty much everything on the computer, and still go through a reboot. The only difference thing it buys you is being able to stay SSH'd at the cost of wasting so much more time and going through so much more risk and inconvenience. On Windows you'd j…
If this is still the case then it's not really a far comparison to Windows because you could then do the same thing from a boot media in Linux (ie boot into it, resize and you're done). In fact you probably could also do that via a GUI (maybe gparted?).
In any case I do agree that Linux does still leave a lot to be desired when it comes to making some of the more advanced file system operations far more complicated for end users than they need to be.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#15Earlier quoted context omitted.
It's far more generic but also practically useless for an end-user. Really, its only use seems to be for someone who is a remote sysadmin of some sort. You have to stop pretty much everything on the computer, and still go through a reboot. The only difference thing it buys you is being able to stay SSH'd at the cost of wasting so much more time and going through so much more risk and inconvenience. On Windows you'd j…
I thought you'd still need to reboot on Windows? Last time I tried to do any changes to the system partition I had to reboot for it to take effect. If this is still the case then it's not really a far comparison to Windows because you could then do the same thing from a boot media in Linux (ie boot into it, resize and you're done). In fact you probably could also do that via a GUI (maybe gparted?). In any case I do a…
Not if all you're doing is shrinking from the end. When was the last time you tried? I'm guessing the XP days?
Re: Wipe and reinstall a running Linux system via SSH (2017)
#16https://github.com/gh2o/digitalocean-debian-to-arch#how-it-w...
I forked it to try and convert Debian installs from ext4 to btrfs. Unfortunately while it does work, that's a very bad idea since btrfs-convert produces a fs that fails to operate properly on the long run (IIRC there is - was? - some increasing random space usage that cannot be reclaimed, ever).
https://github.com/lloeki/digitalocean-ext4-to-btrfs/blob/ma...
BTW, the process to convert to btrfs is excellent, only creating btrfs metadata in unallocated ext3 space, writing the btrfs header at the last minute, and using subvolumes allowing you to keep the ext3 metadata around as long as you want to roll back (obviously losing any subsequent modifications) because barring the header the whole ext filesystem and data is untouched.
https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3
I suppose Apple did something similar to convert from HFS+ to APFS so swiftly and so reliably.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#17Earlier quoted context omitted.
This is mostly filesystem-dependent. If you have a LVM or ZFS volume for instance resizing is (usually) trivial. When you think about it resizing and in particular shrinking a filesystem is very much a non-trivial operation behind the curtains, it's not surprising that some filesystems don't support it out of the box especially since it's not a super common operation in the wild in my experience.
It's not trivial and also it's likely to be very poorly tested scenario. I would recreate FS even if it supports resize.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#18The Stack Overflow answer linked is horrifyingly delightful: https://unix.stackexchange.com/questions/226872/how-to-shrin...
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
for i in dev proc sys run; do mount --move /oldroot/$i /$i; doneRe: Wipe and reinstall a running Linux system via SSH (2017)
#19Earlier quoted context omitted.
I thought you'd still need to reboot on Windows? Last time I tried to do any changes to the system partition I had to reboot for it to take effect. If this is still the case then it's not really a far comparison to Windows because you could then do the same thing from a boot media in Linux (ie boot into it, resize and you're done). In fact you probably could also do that via a GUI (maybe gparted?). In any case I do a…
> I thought you'd still need to reboot on Windows? Not if all you're doing is shrinking from the end. When was the last time you tried? I'm guessing the XP days?
To be fair, it might have been. I'm not a heavy Windows user but the fact I can't recall the last time I resized the system volume probably says more about how long ago it was.
Re: Wipe and reinstall a running Linux system via SSH (2017)
#20Earlier quoted context omitted.
I love how the first comment praises it for being "straightforward". For reference, this is how you shrink a file system on Windows: diskpart select volume C: shrink desired=4096 I guess it's nice that the Linux version lets you move the partition as well (or "shrink from behind", so to speak), but damn, "straightforward" is not a word I would have used to describe it.
I think by straightforward they mean you can follow it properly, that's because it's a full step by step that explains each step in enough details to be used, and even includes details for "what to do if you're not in the state expected". A lot of such guides have a fair amount of "then use tool X to do important part Y" without explaining any of it, making it horrible if you don't know X or the details of Y. Source:…
That would be amazing support.
(My Synology just works so I don't know what the support is like.)